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

Can't compile/test under Java 10/11 with mvn

    XMLWordPrintable

    Details

    • Similar Issues:
    • Released As:
      Jenkins 2.143

      Description

      Sample error from workflow-support-plugin:

      [ERROR] java.nio.file.NoSuchFileException:$GIT_REPO/target/classes/META-INF/annotations/hudson.Extension

      (Where $GIT_REPO is the actual folder holding the code). 

        Attachments

          Activity

          Hide
          oleg_nenashev Oleg Nenashev added a comment -

          sezpoz update in the core resolves the issue, but you always have to run with newer Jenkins Core dependency to get it running

          Show
          oleg_nenashev Oleg Nenashev added a comment - sezpoz update in the core resolves the issue, but you always have to run with newer Jenkins Core dependency to get it running
          Hide
          svanoort Sam Van Oort added a comment -

          Oleg Nenashev I swear I had this working after the PRs attached...

          Show
          svanoort Sam Van Oort added a comment - Oleg Nenashev I swear I had this working after the PRs attached...
          Hide
          oleg_nenashev Oleg Nenashev added a comment -

          Sam Van Oort I actually compile on Java 11 so my mileage may vary (spoiler: it hurts)

          Show
          oleg_nenashev Oleg Nenashev added a comment - Sam Van Oort I actually compile on Java 11 so my mileage may vary (spoiler: it hurts)
          Hide
          danielbeck Daniel Beck added a comment -

          Addressed in 2.143.

          Show
          danielbeck Daniel Beck added a comment - Addressed in 2.143.
          Hide
          markewaite Mark Waite added a comment -

          Solution in my case (and I believe the general case) to compile with Java 11 needs to use Jenkins version 2.164 or later (slightly older versions can compile with Java 11, Jenkins 2.150 cannot compile with Java 11).

          My command line to compile with Java 11 was:

          $ java -version
          openjdk version "11.0.2" 2019-01-15
          OpenJDK Runtime Environment 18.9 (build 11.0.2+9)
          OpenJDK 64-Bit Server VM 18.9 (build 11.0.2+9, mixed mode)
          $ mvn --version
          Apache Maven 3.6.0 (97c98ec64a1fdfee7767ce5ffb20918da4f719f3; 2018-10-24T18:41:47Z)
          Maven home: /home/jagent/tools/apache-maven-3.6.0
          Java version: 11.0.2, vendor: Oracle Corporation, runtime: /mnt/xvdba/home/jagent/tools/jdk-11.0.2
          Default locale: en_US, platform encoding: UTF-8
          OS name: "linux", version: "2.6.32-754.6.3.el6.x86_64", arch: "amd64", family: "unix"
          $ mvn -Djenkins.version=2.164 clean install
          
          Show
          markewaite Mark Waite added a comment - Solution in my case (and I believe the general case) to compile with Java 11 needs to use Jenkins version 2.164 or later (slightly older versions can compile with Java 11, Jenkins 2.150 cannot compile with Java 11). My command line to compile with Java 11 was: $ java -version openjdk version "11.0.2" 2019-01-15 OpenJDK Runtime Environment 18.9 (build 11.0.2+9) OpenJDK 64-Bit Server VM 18.9 (build 11.0.2+9, mixed mode) $ mvn --version Apache Maven 3.6.0 (97c98ec64a1fdfee7767ce5ffb20918da4f719f3; 2018-10-24T18:41:47Z) Maven home: /home/jagent/tools/apache-maven-3.6.0 Java version: 11.0.2, vendor: Oracle Corporation, runtime: /mnt/xvdba/home/jagent/tools/jdk-11.0.2 Default locale: en_US, platform encoding: UTF-8 OS name: "linux", version: "2.6.32-754.6.3.el6.x86_64", arch: "amd64", family: "unix" $ mvn -Djenkins.version=2.164 clean install

            People

            Assignee:
            oleg_nenashev Oleg Nenashev
            Reporter:
            svanoort Sam Van Oort
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: