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

from v2.63 can't build Maven Projects with JDK 1.7

    Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Critical
    • Resolution: Not A Defect
    • Component/s: maven-plugin
    • Labels:
      None
    • Environment:
      Production
    • Similar Issues:

      Description

      From this Jenkins upgrade (2.63) the configured JDK is no longer used by Jenkins builds: it is replaced at run time by JDK 1.8, but ONLY for Maven Projects.
      For Free Style projects the behavior it right instead: Jenkins builds use the configured JDK (1.7).

      Following the logs of Maven Projects:
      Parsing POMs
      Modules changed, recalculating dependency graph
      Established TCP socket on 60215
      maven3-agent.jar already up to date
      maven3-interceptor.jar already up to date
      maven3-interceptor-commons.jar already up to date
      [CIT_BL] $ /home/jenkins/tools/hudson.model.JDK/JDK_1.7/bin/java -cp /home/jenkins/maven3-agent.jar:/home/jenkins/tools/hudson.tasks.Maven_MavenInstallation/MVN_3.0.5/boot/plexus-classworlds-2.4.jar org.jvnet.hudson.maven3.agent.Maven3Main /home/jenkins/tools/hudson.tasks.Maven_MavenInstallation/MVN_3.0.5 /home/jenkins/slave.jar /home/jenkins/maven3-interceptor.jar /home/jenkins/maven3-interceptor-commons.jar 60215
      <===[JENKINS REMOTING CAPACITY]===>channel started
      ERROR: ================================================================================
      ERROR: Invalid project setup: jenkins/security/MasterToSlaveCallable : Unsupported major.minor version 52.0
      ERROR: JENKINS-18403JENKINS-28294 JDK 'JDK 1.7' not supported to run Maven projects.
      ERROR: Maven projects have to be launched with a Java version greater or equal to the minimum version required by the master.
      ERROR: Use the Maven JDK Toolchains (plugin) to build your maven project with an older JDK.
      ERROR: Retrying with slave Java and setting compile/test properties to point to /home/jenkins/tools/hudson.model.JDK/JDK_1.7.
      ERROR: ================================================================================
      Established TCP socket on 46450
      maven3-agent.jar already up to date
      maven3-interceptor.jar already up to date
      maven3-interceptor-commons.jar already up to date
      [CIT_BL] $ /usr/lib/jvm/java-8-oracle/jre/bin/java -cp /home/jenkins/maven3-agent.jar:/home/jenkins/tools/hudson.tasks.Maven_MavenInstallation/MVN_3.0.5/boot/plexus-classworlds-2.4.jar org.jvnet.hudson.maven3.agent.Maven3Main /home/jenkins/tools/hudson.tasks.Maven_MavenInstallation/MVN_3.0.5 /home/jenkins/slave.jar /home/jenkins/maven3-interceptor.jar /home/jenkins/maven3-interceptor-commons.jar 46450
      <===[JENKINS REMOTING CAPACITY]===>channel started
      FreeStyle log:
      [src] $ /home/jenkins/tools/hudson.tasks.Maven_MavenInstallation/MVN_3.0.5/bin/mvn -f ./pom.xml -s /opt/maven_settings/settings_maven3.0.5.xml -Dmaven.test.skip=true -Dmaven.repo.local=/home/jenkins/workspace/CM/Build_SWITCH/.repository clean package -Pjboss,postgresql,noML,distribution -Ddb.owner=60363 -Ddistro-profile=app
      [INFO] Scanning for projects...
       

        Attachments

          Issue Links

            Activity

            Hide
            alberto_benini Alberto Benini added a comment -

            We have to execute several maven plugins not compatible with JDK 1.8

            Show
            alberto_benini Alberto Benini added a comment - We have to execute several maven plugins not compatible with JDK 1.8
            Hide
            aheritier Arnaud Héritier added a comment -

            Alberto Benini this problem/limitation is documented on the plugin home page : https://wiki.jenkins-ci.org/display/JENKINS/Maven+Project+Plugin

            There is no real good solution, it is an architecture issue because we are exchanging bytecode between Jenkins core, the agent and the maven build thus as soon as one of them has its binary compatibility upgraded (here Jenkins core is build for Java 8 since 2.54) you cannot use anymore a Java runtime inferior to it.

            Show
            aheritier Arnaud Héritier added a comment - Alberto Benini this problem/limitation is documented on the plugin home page : https://wiki.jenkins-ci.org/display/JENKINS/Maven+Project+Plugin There is no real good solution, it is an architecture issue because we are exchanging bytecode between Jenkins core, the agent and the maven build thus as soon as one of them has its binary compatibility upgraded (here Jenkins core is build for Java 8 since 2.54) you cannot use anymore a Java runtime inferior to it.
            Hide
            oleg_nenashev Oleg Nenashev added a comment -

            Arnaud Héritier "Not a defect" then?

            Show
            oleg_nenashev Oleg Nenashev added a comment - Arnaud Héritier "Not a defect" then?
            Hide
            aheritier Arnaud Héritier added a comment -
            Show
            aheritier Arnaud Héritier added a comment - yes Oleg Nenashev

              People

              • Assignee:
                Unassigned
                Reporter:
                alberto_benini Alberto Benini
              • Votes:
                0 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: