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

Using openjdk 6 to build jenkins from code failed

    • Icon: Bug Bug
    • Resolution: Won't Fix
    • Icon: Major Major
    • core

      Build jenkins by the command: mvn -Denforcer.skip=true -Plight-test clean install

      • We need skip maven-enforcer-plugin, although we have openjdk 1.6.0_24 and maven 3.0.3.
      • There are problems about generic classes or methods type inference. I got the following errors:

      [ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.5:compile (default-compile) on project jenkins-core: Compilation failure
      [ERROR] /home/tsllst/study/src/jenkinsci-jenkins-f1aa7ba/core/src/main/java/hudson/DescriptorExtensionList.java:[86,35] incompatible types; no instance(s) of type variable(s) D exist so that hudson.DescriptorExtensionList<T,D> conforms to hudson.DescriptorExtensionList<T,D>
      [ERROR] found : <D>hudson.DescriptorExtensionList<T,D>
      [ERROR] required: hudson.DescriptorExtensionList<T,D>
      [ERROR] -> [Help 1]

      [ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.3.2:compile (default-compile)
      on project jenkins-core: Compilation failure: Compilation failure:
      [ERROR]
      /home/xning/study/src/jenkinsci-jenkins-53f2177/core/src/main/java/hudson/model/AbstractBuild.java:[465,49]
      cannot find symbol
      [ERROR] symbol : method getCustomWorkspace()
      [ERROR] location: class hudson.model.Job
      [ERROR]
      /home/xning/study/src/jenkinsci-jenkins-53f2177/core/src/main/java/hudson/model/AbstractBuild.java:[499,28]
      cannot find symbol
      [ERROR] symbol : method getScmCheckoutStrategy()
      [ERROR] location: class hudson.model.Job

      • Cannot compile groovy files

      [ERROR] Failed to execute goal org.codehaus.gmaven:gmaven-plugin:1.3:compile (default) on project jenkins-core:
      startup failed:
      [ERROR]
      /home/xning/study/src/jenkinsci-jenkins-53f2177/core/src/main/groovy/jenkins/util/groovy/AbstractGroovyViewModul\
      e.groovy: 7: unable to resolve class lib.JenkinsTagLib
      [ERROR] @ line 7, column 1.
      [ERROR] import lib.JenkinsTagLib

      • Cannot process annotation

      [ERROR] Failed to execute goal com.infradna.tool:bridge-method-injector:1.4:process (default) on project
      jenkins-core: Failed to process @WithBridgeMethods:
      /home/xning/study/src/jenkinsci-jenkins-f48d05d/core/target/classes/hudson/model/User.class (No such file or
      directory) -> [Help 1]

          [JENKINS-15165] Using openjdk 6 to build jenkins from code failed

          Wade C added a comment -

          Any workaround? I'm seeing the same thing.

          Apache Maven 3.0.4 (rNON-CANONICAL_2012-01-24_13-02_root; 2012-01-24 05:02:02-0800)
          Maven home: /opt/maven
          Java version: 1.6.0_24, vendor: Sun Microsystems Inc.
          Java home: /usr/lib/jvm/java-6-openjdk/jre
          Default locale: en_US, platform encoding: ANSI_X3.4-1968
          OS name: "linux", version: "3.3.6-1-arch", arch: "i386", family: "unix"

          Wade C added a comment - Any workaround? I'm seeing the same thing. Apache Maven 3.0.4 (rNON-CANONICAL_2012-01-24_13-02_root; 2012-01-24 05:02:02-0800) Maven home: /opt/maven Java version: 1.6.0_24, vendor: Sun Microsystems Inc. Java home: /usr/lib/jvm/java-6-openjdk/jre Default locale: en_US, platform encoding: ANSI_X3.4-1968 OS name: "linux", version: "3.3.6-1-arch", arch: "i386", family: "unix"

          Jesse Glick added a comment -

          @xning: use Maven 3.0.4; 3.0.3 has problems.

          Jesse Glick added a comment - @xning: use Maven 3.0.4; 3.0.3 has problems.

          Jesse Glick added a comment -

          Can solve a few compilation errors with attached patch, but not others.

          May just need to document that Jenkins cannot be built with 6u24 due to compiler bugs solved in later updates. Either get OpenJDK 7, or get the latest Oracle JDK 6/7.

          Jesse Glick added a comment - Can solve a few compilation errors with attached patch, but not others. May just need to document that Jenkins cannot be built with 6u24 due to compiler bugs solved in later updates. Either get OpenJDK 7, or get the latest Oracle JDK 6/7.

          Daniel Beck added a comment -

          Jesse: Your comment indicates this isn't a Jenkins problem. Can this be closed? Or should we create a wiki page specifying supported OS/JDK for building/JRE for running/browser/containers…

          Daniel Beck added a comment - Jesse: Your comment indicates this isn't a Jenkins problem. Can this be closed? Or should we create a wiki page specifying supported OS/JDK for building/JRE for running/browser/containers…

          Jesse Glick added a comment -

          I think as fewer and fewer people try to use OpenJDK 6, it should become less relevant what bugs it has.

          Jesse Glick added a comment - I think as fewer and fewer people try to use OpenJDK 6, it should become less relevant what bugs it has.

            Unassigned Unassigned
            xning xibo ning
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: