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

scm-api plugin has test code which fails to build in maven:3-alpine

    Details

    • Similar Issues:

      Description

      I'm building scm-api with the maven:3-alpine Docker container, which as of this morning begins to fail to build properly

       

      >> Building scm-api-plugin
      Current branch master is up to date.
      [INFO] Scanning for projects...
      [WARNING] The POM for org.jenkins-ci.tools:maven-hpi-plugin:jar:1.122 is missing, no dependency information available
      [WARNING] Failed to build parent project for org.jenkins-ci.plugins:scm-api:hpi:2.2.2-SNAPSHOT
      [INFO] 
      [INFO] ------------------------------------------------------------------------
      [INFO] Building SCM API Plugin 2.2.2-SNAPSHOT
      [INFO] ------------------------------------------------------------------------
      [INFO] 
      [INFO] --- maven-hpi-plugin:1.122:validate (default-validate) @ scm-api ---
      [INFO] 
      [INFO] --- maven-enforcer-plugin:1.4.1:display-info (display-info) @ scm-api ---
      [INFO] Maven Version: 3.5.0
      [INFO] JDK Version: 1.8.0_141 normalized as: 1.8.0-141
      [INFO] OS Info: Arch: amd64 Family: unix Name: linux Version: 4.4.0-92-generic
      [INFO] 
      [INFO] --- maven-enforcer-plugin:1.4.1:enforce (display-info) @ scm-api ---
      [INFO] 
      [INFO] --- maven-localizer-plugin:1.24:generate (default) @ scm-api ---
      [INFO] 
      [INFO] >>> maven-javadoc-plugin:2.10.4:javadoc (default) > generate-sources @ scm-api >>>
      [INFO] 
      [INFO] --- maven-hpi-plugin:1.122:validate (default-validate) @ scm-api ---
      [INFO] 
      [INFO] --- maven-enforcer-plugin:1.4.1:display-info (display-info) @ scm-api ---
      [INFO] Maven Version: 3.5.0
      [INFO] JDK Version: 1.8.0_141 normalized as: 1.8.0-141
      [INFO] OS Info: Arch: amd64 Family: unix Name: linux Version: 4.4.0-92-generic
      [INFO] 
      [INFO] --- maven-enforcer-plugin:1.4.1:enforce (display-info) @ scm-api ---
      [INFO] 
      [INFO] --- maven-localizer-plugin:1.24:generate (default) @ scm-api ---
      [INFO] 
      [INFO] <<< maven-javadoc-plugin:2.10.4:javadoc (default) < generate-sources @ scm-api <<<
      [INFO] 
      [INFO] 
      [INFO] --- maven-javadoc-plugin:2.10.4:javadoc (default) @ scm-api ---
      [INFO] Skipping javadoc generation
      [INFO] 
      [INFO] --- maven-hpi-plugin:1.122:generate-taglib-interface (default) @ scm-api ---
      [INFO] 
      [INFO] --- maven-resources-plugin:3.0.2:resources (default-resources) @ scm-api ---
      [INFO] Using 'UTF-8' encoding to copy filtered resources.
      [INFO] Copying 25 resources
      [INFO] 
      [INFO] --- maven-compiler-plugin:3.6.1:compile (default-compile) @ scm-api ---
      [INFO] Changes detected - recompiling the module!
      [INFO] Compiling 91 source files to /data/target/classes
      [INFO] /data/src/main/java/jenkins/scm/api/SCMFile.java: Some input files use or override a deprecated API.
      [INFO] /data/src/main/java/jenkins/scm/api/SCMFile.java: Recompile with -Xlint:deprecation for details.
      [INFO] /data/src/main/java/jenkins/scm/api/trait/SCMBuilder.java: Some input files use unchecked or unsafe operations.
      [INFO] /data/src/main/java/jenkins/scm/api/trait/SCMBuilder.java: Recompile with -Xlint:unchecked for details.
      [INFO] 
      [INFO] --- access-modifier-checker:1.7:enforce (default-enforce) @ scm-api ---
      [INFO] 
      [INFO] --- animal-sniffer-maven-plugin:1.15:check (check) @ scm-api ---
      [INFO] Resolved signature org.codehaus.mojo.signature:java16 version as 1.1 from dependencyManagement
      [INFO] Checking unresolved references to org.codehaus.mojo.signature:java16:1.1
      [INFO] 
      [INFO] --- maven-hpi-plugin:1.122:insert-test (default-insert-test) @ scm-api ---
      [INFO] 
      [INFO] --- gmaven-plugin:1.5-jenkins-3:generateTestStubs (test-in-groovy) @ scm-api ---
      [INFO] No sources found for Java stub generation
      [INFO] 
      [INFO] --- maven-resources-plugin:3.0.2:testResources (default-testResources) @ scm-api ---
      [INFO] Using 'UTF-8' encoding to copy filtered resources.
      [INFO] Copying 5 resources
      [INFO] 
      [INFO] --- maven-compiler-plugin:3.6.1:testCompile (default-testCompile) @ scm-api ---
      [INFO] Changes detected - recompiling the module!
      [INFO] Compiling 56 source files to /data/target/test-classes
      [INFO] -------------------------------------------------------------
      [ERROR] COMPILATION ERROR : 
      [INFO] -------------------------------------------------------------
      [ERROR] /data/src/test/java/jenkins/scm/impl/mock/MockSCMController.java:[28,34] package com.sun.javafx.collections does not exist
      [INFO] 1 error
      [INFO] -------------------------------------------------------------
      [INFO] ------------------------------------------------------------------------
      [INFO] BUILD FAILURE
      [INFO] ------------------------------------------------------------------------
      [INFO] Total time: 8.076 s
      [INFO] Finished at: 2017-08-22T17:38:27Z
      [INFO] Final Memory: 135M/1254M
      [INFO] ------------------------------------------------------------------------
      [ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.6.1:testCompile (default-testCompile) on project scm-api: Compilation failure
      [ERROR] /data/src/test/java/jenkins/scm/impl/mock/MockSCMController.java:[28,34] package com.sun.javafx.collections does not exist
      [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] 
      [ERROR] For more information about the errors and possible solutions, please read the following articles:
      [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
      Makefile:9: recipe for target 'plugins' failed
      make: *** [plugins] Error 1
      

       

        Attachments

          Issue Links

            Activity

            Hide
            abayer Andrew Bayer added a comment -

            rsandell - is there a reason you used UnmodifiableListSet rather than just Collections.unmodifiableSet(...) here? I'm trying a build with the latter now.

            Show
            abayer Andrew Bayer added a comment - rsandell - is there a reason you used UnmodifiableListSet rather than just Collections.unmodifiableSet(...) here? I'm trying a build with the latter now.
            Hide
            abayer Andrew Bayer added a comment -

            PR up at https://github.com/jenkinsci/scm-api-plugin/pull/47 - I verified that switching to Collections.unmodifiableSet worked fine in downstream tests using this test tooling. I'm guessing this failed to compile for R. Tyler Croy due to using a headless JDK.

            Show
            abayer Andrew Bayer added a comment - PR up at https://github.com/jenkinsci/scm-api-plugin/pull/47 - I verified that switching to Collections.unmodifiableSet worked fine in downstream tests using this test tooling. I'm guessing this failed to compile for R. Tyler Croy due to using a headless JDK.
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Andrew Bayer
            Path:
            src/test/java/jenkins/scm/impl/mock/MockSCMController.java
            http://jenkins-ci.org/commit/scm-api-plugin/d90bd0668a5496486825b6bf5420bfe9b9842e9f
            Log:
            [FIXED JENKINS-46356] Get rid of javafx class

            We didn't need it, and it was causing compilation errors on
            default-jdk8-headless. Fun!

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Andrew Bayer Path: src/test/java/jenkins/scm/impl/mock/MockSCMController.java http://jenkins-ci.org/commit/scm-api-plugin/d90bd0668a5496486825b6bf5420bfe9b9842e9f Log: [FIXED JENKINS-46356] Get rid of javafx class We didn't need it, and it was causing compilation errors on default-jdk8-headless. Fun!

              People

              • Assignee:
                abayer Andrew Bayer
                Reporter:
                rtyler R. Tyler Croy
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: