Details
-
Type:
Bug
-
Status: Resolved (View Workflow)
-
Priority:
Trivial
-
Resolution: Fixed
-
Component/s: maven-plugin
-
Labels:
-
Environment:jenkins: 1.612
maven2: 2.2.1
maven plugin: 2.9
Ubuntu 14.04.2 LTS
openjdk-6-6b35-1.13.7
openjdk-7-7u79-2.5.5
-
Similar Issues:
Description
When building a project that uses Maven, an error is encountered that states that Maven and JDK 5 are not compatible. However, the JDK version that was invoked is very obviously Java 6. Worse, the Maven plugin then increments the JDK version to JDK 7, which is also available on the system.
[main] $ /usr/lib/jvm/java-6-openjdk-amd64//bin/java -cp /var/lib/jenkins/plugins/maven-plugin/WEB-INF/lib/maven-agent-1.6.jar:/usr/share/maven2/boot/classworlds.jar hudson.maven.agent.Main /usr/share/maven2/ /var/cache/jenkins/war/WEB-INF/lib/remoting-2.51.jar /var/lib/jenkins/plugins/maven-plugin/WEB-INF/lib/maven-interceptor-1.6.jar 56940
<===[JENKINS REMOTING CAPACITY]===>channel started
ERROR:JENKINS-18403JDK 5 not supported to run Maven; retrying with slave Java and setting compile/test properties to point to /usr/lib/jvm/java-6-openjdk-amd64/
[main] $ /usr/lib/jvm/java-7-openjdk-amd64/jre/bin/java -cp /var/lib/jenkins/plugins/maven-plugin/WEB-INF/lib/maven-agent-1.6.jar:/usr/share/maven2/boot/classworlds.jar hudson.maven.agent.Main /usr/share/maven2/ /var/cache/jenkins/war/WEB-INF/lib/remoting-2.51.jar /var/lib/jenkins/plugins/maven-plugin/WEB-INF/lib/maven-interceptor-1.6.jar 34098
This is not reproducible from the command line; building a project from the same pom.xml and same maven2 build and same JDK will result in a proper build.
Attachments
Issue Links
- is duplicated by
-
JENKINS-28481 JDK 5 not supported to run Maven since Jenkins 1.612
-
- Resolved
-
-
JENKINS-28368 Error "JDK 5 not supported to run Maven" while running Java 6
-
- Resolved
-
Here is the PR for this : https://github.com/jenkinsci/maven-plugin/pull/58
Based on the discussion here I just updated the error message but not the behavior.
Before:
After:
ERROR: [JENKINS-18403][JENKINS-28294] JDK 'java-1.6' not supported to run Maven projects; retrying with slave Java and setting compile/test properties to point to /Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home. Maven projects have to be launched with a Java version greater or equal to the one used by the slave. Use the Maven JDK Toolchains (plugin) to build your maven project with an older JDK.