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

Clearer findbugs publisher console output when findbugs plugin is not installed

XMLWordPrintable

    • Icon: Improvement Improvement
    • Resolution: Fixed
    • Icon: Minor Minor
    • pipeline-maven-plugin
    • None
    • Jenkins 2.97, pipeline-maven-plugin 3.2.0 alpha-2
    • pipeline-maven-3.11.0

      When using logger org.jenkinsci.plugins.pipeline.maven with log level ALL, findbugs related output shows it is running findbugs, even if the plugin is not installed.
      If the run entry is shown in the log, it should have an additional entry informing that the plugin is not installed.

      ...
      [withMaven] Maven Publishers with default configuration: [org.jenkinsci.plugins.pipeline.maven.publishers.DependenciesFingerprintPublisher[disabled=false, scopes=[compile, provided, runtime], versions={snapshot:true, release:false}], org.jenkinsci.plugins.pipeline.maven.publishers.FindbugsAnalysisPublisher[disabled=false],
      ...
      [withMaven] Use default defined publisher for 'Findbugs Publisher'
      ...
      [withMaven] Run 'Findbugs Publisher'...
      ...
      

      On logger console (Manage Jenkins >> System Log >> "Your Maven Logger" >> Log Records), we can see an entry that the plugin does not exist.

      ...
      Jan 15, 2018 10:37:58 AM FINE org.jenkinsci.plugins.pipeline.maven.publishers.FindbugsAnalysisPublisher
      
      No org.codehaus.mojo:findbugs-maven-plugin:findbugs execution found
      ...
      

      Tested with petclinic project.

      def dockerImage = 'maven'
      currentBuild.displayName = "#${currentBuild.number} ${dockerImage}"
      
      node('docker') {
          deleteDir()
          stage('build') {
              myimage = docker.image("${dockerImage}")
              myimage.inside() {
                  checkout scm
                  withMaven(){
                      sh "mvn clean package"
                  }
              }
          }
      }
      

      Tip:
      Open Task Scanner publisher informs that the plugin is not installed.

      ...
      [withMaven] Run 'Open Task Scanner Publisher'...
      [withMaven] Jenkins Task Scanner Plugin not found, don't display results of source code scanning for 'TODO' and 'FIXME' in pipeline screen.
      ...
      

            bguerin Benoit
            ncosta Nuno Costa
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: