0
votes

Here is what I am doing:

  1. Jenkins (v.1638) master runs on Windows 7
  2. A node/slave (agent) runs on Linux (Ubuntu 14.04)
  3. JDK 6 (Oracle jdk1.6.0_45) is used
  4. Maven 2.2.1 is used

Next message is partially copied from console output when I kick off project build:

[webapp] $ /usr/local/jdk1.6.0_45/bin/java -cp /projects/maven-agent.jar:/projects/classworlds.jar hudson.maven.agent.Main /usr/local/apache-maven-2.2.1 /projects/slave.jar /projects/maven-interceptor.jar 58848 /projects/maven2.1-interceptor.jar
<===[JENKINS REMOTING CAPACITY]===>channel started
ERROR: [JENKINS-18403] JDK 5 not supported to run Maven; retrying with slave Java and setting compile/test properties to point to /usr/local/jdk1.6.0_45
Established TCP socket on 59443
maven-agent.jar already up to date
classworlds.jar already up to date
maven-interceptor.jar already up to date
maven2.1-interceptor.jar already up to date
[webapp] $ /projects/jdk1.7.0_79/jre/bin/java -cp /projects/maven-agent.jar:/projects/classworlds.jar hudson.maven.agent.Main /usr/local/apache-maven-2.2.1 /projects/slave.jar /projects/maven-interceptor.jar 59443 /projects/maven2.1-interceptor.jar
<===[JENKINS REMOTING CAPACITY]===>channel started

I got confused by the output:

  1. my Linux doesn't have JDK 5. Why does Jenkins report this error?
  2. why are maven agent run twice? one by jdk1.6.0_45 and one by jdk1.7.0_79
  3. jdk1.7.0_79 is configured in the field of JavaPath of Node (for running slave agent in Linux). why is it picked up to execute maven agent?

I am newbie to Jenkins and couldn't find answers to my questions.

Please explain why it works this way. I appreciate it very much for your help.

1
Jenkins starting with version 1.612 needs JDK 7 to run. Furthermore Maven 2.2.1 is not supported anymore by Jenkins (as far as i knwo). Furthermore Maven 2.2.1 is End Of Life.khmarbaise
I understand Jenkins itself runs on JDK 7 (or above, actually it runs on JDK 8 by default) but doesn't mean project can't be built by Maven 2 on JDK 6.Wayne
Ok. Now you are asking something different. Ok Jenkins runs with JDK 8 which means by default Maven 2 will run with JDK 8 as well. If you need to support JDK 6 you need to configure to use Maven toolchain. Furthermore sometimes it is better to use freestyle project in Jenkins instead of Maven Project type...khmarbaise

1 Answers

0
votes

This JIRA issue should be able to help you if you read to the bottom of the page: "JDK 5 not supported with Maven" error with JDK 6