lucene-solr
lucene-solr copied to clipboard
Simplified JAVA_VER_NUM to utilize single expr execution
The fragility of the previous JAVA_VER_NUM causes solr to fail to start when JAVA_TOOL_OPTIONS is set:
+ /jenkins/tools/hudson.model.JDK/jdk8-latest/bin/java -version
+ JAVA_VER=Picked up JAVA_TOOL_OPTIONS: -Dmaven.ext.class.path="/jenkins/workspace/Bates/bates-java_ver-test/7@tmp/withMavena29da72d/pipeline-maven-spy.jar" -Dorg.jenkinsci.plugins.pipeline.maven.reportsFolder="/jenkins/workspace/Bates/bates-java_ver-test/7@tmp/withMavena29da72d"
java version "1.8.0_172"
Java(TM) SE Runtime Environment (build 1.8.0_172-b11)
Java HotSpot(TM) 64-Bit Server VM (build 25.172-b11, mixed mode)
+ echo Picked up JAVA_TOOL_OPTIONS: -Dmaven.ext.class.path="/jenkins/workspace/Bates/bates-java_ver-test/7@tmp/withMavena29da72d/pipeline-maven-spy.jar" -Dorg.jenkinsci.plugins.pipeline.maven.reportsFolder="/jenkins/workspace/Bates/bates-java_ver-test/7@tmp/withMavena29da72d" java version "1.8.0_172" Java(TM) SE Runtime Environment (build 1.8.0_172-b11) Java HotSpot(TM) 64-Bit Server VM (build 25.172-b11, mixed mode)
+ head -1
+ awk -F " /version/ {print $2}
+ sed -e s/^1\.//
+ sed -e s/[._-].*$//
+ JAVA_VER_NUM=/jenkins/workspace/Bates/bates
+ echo /jenkins/workspace/Bates/bates
I am also having this issue, setting JAVA_TOOL_OPTIONS causes solr fail to start because it try to use -XLog java 9 options.
Any chance we can get this reviewed and merged? This PR has been rotting for quite awhile now, and is a small change.
Yes I just got stuck on this for awhile in our maven build in CI. It'd be nice to have this fixed.