[JENKINS] fixing builds that require less than Java 7

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[JENKINS] fixing builds that require less than Java 7

sebb-2-2
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:

https://cwiki.apache.org/confluence/display/INFRA/JDK+Installation+Matrix

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.

JAVA_1_5_HOME=${JDK_1_5_LATEST__HOME}

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
ones.

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [JENKINS] fixing builds that require less than Java 7

Benedikt Ritter-4
Hi,

> Am 09.03.2017 um 13:29 schrieb sebb <[hidden email]>:
>
> 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:
>
> https://cwiki.apache.org/confluence/display/INFRA/JDK+Installation+Matrix
>
> This is the approach used in Commons Validator, Net, Pool (and now CLI)

Thank you for fixing this for CLI (which I’m currently working on).

>
> As an alternative, the JAVA_1_N_HOME variable can be defined in terms
> of one of the 'Tool Environment' variables. e.g.
>
> JAVA_1_5_HOME=${JDK_1_5_LATEST__HOME}
>
> 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
> ones.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Fwd: [JENKINS] fixing builds that require less than Java 7

sebb-2-2
In reply to this post by sebb-2-2
There are now JDK variables defined across all nodes, so step 3 can be
simplified:

3) Add the definition of JAVA_1_N_HOME to the job:
Under Build Environment / Tool Environment:
Tick JDK_1_6_LATEST__HOME (for example)

Under Pre Steps / Properties Content, add the following definition
(adjust as necessary)

JAVA_1_6_HOME=${JDK_1_6_LATEST__HOME}

---------- Forwarded message ----------
From: sebb <[hidden email]>
Date: 9 March 2017 at 12:29
Subject: [JENKINS] fixing builds that require less than Java 7
To: CommonsDev <[hidden email]>


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:

https://cwiki.apache.org/confluence/display/INFRA/JDK+Installation+Matrix

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.

JAVA_1_5_HOME=${JDK_1_5_LATEST__HOME}

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
ones.

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [JENKINS] fixing builds that require less than Java 7

sebb-2-2
On 28 May 2017 at 11:24, sebb <[hidden email]> wrote:
> There are now JDK variables defined across all nodes, so step 3 can be
> simplified:
>
> 3) Add the definition of JAVA_1_N_HOME to the job:
> Under Build Environment / Tool Environment:
> Tick JDK_1_6_LATEST__HOME (for example)
>
> Under Pre Steps / Properties Content, add the following definition

Sorry, that should be

Pre Steps / Inject Environment variables then update "Properties Content"

> (adjust as necessary)
>
> JAVA_1_6_HOME=${JDK_1_6_LATEST__HOME}
>
> ---------- Forwarded message ----------
> From: sebb <[hidden email]>
> Date: 9 March 2017 at 12:29
> Subject: [JENKINS] fixing builds that require less than Java 7
> To: CommonsDev <[hidden email]>
>
>
> 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:
>
> https://cwiki.apache.org/confluence/display/INFRA/JDK+Installation+Matrix
>
> 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.
>
> JAVA_1_5_HOME=${JDK_1_5_LATEST__HOME}
>
> 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
> ones.

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Loading...