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

      Getting a bunch of warnings when building using the gradle plugin. Not sure if this is something in my environment or not. The plugin I am building is pretty minimal.

      C:\Users\USER\.m2\repository\org\jenkins-ci\main\jenkins-core\1.447\jenkins-core-1.447.jar(jenkins/model/Jenkins.class): warning: Cannot find annotation metho
      d 'value()' in type 'SuppressWarnings': class file for edu.umd.cs.findbugs.annotations.SuppressWarnings not found
      C:\Users\USER\.m2\repository\org\jenkins-ci\main\jenkins-core\1.447\jenkins-core-1.447.jar(jenkins/model/Jenkins.class): warning: Cannot find annotation metho
      d 'value()' in type 'SuppressWarnings'
      warning: Supported source version 'RELEASE_6' from annotation processor 'jenkins.PluginSubtypeMarker' less than -source '1.7'
      warning: Supported source version 'RELEASE_6' from annotation processor 'org.kohsuke.stapler.jsr269.ConstructorProcessor' less than -source '1.7'
      warning: Supported source version 'RELEASE_6' from annotation processor 'org.kohsuke.stapler.jsr269.ExportedBeanAnnotationProcessor' less than -source '1.7'
      warning: Supported source version 'RELEASE_6' from annotation processor 'org.kohsuke.stapler.jsr269.QueryParameterAnnotationProcessor' less than -source '1.7'
      warning: Supported source version 'RELEASE_6' from annotation processor 'org.jvnet.hudson.annotation_indexer.AnnotationProcessorImpl' less than -source '1.7'
      warning: Supported source version 'RELEASE_6' from annotation processor 'net.java.sezpoz.impl.Indexer6' less than -source '1.7'
      Note: org.jenkinsci.plugins.mailer2.Mailer2Publisher.DESCRIPTOR indexed under hudson.Extension
      C:\Users\USER\.m2\repository\org\jenkins-ci\main\jenkins-core\1.447\jenkins-core-1.447.jar(jenkins/model/Jenkins.class): warning: Cannot find annotation metho
      d 'value()' in type 'SuppressWarnings': class file for edu.umd.cs.findbugs.annotations.SuppressWarnings not found
      C:\Users\USER\.m2\repository\org\jenkins-ci\main\jenkins-core\1.447\jenkins-core-1.447.jar(jenkins/model/Jenkins.class): warning: Cannot find annotation metho
      d 'value()' in type 'SuppressWarnings'
      C:\Users\USER\.m2\repository\org\jenkins-ci\main\jenkins-core\1.447\jenkins-core-1.447.jar(jenkins/model/Jenkins.class): warning: Cannot find annotation metho
      d 'value()' in type 'SuppressWarnings': class file for edu.umd.cs.findbugs.annotations.SuppressWarnings not found
      C:\Users\USER\.m2\repository\org\jenkins-ci\main\jenkins-core\1.447\jenkins-core-1.447.jar(jenkins/model/Jenkins.class): warning: Cannot find annotation metho
      d 'value()' in type 'SuppressWarnings'

          [JENKINS-14400] Warnings when using gradle to build plugin

          Here are two types of warnings.

          1)

          warning: Supported source version 'RELEASE_6' from annotation processor 'jenkins.PluginSubtypeMarker' less than -source '1.7'
          

          This is logged because the annotation processors used by Jenkins claim to be compatible with Java 6 only and you are compiling with Java 7. It should go away when compiling with Java 6. You could also set the sourceCompatibility/targetCompatibility settings to 1.6, but then you get another warning:

          warning: [options] bootstrap class path not set in conjunction with -source 1.6
          

          It will eventually go away when Jenkins and all libraries drop Java 6 support.

          2)

          C:\Users\USER\.m2\repository\org\jenkins-ci\main\jenkins-core\1.447\jenkins-core-1.447.jar(jenkins/model/Jenkins.class): warning: Cannot find annotation method 'value()' in type 'SuppressWarnings': class file for edu.umd.cs.findbugs.annotations.SuppressWarnings not found
          

          This is logged because the findbugs annotations library seems to be missing on the classpath. Jenkins core declares that dependency as provided, so the Gradle JPI plugin should probably add that.

          Daniel Spilker added a comment - Here are two types of warnings. 1) warning: Supported source version 'RELEASE_6' from annotation processor 'jenkins.PluginSubtypeMarker' less than -source '1.7' This is logged because the annotation processors used by Jenkins claim to be compatible with Java 6 only and you are compiling with Java 7. It should go away when compiling with Java 6. You could also set the sourceCompatibility/targetCompatibility settings to 1.6, but then you get another warning: warning: [options] bootstrap class path not set in conjunction with -source 1.6 It will eventually go away when Jenkins and all libraries drop Java 6 support. 2) C:\Users\USER\.m2\repository\org\jenkins-ci\main\jenkins-core\1.447\jenkins-core-1.447.jar(jenkins/model/Jenkins.class): warning: Cannot find annotation method 'value()' in type 'SuppressWarnings' : class file for edu.umd.cs.findbugs.annotations.SuppressWarnings not found This is logged because the findbugs annotations library seems to be missing on the classpath. Jenkins core declares that dependency as provided, so the Gradle JPI plugin should probably add that.

          The next release will contain a fix:
          https://github.com/jenkinsci/gradle-jpi-plugin/pull/30

          Daniel Spilker added a comment - The next release will contain a fix: https://github.com/jenkinsci/gradle-jpi-plugin/pull/30

          Code changed in jenkins
          User: Daniel Spilker
          Path:
          CHANGELOG.md
          src/main/groovy/org/jenkinsci/gradle/plugins/jpi/JpiExtension.groovy
          src/test/groovy/org/jenkinsci/gradle/plugins/jpi/JpiExtensionSpec.groovy
          http://jenkins-ci.org/commit/gradle-jpi-plugin/028bbac70277b5e041405b1b75b2b09e490eec37
          Log:
          added findbugs:annotations:1.0.0 to jenkinsCore configuration to avoid compiler warnings, JENKINS-14400

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Daniel Spilker Path: CHANGELOG.md src/main/groovy/org/jenkinsci/gradle/plugins/jpi/JpiExtension.groovy src/test/groovy/org/jenkinsci/gradle/plugins/jpi/JpiExtensionSpec.groovy http://jenkins-ci.org/commit/gradle-jpi-plugin/028bbac70277b5e041405b1b75b2b09e490eec37 Log: added findbugs:annotations:1.0.0 to jenkinsCore configuration to avoid compiler warnings, JENKINS-14400

          Code changed in jenkins
          User: Daniel Spilker
          Path:
          CHANGELOG.md
          src/main/groovy/org/jenkinsci/gradle/plugins/jpi/JpiExtension.groovy
          src/test/groovy/org/jenkinsci/gradle/plugins/jpi/JpiExtensionSpec.groovy
          http://jenkins-ci.org/commit/gradle-jpi-plugin/292b8af0c0444598e1a08a0c7ec1be90781dbb45
          Log:
          Merge pull request #30 from daspilker/JENKINS-14400

          JENKINS-14400 added findbugs:annotations:1.0.0 to jenkinsCore configuration

          Compare: https://github.com/jenkinsci/gradle-jpi-plugin/compare/ec170e7775e5...292b8af0c044

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Daniel Spilker Path: CHANGELOG.md src/main/groovy/org/jenkinsci/gradle/plugins/jpi/JpiExtension.groovy src/test/groovy/org/jenkinsci/gradle/plugins/jpi/JpiExtensionSpec.groovy http://jenkins-ci.org/commit/gradle-jpi-plugin/292b8af0c0444598e1a08a0c7ec1be90781dbb45 Log: Merge pull request #30 from daspilker/ JENKINS-14400 JENKINS-14400 added findbugs:annotations:1.0.0 to jenkinsCore configuration Compare: https://github.com/jenkinsci/gradle-jpi-plugin/compare/ec170e7775e5...292b8af0c044

            daspilker Daniel Spilker
            slide_o_mix Alex Earl
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: