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

Java stubs are not always regenerated from Groovy source

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • gradle-jpi-plugin
    • None
    • Gradle 2.3
      gradle-jpi-plugin 0.12.2

      When running a build without the clean task, the build may fail when running the compileJava task because the stubs generated from Groovy sources have not been regenerated by the stapler task.

      :job-dsl-plugin:localizer UP-TO-DATE
      :job-dsl-plugin:stapler UP-TO-DATE
      :job-dsl-plugin:compileJava
      Download http://repo.jenkins-ci.org/public/org/jenkinsci/plugins/managed-scripts/1.2.1/managed-scripts-1.2.1.jar
      warning: [options] bootstrap class path not set in conjunction with -source 1.6
      warning: No SupportedSourceVersion annotation found on org.kohsuke.wpc.ProcessorImpl, returning RELEASE_6.
      /scratch/jenkins/workspace/plugins/job-dsl-plugin/job-dsl-plugin/build/generated-src/stubs/javaposse/jobdsl/plugin/InterruptibleJobManagement.java:10: error: InterruptibleJobManagement is not abstract and does not override abstract method requireMinimumPluginVersion(String,String,boolean) in JobManagement
      @groovy.transform.ThreadInterrupt() public class InterruptibleJobManagement
                                                 ^
      Note: /scratch/jenkins/workspace/plugins/job-dsl-plugin/job-dsl-plugin/build/generated-src/stubs/javaposse/jobdsl/plugin/InterruptibleJobManagement.java uses or overrides a deprecated API.
      Note: Recompile with -Xlint:deprecation for details.
      1 error
      2 warnings
      :job-dsl-plugin:compileJava FAILED
      
      FAILURE: Build failed with an exception.
      
      * What went wrong:
      Execution failed for task ':job-dsl-plugin:compileJava'.
      > Compilation failed; see the compiler error output for details.
      
      * Try:
      Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
      
      BUILD FAILED
      
      Total time: 1 mins 38.38 secs
      

      It's possible to run the build with clean, but that's only a workaround since it unnecessarily increases build time.

            daspilker Daniel Spilker
            daspilker Daniel Spilker
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: