Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-28294

"JDK 5 not supported with Maven" error with JDK 6

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Trivial Trivial
    • maven-plugin
    • 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

      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-18403 JDK 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.

            aheritier Arnaud Héritier
            karlkatzke Karl Katzke
            Votes:
            23 Vote for this issue
            Watchers:
            30 Start watching this issue

              Created:
              Updated:
              Resolved: