lucene-solr icon indicating copy to clipboard operation
lucene-solr copied to clipboard

Simplified JAVA_VER_NUM to utilize single expr execution

Open LinkMJB opened this issue 7 years ago • 3 comments

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

LinkMJB avatar Nov 26 '18 21:11 LinkMJB

I am also having this issue, setting JAVA_TOOL_OPTIONS causes solr fail to start because it try to use -XLog java 9 options.

AceHack avatar Jul 30 '19 14:07 AceHack

Any chance we can get this reviewed and merged? This PR has been rotting for quite awhile now, and is a small change.

LinkMJB avatar Aug 02 '19 18:08 LinkMJB

Yes I just got stuck on this for awhile in our maven build in CI. It'd be nice to have this fixed.

brjeter avatar Aug 02 '19 18:08 brjeter