• Icon: Task Task
    • Resolution: Fixed
    • Icon: Major Major
    • core

      This ticket tracks the promise made in http://jenkins-ci.org/content/good-bye-java6 that we are bumping up core requirements from Java6 to Java7.

          [JENKINS-28120] Jenkins core to require Java7

          Code changed in jenkins
          User: Kohsuke Kawaguchi
          Path:
          changelog.html
          core/src/main/resources/hudson/slaves/SlaveComputer/slave-agent.jnlp.jelly
          pom.xml
          http://jenkins-ci.org/commit/jenkins/2826ea3185f5ca1df02ab54d465a14308ecffe05
          Log:
          JENKINS-28120

          As the first step of Java7 migration, ship Java7 class files without
          requiring Java7 runtime.

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Kohsuke Kawaguchi Path: changelog.html core/src/main/resources/hudson/slaves/SlaveComputer/slave-agent.jnlp.jelly pom.xml http://jenkins-ci.org/commit/jenkins/2826ea3185f5ca1df02ab54d465a14308ecffe05 Log: JENKINS-28120 As the first step of Java7 migration, ship Java7 class files without requiring Java7 runtime.

          Code changed in jenkins
          User: Kohsuke Kawaguchi
          Path:
          changelog.html
          core/src/main/resources/hudson/slaves/SlaveComputer/slave-agent.jnlp.jelly
          pom.xml
          http://jenkins-ci.org/commit/jenkins/de8bba40cf593bec5fda197e09f644ae53e207a3
          Log:
          JENKINS-28120

          As the first step of Java7 migration, ship Java7 class files without
          requiring Java7 runtime.

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Kohsuke Kawaguchi Path: changelog.html core/src/main/resources/hudson/slaves/SlaveComputer/slave-agent.jnlp.jelly pom.xml http://jenkins-ci.org/commit/jenkins/de8bba40cf593bec5fda197e09f644ae53e207a3 Log: JENKINS-28120 As the first step of Java7 migration, ship Java7 class files without requiring Java7 runtime.

          Code changed in jenkins
          User: Kohsuke Kawaguchi
          Path:
          src/main/java/Main.java
          http://jenkins-ci.org/commit/extras-executable-war/9850770999541aff2e44e5695737a452892666d1
          Log:
          JENKINS-28120

          Now requiring Java7

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Kohsuke Kawaguchi Path: src/main/java/Main.java http://jenkins-ci.org/commit/extras-executable-war/9850770999541aff2e44e5695737a452892666d1 Log: JENKINS-28120 Now requiring Java7

          Code changed in jenkins
          User: Kohsuke Kawaguchi
          Path:
          pom.xml
          war/pom.xml
          http://jenkins-ci.org/commit/jenkins/18fa9363c2df5deba4a64e0b44d6417b324049ad
          Log:
          JENKINS-28120

          Reflecting more code review comments from
          https://github.com/jenkinsci/jenkins/pull/1679

          • Jesse wants to keep the variable pointing to 1.6
          • Update executable-war so that it fails gracefully if run with Java6 or
            earlier.
          • CI build fails with VerifyError due to a regression in JDK.
            To support wide range of development environment, just cut off the
            verifier.
          • Have enforcer require 1.7 although javac fails in a kinda obvious way.

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Kohsuke Kawaguchi Path: pom.xml war/pom.xml http://jenkins-ci.org/commit/jenkins/18fa9363c2df5deba4a64e0b44d6417b324049ad Log: JENKINS-28120 Reflecting more code review comments from https://github.com/jenkinsci/jenkins/pull/1679 Jesse wants to keep the variable pointing to 1.6 Update executable-war so that it fails gracefully if run with Java6 or earlier. CI build fails with VerifyError due to a regression in JDK. To support wide range of development environment, just cut off the verifier. Have enforcer require 1.7 although javac fails in a kinda obvious way.

          Code changed in jenkins
          User: Kohsuke Kawaguchi
          Path:
          core/pom.xml
          pom.xml
          war/pom.xml
          http://jenkins-ci.org/commit/jenkins/c00935f0b212272c7b00dc446bdbab20a13bb787
          Log:
          JENKINS-28120

          Reflecting more code review comments from
          https://github.com/jenkinsci/jenkins/pull/1679

          • Jesse wants to keep the variable pointing to 1.6
          • Update executable-war so that it fails gracefully if run with Java6 or
            earlier.
          • CI build fails with VerifyError due to a regression in JDK.
            To support wide range of development environment, just cut off the
            verifier.
          • Have enforcer require 1.7 although javac fails in a kinda obvious way.

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Kohsuke Kawaguchi Path: core/pom.xml pom.xml war/pom.xml http://jenkins-ci.org/commit/jenkins/c00935f0b212272c7b00dc446bdbab20a13bb787 Log: JENKINS-28120 Reflecting more code review comments from https://github.com/jenkinsci/jenkins/pull/1679 Jesse wants to keep the variable pointing to 1.6 Update executable-war so that it fails gracefully if run with Java6 or earlier. CI build fails with VerifyError due to a regression in JDK. To support wide range of development environment, just cut off the verifier. Have enforcer require 1.7 although javac fails in a kinda obvious way.

          Code changed in jenkins
          User: Kohsuke Kawaguchi
          Path:
          changelog.html
          core/pom.xml
          core/src/main/resources/hudson/slaves/SlaveComputer/slave-agent.jnlp.jelly
          pom.xml
          war/pom.xml
          http://jenkins-ci.org/commit/jenkins/e75bea8928a904c5a2de47f3ee54ae726b12f4af
          Log:
          [FIXED JENKINS-28120] Merge pull request #1679

          Compare: https://github.com/jenkinsci/jenkins/compare/ca3b1db4d6f7...e75bea8928a9

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Kohsuke Kawaguchi Path: changelog.html core/pom.xml core/src/main/resources/hudson/slaves/SlaveComputer/slave-agent.jnlp.jelly pom.xml war/pom.xml http://jenkins-ci.org/commit/jenkins/e75bea8928a904c5a2de47f3ee54ae726b12f4af Log: [FIXED JENKINS-28120] Merge pull request #1679 Compare: https://github.com/jenkinsci/jenkins/compare/ca3b1db4d6f7...e75bea8928a9

          Code changed in jenkins
          User: Kohsuke Kawaguchi
          Path:
          pom.xml
          http://jenkins-ci.org/commit/jenkins/8d3cd91e281861ac9e28f60a39cb7d131e1911f6
          Log:
          Follow up fix to JENKINS-28120.

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Kohsuke Kawaguchi Path: pom.xml http://jenkins-ci.org/commit/jenkins/8d3cd91e281861ac9e28f60a39cb7d131e1911f6 Log: Follow up fix to JENKINS-28120 .

          Jan Geertsma added a comment - - edited

          I have installed 1.612 but it broke one build, so I reverted to 1.611

          Our Jenkins uses Java 1.8, the slave uses 1.7, but the broken build is a Maven project that depends on Java 1.6. In the job configuration the JDK is set to 1.6 and I tried the optional maven parameter -Dmaven.compiler.executable=/opt/java/jdk-1.6/bin/javac. In 1.612 I get a line in the console output which says "JENKINS-18403] JDK 5 not supported to run Maven" ... but I didn't specify JDK5, also restarting the build slaves didn't help.

          I applaud the upgrade to Java7 and I would like to upgrade our projects to Java7 or Java8, but some legacy code makes it complicated.

          07:23:55 [BuildJob] $ /opt/java/jdk-1.6/bin/java -cp /opt/data/jenkins-agent/maven32-agent.jar:/opt/maven/apache-maven-3/boot/plexus-classworlds-2.5.1.jar:/opt/maven/apache-maven-3/conf/logging jenkins.maven3.agent.Maven32Main /opt/maven/apache-maven-3 /opt/data/jenkins-agent/slave.jar /opt/data/jenkins-agent/maven32-interceptor.jar /opt/data/jenkins-agent/maven3-interceptor-commons.jar 46882
          07:23:56 <===[JENKINS REMOTING CAPACITY]===>channel started
          07:23:56 ERROR: [JENKINS-18403] JDK 5 not supported to run Maven; retrying with slave Java and setting compile/test properties to point to /opt/java/jdk-1.6
          07:23:56 maven32-agent.jar already up to date
          07:23:56 maven32-interceptor.jar already up to date
          07:23:56 maven3-interceptor-commons.jar already up to date
          07:23:56 [BuildJob] $ /opt/java/jdk1.7.0_72/jre/bin/java -cp /opt/data/jenkins-agent/maven32-agent.jar:/opt/maven/apache-maven-3/boot/plexus-classworlds-2.5.1.jar:/opt/maven/apache-maven-3/conf/logging
          

          EDIT: Thanks Jesse, it took me a while before I released the meaning of JDK in the project. I know understand you referred to "JDK to be used for this project". You're right and my project builds fine when I set this to JDK-7 or JDK-8 ... My problem was
          07:23:55 [BuildJob] $ /opt/java/jdk-1.6/bin/java
          And it is now solved, thanks for the quick and precise feedback!

          Jan Geertsma added a comment - - edited I have installed 1.612 but it broke one build, so I reverted to 1.611 Our Jenkins uses Java 1.8, the slave uses 1.7, but the broken build is a Maven project that depends on Java 1.6. In the job configuration the JDK is set to 1.6 and I tried the optional maven parameter -Dmaven.compiler.executable=/opt/java/jdk-1.6/bin/javac. In 1.612 I get a line in the console output which says " JENKINS-18403 ] JDK 5 not supported to run Maven" ... but I didn't specify JDK5, also restarting the build slaves didn't help. I applaud the upgrade to Java7 and I would like to upgrade our projects to Java7 or Java8, but some legacy code makes it complicated. 07:23:55 [BuildJob] $ /opt/java/jdk-1.6/bin/java -cp /opt/data/jenkins-agent/maven32-agent.jar:/opt/maven/apache-maven-3/boot/plexus-classworlds-2.5.1.jar:/opt/maven/apache-maven-3/conf/logging jenkins.maven3.agent.Maven32Main /opt/maven/apache-maven-3 /opt/data/jenkins-agent/slave.jar /opt/data/jenkins-agent/maven32-interceptor.jar /opt/data/jenkins-agent/maven3-interceptor-commons.jar 46882 07:23:56 <===[JENKINS REMOTING CAPACITY]===>channel started 07:23:56 ERROR: [JENKINS-18403] JDK 5 not supported to run Maven; retrying with slave Java and setting compile/test properties to point to /opt/java/jdk-1.6 07:23:56 maven32-agent.jar already up to date 07:23:56 maven32-interceptor.jar already up to date 07:23:56 maven3-interceptor-commons.jar already up to date 07:23:56 [BuildJob] $ /opt/java/jdk1.7.0_72/jre/bin/java -cp /opt/data/jenkins-agent/maven32-agent.jar:/opt/maven/apache-maven-3/boot/plexus-classworlds-2.5.1.jar:/opt/maven/apache-maven-3/conf/logging EDIT: Thanks Jesse, it took me a while before I released the meaning of JDK in the project. I know understand you referred to " JDK to be used for this project ". You're right and my project builds fine when I set this to JDK-7 or JDK-8 ... My problem was 07:23:55 [BuildJob] $ /opt/java/ jdk-1.6 /bin/java And it is now solved, thanks for the quick and precise feedback!

          Jesse Glick added a comment -

          jgeertsma see JENKINS-25272. You must now set the job configuration to JDK 7 or higher. The message is just out of date; what is not supported to run Maven is any version of Java older than what the Jenkins master itself requires.

          Jesse Glick added a comment - jgeertsma see JENKINS-25272 . You must now set the job configuration to JDK 7 or higher. The message is just out of date; what is not supported to run Maven is any version of Java older than what the Jenkins master itself requires.

          piepera added a comment -

          After upgrading to Jenkins 1.612, we can no longer build Java 1.6 Maven projects. We get this "JENKINS-18403 JDK 5 not supported...." error, followed by compilation errors related to API changes from Java 1.6 to Java 1.7.

          If I understand the discussion in JENKINS-25272 correctly, this is deliberate behavior. Jenkins will no longer allow us to have multiple maven projects which build using different JDKs. There are two workarounds: either upgrade all of our projects to Java 1.7, or stop using the Maven Project Type, using a Freestyle project type with Maven Build Step instead.

          Is this understanding correct? Does Jenkins 1.612 no longer support the building of Java 1.6 Maven projects? If so, we will probably just continue using older versions of Jenkins for the foreseeable future.

          piepera added a comment - After upgrading to Jenkins 1.612, we can no longer build Java 1.6 Maven projects. We get this " JENKINS-18403 JDK 5 not supported...." error, followed by compilation errors related to API changes from Java 1.6 to Java 1.7. If I understand the discussion in JENKINS-25272 correctly, this is deliberate behavior. Jenkins will no longer allow us to have multiple maven projects which build using different JDKs. There are two workarounds: either upgrade all of our projects to Java 1.7, or stop using the Maven Project Type, using a Freestyle project type with Maven Build Step instead. Is this understanding correct? Does Jenkins 1.612 no longer support the building of Java 1.6 Maven projects? If so, we will probably just continue using older versions of Jenkins for the foreseeable future.

          Jesse Glick added a comment -

          If you wish to use the Maven project type, you must set the Jenkins project configuration to use JDK 7 or newer, which means the JVM used to run Maven itself. The JDK tools used to build and test your project’s code may be anything. These tools are defined by settings in Maven plugins, such as -Dmaven.compiler.executable=… on the Maven command line.

          Alternately, you can simply build your project using JDK 7+ tools but using tool configuration limiting the source code to earlier releases (such as -source 6), and using the Animal Sniffer plugin to block Java 7+ APIs from being used accidentally.

          If you wish to run the Maven process using anything older than Java 7, you must use the freestyle project type with the Maven build step—which I would strongly recommend for a variety of reasons anyway.

          Jesse Glick added a comment - If you wish to use the Maven project type, you must set the Jenkins project configuration to use JDK 7 or newer, which means the JVM used to run Maven itself. The JDK tools used to build and test your project’s code may be anything. These tools are defined by settings in Maven plugins, such as -Dmaven.compiler.executable=… on the Maven command line. Alternately, you can simply build your project using JDK 7+ tools but using tool configuration limiting the source code to earlier releases (such as -source 6 ), and using the Animal Sniffer plugin to block Java 7+ APIs from being used accidentally. If you wish to run the Maven process using anything older than Java 7, you must use the freestyle project type with the Maven build step—which I would strongly recommend for a variety of reasons anyway.

          We have some older slaves which run SunOS-5.9 for which Oracle does not provide Java7. Slave upgrade is not a solution either since there are some native legacy tools used in the build system which can only run on this machine. Does this mean I will have to stop upgrading Jenkins in order to have SunOS-5.9 slaves connected?

          Krzysztof Malinowski added a comment - We have some older slaves which run SunOS-5.9 for which Oracle does not provide Java7. Slave upgrade is not a solution either since there are some native legacy tools used in the build system which can only run on this machine. Does this mean I will have to stop upgrading Jenkins in order to have SunOS-5.9 slaves connected?

          Jesse Glick added a comment -

          Does this mean I will have to stop upgrading Jenkins in order to have SunOS-5.9 slaves connected?

          Sounds that way, unless you can find an OpenJDK 7 port.

          Jesse Glick added a comment - Does this mean I will have to stop upgrading Jenkins in order to have SunOS-5.9 slaves connected? Sounds that way, unless you can find an OpenJDK 7 port.

          Victor Noël added a comment -

          Jesse, why would you strongly recommend to use the freestyle project type for Maven builds?

          I tried to look at it but there is two different build step available: invoke maven3 and invoke maven goal (or something like that, I am not using the english locale).
          Which one should then be used?
          And are dependencies taken into account to trigger the jobs as with the maven project type?
          Is there specific to do w.r.t. to the tests and the unstability of the build?

          Thank you for your help

          Victor Noël added a comment - Jesse, why would you strongly recommend to use the freestyle project type for Maven builds? I tried to look at it but there is two different build step available: invoke maven3 and invoke maven goal (or something like that, I am not using the english locale). Which one should then be used? And are dependencies taken into account to trigger the jobs as with the maven project type? Is there specific to do w.r.t. to the tests and the unstability of the build? Thank you for your help

          Code changed in jenkins
          User: Kohsuke Kawaguchi
          Path:
          pom.xml
          http://jenkins-ci.org/commit/jenkins/6496a946848204dc908c503452fc294c7daebb73
          Log:
          JENKINS-28120 Phase 2: allow the core to use Java7 syntax and runtime.

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Kohsuke Kawaguchi Path: pom.xml http://jenkins-ci.org/commit/jenkins/6496a946848204dc908c503452fc294c7daebb73 Log: JENKINS-28120 Phase 2: allow the core to use Java7 syntax and runtime.

          dogfood added a comment -

          Integrated in jenkins_main_trunk #4155
          JENKINS-28120 Phase 2: allow the core to use Java7 syntax and runtime. (Revision 6496a946848204dc908c503452fc294c7daebb73)

          Result = UNSTABLE
          kohsuke : 6496a946848204dc908c503452fc294c7daebb73
          Files :

          • pom.xml

          dogfood added a comment - Integrated in jenkins_main_trunk #4155 JENKINS-28120 Phase 2: allow the core to use Java7 syntax and runtime. (Revision 6496a946848204dc908c503452fc294c7daebb73) Result = UNSTABLE kohsuke : 6496a946848204dc908c503452fc294c7daebb73 Files : pom.xml

          Code changed in jenkins
          User: Mitoma Ryo
          Path:
          src/main/java/hudson/plugins/sshslaves/SSHLauncher.java
          http://jenkins-ci.org/commit/ssh-slaves-plugin/af2b72bd79577550623be685158bd2969284cff0
          Log:
          update JDK version.

          Jenkins became requiring JDK1.7.
          see JENKINS-28120 https://github.com/jenkinsci/jenkins/commit/c00935f0b212272c7b00dc446bdbab20a13bb787

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Mitoma Ryo Path: src/main/java/hudson/plugins/sshslaves/SSHLauncher.java http://jenkins-ci.org/commit/ssh-slaves-plugin/af2b72bd79577550623be685158bd2969284cff0 Log: update JDK version. Jenkins became requiring JDK1.7. see JENKINS-28120 https://github.com/jenkinsci/jenkins/commit/c00935f0b212272c7b00dc446bdbab20a13bb787

          Jesse Glick added a comment -

          victornoel this is a user list question which is off topic here.

          Jesse Glick added a comment - victornoel this is a user list question which is off topic here.

          Paul Suh added a comment -

          OS X installer is broken due to this issue. See bug #28438. In addition, Apple has added an updated download link to the Java 6 dependency, https://support.apple.com/kb/DL1572?viewlocale=en_US&locale=en_US.

          Paul Suh added a comment - OS X installer is broken due to this issue. See bug #28438. In addition, Apple has added an updated download link to the Java 6 dependency, https://support.apple.com/kb/DL1572?viewlocale=en_US&locale=en_US .

          Jesse Glick added a comment -

          plsuh if you know of any regressions caused by this please make sure they are filed separately and marked as blocking this one. Do not reopen.

          Jesse Glick added a comment - plsuh if you know of any regressions caused by this please make sure they are filed separately and marked as blocking this one. Do not reopen.

            kohsuke Kohsuke Kawaguchi
            kohsuke Kohsuke Kawaguchi
            Votes:
            0 Vote for this issue
            Watchers:
            10 Start watching this issue

              Created:
              Updated:
              Resolved: