| The pull request looks good to me. However, I can't duplicate the problem because I can't compile the git client plugin with Java 10. Can you provide more details on your configuration that allows you to compile the git client plugin with Java 10? Steps I used:
- Switch to Java 10
$ export JAVA_HOME=/home/mwaite/mark-pc2.markwaite.net-agent/tools/hudson.model.JDK/jdk10/jdk-10.0.2
$ export PATH=$JAVA_HOME/bin:$PATH
$ java -version
java version "10.0.2" 2018-07-17
Java(TM) SE Runtime Environment 18.3 (build 10.0.2+13)
Java HotSpot(TM) 64-Bit Server VM 18.3 (build 10.0.2+13, mixed mode)
- Confirm maven version runs with Java 10
$ mvn --version
Apache Maven 3.5.4 (1edded0938998edf8bf061f1ceb3cfdeccf443fe; 2018-06-17T12:33:14-06:00)
Maven home: /home/mwaite/mark-pc2.markwaite.net-agent/tools/hudson.tasks.Maven_MavenInstallation/mvn/apache-maven-3.5.4
Java version: 10.0.2, vendor: Oracle Corporation, runtime: /home/mwaite/mark-pc2.markwaite.net-agent/tools/hudson.model.JDK/jdk10/jdk-10.0.2
Default locale: en_US, platform encoding: UTF-8
OS name: "linux", version: "4.4.0-133-generic", arch: "amd64", family: "unix"
- Clone git client plugin master branch
- Compile git client plugin master branch with JDK 10 and Maven 3.5.4
$ mvn compile
[INFO] Scanning for projects...
[INFO]
[INFO] -----------------< org.jenkins-ci.plugins:git-client >------------------
[INFO] Building Jenkins Git client plugin 3.0.0-beta6-SNAPSHOT
[INFO] --------------------------------[ hpi ]---------------------------------
[INFO]
[INFO] --- maven-hpi-plugin:2.6:validate (default-validate) @ git-client ---
[INFO]
[INFO] --- maven-enforcer-plugin:3.0.0-M1:display-info (display-info) @ git-client ---
[INFO] Maven Version: 3.5.4
[INFO] JDK Version: 10.0.2 normalized as: 10.0.2
[INFO] OS Info: Arch: amd64 Family: unix Name: linux Version: 4.4.0-133-generic
[INFO]
[INFO] --- maven-enforcer-plugin:3.0.0-M1:enforce (display-info) @ git-client ---
[INFO] Ignoring requireUpperBoundDeps in com.google.guava:guava
[INFO]
[INFO] --- maven-localizer-plugin:1.24:generate (default) @ git-client ---
[INFO]
[INFO] --- maven-resources-plugin:3.0.2:resources (default-resources) @ git-client ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 16 resources
[INFO]
[INFO] --- flatten-maven-plugin:1.0.1:flatten (flatten) @ git-client ---
[INFO] Generating flattened POM of project org.jenkins-ci.plugins:git-client:hpi:3.0.0-beta6-SNAPSHOT...
[INFO]
[INFO] --- maven-compiler-plugin:3.7.0:compile (default-compile) @ git-client ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 48 source files to /home/mwaite/git/jenkins/git-client-plugin/git-client-plugin/target/classes
[INFO] /home/mwaite/git/jenkins/git-client-plugin/git-client-plugin/src/main/java/org/jenkinsci/plugins/gitclient/CliGitAPIImpl.java: Some input files use or override a deprecated API.
[INFO] /home/mwaite/git/jenkins/git-client-plugin/git-client-plugin/src/main/java/org/jenkinsci/plugins/gitclient/CliGitAPIImpl.java: Recompile with -Xlint:deprecation for details.
[INFO] -------------------------------------------------------------
[ERROR] COMPILATION ERROR :
[INFO] -------------------------------------------------------------
[ERROR] java.nio.file.NoSuchFileException: /home/mwaite/git/jenkins/git-client-plugin/git-client-plugin/target/classes/META-INF/annotations/hudson.Extension
[INFO] 1 error
[INFO] -------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 3.861 s
[INFO] Finished at: 2018-08-19T16:36:30-06:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.7.0:compile (default-compile) on project git-client: Compilation failure
[ERROR] java.nio.file.NoSuchFileException: /home/mwaite/git/jenkins/git-client-plugin/git-client-plugin/target/classes/META-INF/annotations/hudson.Extension
[ERROR]
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
I have no objection to updating the surefire plugin version to a newer version. That's a good move in any case. I would like to understand the difference between your environment and mine. Are you using a newer version of Java 10 or a newer version of Maven or something different? |