commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sebb <>
Subject [JENKINS] fixing builds that require less than Java 7
Date Thu, 09 Mar 2017 12:29:08 GMT
Jenkins now requires Java 7 for running Maven builds

However it is possible to use the -Pjava-1.6 (etc) profiles to
continue to build with the target JVM

1) Update the main JVM to at least 1.7 so Jenkins-Maven works

2) add -Pjava-1.n to the Maven command line

3) Add the definition of JAVA_1_N_HOME to the job:

Build Environment
Inject environment variables to the build process
Properties Content: JAVA_1_N_HOME=/home/jenkins/tools/java/latest1.N/

The path in the above line is taken from:

This is the approach used in Commons Validator, Net, Pool (and now CLI)

As an alternative, the JAVA_1_N_HOME variable can be defined in terms
of one of the 'Tool Environment' variables. e.g.


This avoids having to use the actual path name.

Unfortunately there don't seem to be any Java settings that apply to
all nodes; the Windows paths and names are different from the Ubuntu

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message