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

Publishers plugins that are not installed shouldn't be called by Pipeline Maven

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • pipeline-maven-plugin
    • None
    • Jenkins 2.93, pipeline-maven 3.0.3

      Using withMaven shows all default publishers on Console Output even if the publisher plugin is not installed.

      I only have JUnit (junit) and Pipeline Maven Integration (pipeline-maven) installed but all  publishers are shown (run!?), creating lots of "noise" in the output.

      [relwithdebinfo] [withMaven]  Evaluate Maven Spy logs: /var/lib/jenkins/workspace/test-build@tmp/withMaven286b7780/maven-spy-20171213-145629-4818544732730429348117.log
      [relwithdebinfo] [withMaven] Maven Publishers with configuration provided by the pipeline: []
      [relwithdebinfo] [withMaven] Maven Publishers with configuration defined globally: []
      [relwithdebinfo] [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], org.jenkinsci.plugins.pipeline.maven.publishers.GeneratedArtifactsPublisher[disabled=false], org.jenkinsci.plugins.pipeline.maven.publishers.JGivenTestsPublisher[disabled=false], org.jenkinsci.plugins.pipeline.maven.publishers.PipelineGraphPublisher[disabled=false, scopes=[compile, provided, runtime], versions={snapshot:true, release:false}, skipDownstreamTriggers=false, lifecycleThreshold=deploy, ignoreUpstreamTriggers=false], org.jenkinsci.plugins.pipeline.maven.publishers.InvokerRunsPublisher[disabled=false], org.jenkinsci.plugins.pipeline.maven.publishers.JunitTestsPublisher[disabled=false], org.jenkinsci.plugins.pipeline.maven.publishers.TasksScannerPublisher[disabled=false], org.jenkinsci.plugins.pipeline.maven.publishers.ConcordionTestsPublisher[disabled=false]]
      [relwithdebinfo] [withMaven] Use default defined publisher for 'Dependencies Fingerprint Publisher'
      [relwithdebinfo] [withMaven] Use default defined publisher for 'Findbugs Publisher'
      [relwithdebinfo] [withMaven] Use default defined publisher for 'Generated Artifacts Publisher'
      [relwithdebinfo] [withMaven] Use default defined publisher for 'JGiven Publisher'
      [relwithdebinfo] [withMaven] Use default defined publisher for 'Pipeline Graph Publisher'
      [relwithdebinfo] [withMaven] Use default defined publisher for 'Invoker Publisher'
      [relwithdebinfo] [withMaven] Use default defined publisher for 'Junit Publisher'
      [relwithdebinfo] [withMaven] Use default defined publisher for 'Open Task Scanner Publisher'
      [relwithdebinfo] [withMaven] Use default defined publisher for 'Concordion Publisher'
      [relwithdebinfo] [withMaven] Run 'Generated Artifacts Publisher'...
      [relwithdebinfo] [withMaven] artifactsPublisher - ...
      ...
      [relwithdebinfo] [withMaven] artifactsPublisher - Archive and fingerprint artifacts {} located in workspace /var/lib/jenkins/workspace/test-build
      [relwithdebinfo] [withMaven] Run 'Invoker Publisher'...
      [relwithdebinfo] [withMaven] invokerPublisher - No org.apache.maven.plugins:maven-invoker-plugin:run execution found
      [relwithdebinfo] [withMaven] Run 'Junit Publisher'...
      [relwithdebinfo] [withMaven] junitPublisher - No org.apache.maven.plugins:maven-surefire-plugin:test execution found
      [relwithdebinfo] [withMaven] junitPublisher - No org.apache.maven.plugins:maven-failsafe-plugin:integration-test execution found
      [relwithdebinfo] [withMaven] Run 'Concordion Publisher'...
      [relwithdebinfo] [withMaven] concordionPublisher - No concordion output dir pattern given, skip.
      [relwithdebinfo] [withMaven] Run 'Dependencies Fingerprint Publisher'...
      [relwithdebinfo] [withMaven] dependenciesFingerprintPublisher - filter: versions[snapshot: true, release: false], scopes:[compile, provided, runtime]
      [relwithdebinfo] [withMaven] Skip fingerprinting release dependency: MavenDependency{...
      ...
      [relwithdebinfo] [withMaven] Run 'Findbugs Publisher'...
      [relwithdebinfo] [withMaven] Run 'JGiven Publisher'...
      [relwithdebinfo] [withMaven] jgivenPublisher - JGiven not found within your project dependencies, aborting.
      [relwithdebinfo] [withMaven] Run 'Pipeline Graph Publisher'...
      [relwithdebinfo] [withMaven] pipelineGraphPublisher - recordDependencies - filter: versions[snapshot: true, release: false], scopes:[compile, provided, runtime]
      ...
      [relwithdebinfo] [withMaven] pipelineGraphPublisher - recordGeneratedArtifacts...
      [relwithdebinfo] [withMaven] pipelineGraphPublisher - Record generated artifact: my_artifact:1.8, version: 1.8, executedLifecyclePhases: [clean, validate, generate-sources, process-sources, process-resources, compile, process-test-sources, process-test-resources, test-compile, test], skipDownstreamTriggers: false, lifecycleThreshold:deploy, file: /var/lib/jenkins/workspace/test-build/pom.xml
      [relwithdebinfo] [withMaven] pipelineGraphPublisher - Record generated artifact: my_artifact:1.8, version: 1.8, executedLifecyclePhases: [clean, validate, generate-sources, process-sources, process-resources, compile, process-test-sources, process-test-resources, test-compile, test], skipDownstreamTriggers: false, lifecycleThreshold:deploy, file: null
      [relwithdebinfo] [withMaven] Run 'Open Task Scanner Publisher'...
      [relwithdebinfo] [withMaven] Jenkins Task Scanner Plugin not found, don't display results of source code scanning for 'TODO' and 'FIXME' in pipeline screen.
      

          [JENKINS-48541] Publishers plugins that are not installed shouldn't be called by Pipeline Maven

          Nuno Costa created issue -
          Nuno Costa made changes -
          Description Original: Using withMaven shows all default publishers on Console Output even if the publisher plugin is not installed.

          I only have JUnit (junit) and Pipeline Maven Integration (pipeline-maven) installed but all  publishers are shown (run!?).
          {code:java}
          [relwithdebinfo] [withMaven] Evaluate Maven Spy logs: /var/lib/jenkins/workspace/test-build@tmp/withMaven286b7780/maven-spy-20171213-145629-4818544732730429348117.log
          [relwithdebinfo] [withMaven] Maven Publishers with configuration provided by the pipeline: []
          [relwithdebinfo] [withMaven] Maven Publishers with configuration defined globally: []
          [relwithdebinfo] [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], org.jenkinsci.plugins.pipeline.maven.publishers.GeneratedArtifactsPublisher[disabled=false], org.jenkinsci.plugins.pipeline.maven.publishers.JGivenTestsPublisher[disabled=false], org.jenkinsci.plugins.pipeline.maven.publishers.PipelineGraphPublisher[disabled=false, scopes=[compile, provided, runtime], versions={snapshot:true, release:false}, skipDownstreamTriggers=false, lifecycleThreshold=deploy, ignoreUpstreamTriggers=false], org.jenkinsci.plugins.pipeline.maven.publishers.InvokerRunsPublisher[disabled=false], org.jenkinsci.plugins.pipeline.maven.publishers.JunitTestsPublisher[disabled=false], org.jenkinsci.plugins.pipeline.maven.publishers.TasksScannerPublisher[disabled=false], org.jenkinsci.plugins.pipeline.maven.publishers.ConcordionTestsPublisher[disabled=false]]
          [relwithdebinfo] [withMaven] Use default defined publisher for 'Dependencies Fingerprint Publisher'
          [relwithdebinfo] [withMaven] Use default defined publisher for 'Findbugs Publisher'
          [relwithdebinfo] [withMaven] Use default defined publisher for 'Generated Artifacts Publisher'
          [relwithdebinfo] [withMaven] Use default defined publisher for 'JGiven Publisher'
          [relwithdebinfo] [withMaven] Use default defined publisher for 'Pipeline Graph Publisher'
          [relwithdebinfo] [withMaven] Use default defined publisher for 'Invoker Publisher'
          [relwithdebinfo] [withMaven] Use default defined publisher for 'Junit Publisher'
          [relwithdebinfo] [withMaven] Use default defined publisher for 'Open Task Scanner Publisher'
          [relwithdebinfo] [withMaven] Use default defined publisher for 'Concordion Publisher'
          [relwithdebinfo] [withMaven] Run 'Generated Artifacts Publisher'...
          [relwithdebinfo] [withMaven] artifactsPublisher - ...
          ...
          [relwithdebinfo] [withMaven] artifactsPublisher - Archive and fingerprint artifacts {} located in workspace /var/lib/jenkins/workspace/test-build
          [relwithdebinfo] [withMaven] Run 'Invoker Publisher'...
          [relwithdebinfo] [withMaven] invokerPublisher - No org.apache.maven.plugins:maven-invoker-plugin:run execution found
          [relwithdebinfo] [withMaven] Run 'Junit Publisher'...
          [relwithdebinfo] [withMaven] junitPublisher - No org.apache.maven.plugins:maven-surefire-plugin:test execution found
          [relwithdebinfo] [withMaven] junitPublisher - No org.apache.maven.plugins:maven-failsafe-plugin:integration-test execution found
          [relwithdebinfo] [withMaven] Run 'Concordion Publisher'...
          [relwithdebinfo] [withMaven] concordionPublisher - No concordion output dir pattern given, skip.
          [relwithdebinfo] [withMaven] Run 'Dependencies Fingerprint Publisher'...
          [relwithdebinfo] [withMaven] dependenciesFingerprintPublisher - filter: versions[snapshot: true, release: false], scopes:[compile, provided, runtime]
          [relwithdebinfo] [withMaven] Skip fingerprinting release dependency: MavenDependency{...
          ...
          [relwithdebinfo] [withMaven] Run 'Findbugs Publisher'...
          [relwithdebinfo] [withMaven] Run 'JGiven Publisher'...
          [relwithdebinfo] [withMaven] jgivenPublisher - JGiven not found within your project dependencies, aborting.
          [relwithdebinfo] [withMaven] Run 'Pipeline Graph Publisher'...
          [relwithdebinfo] [withMaven] pipelineGraphPublisher - recordDependencies - filter: versions[snapshot: true, release: false], scopes:[compile, provided, runtime]
          ...
          [relwithdebinfo] [withMaven] pipelineGraphPublisher - recordGeneratedArtifacts...
          [relwithdebinfo] [withMaven] pipelineGraphPublisher - Record generated artifact: my_artifact:1.8, version: 1.8, executedLifecyclePhases: [clean, validate, generate-sources, process-sources, process-resources, compile, process-test-sources, process-test-resources, test-compile, test], skipDownstreamTriggers: false, lifecycleThreshold:deploy, file: /var/lib/jenkins/workspace/test-build/pom.xml
          [relwithdebinfo] [withMaven] pipelineGraphPublisher - Record generated artifact: my_artifact:1.8, version: 1.8, executedLifecyclePhases: [clean, validate, generate-sources, process-sources, process-resources, compile, process-test-sources, process-test-resources, test-compile, test], skipDownstreamTriggers: false, lifecycleThreshold:deploy, file: null
          [relwithdebinfo] [withMaven] Run 'Open Task Scanner Publisher'...
          [relwithdebinfo] [withMaven] Jenkins Task Scanner Plugin not found, don't display results of source code scanning for 'TODO' and 'FIXME' in pipeline screen.
          {code}
          New: Using withMaven shows all default publishers on Console Output even if the publisher plugin is not installed.

          I only have JUnit (junit) and Pipeline Maven Integration (pipeline-maven) installed but all  publishers are shown (run!?), creating lots of "noise" in the output.
          {code:java}
          [relwithdebinfo] [withMaven] Evaluate Maven Spy logs: /var/lib/jenkins/workspace/test-build@tmp/withMaven286b7780/maven-spy-20171213-145629-4818544732730429348117.log
          [relwithdebinfo] [withMaven] Maven Publishers with configuration provided by the pipeline: []
          [relwithdebinfo] [withMaven] Maven Publishers with configuration defined globally: []
          [relwithdebinfo] [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], org.jenkinsci.plugins.pipeline.maven.publishers.GeneratedArtifactsPublisher[disabled=false], org.jenkinsci.plugins.pipeline.maven.publishers.JGivenTestsPublisher[disabled=false], org.jenkinsci.plugins.pipeline.maven.publishers.PipelineGraphPublisher[disabled=false, scopes=[compile, provided, runtime], versions={snapshot:true, release:false}, skipDownstreamTriggers=false, lifecycleThreshold=deploy, ignoreUpstreamTriggers=false], org.jenkinsci.plugins.pipeline.maven.publishers.InvokerRunsPublisher[disabled=false], org.jenkinsci.plugins.pipeline.maven.publishers.JunitTestsPublisher[disabled=false], org.jenkinsci.plugins.pipeline.maven.publishers.TasksScannerPublisher[disabled=false], org.jenkinsci.plugins.pipeline.maven.publishers.ConcordionTestsPublisher[disabled=false]]
          [relwithdebinfo] [withMaven] Use default defined publisher for 'Dependencies Fingerprint Publisher'
          [relwithdebinfo] [withMaven] Use default defined publisher for 'Findbugs Publisher'
          [relwithdebinfo] [withMaven] Use default defined publisher for 'Generated Artifacts Publisher'
          [relwithdebinfo] [withMaven] Use default defined publisher for 'JGiven Publisher'
          [relwithdebinfo] [withMaven] Use default defined publisher for 'Pipeline Graph Publisher'
          [relwithdebinfo] [withMaven] Use default defined publisher for 'Invoker Publisher'
          [relwithdebinfo] [withMaven] Use default defined publisher for 'Junit Publisher'
          [relwithdebinfo] [withMaven] Use default defined publisher for 'Open Task Scanner Publisher'
          [relwithdebinfo] [withMaven] Use default defined publisher for 'Concordion Publisher'
          [relwithdebinfo] [withMaven] Run 'Generated Artifacts Publisher'...
          [relwithdebinfo] [withMaven] artifactsPublisher - ...
          ...
          [relwithdebinfo] [withMaven] artifactsPublisher - Archive and fingerprint artifacts {} located in workspace /var/lib/jenkins/workspace/test-build
          [relwithdebinfo] [withMaven] Run 'Invoker Publisher'...
          [relwithdebinfo] [withMaven] invokerPublisher - No org.apache.maven.plugins:maven-invoker-plugin:run execution found
          [relwithdebinfo] [withMaven] Run 'Junit Publisher'...
          [relwithdebinfo] [withMaven] junitPublisher - No org.apache.maven.plugins:maven-surefire-plugin:test execution found
          [relwithdebinfo] [withMaven] junitPublisher - No org.apache.maven.plugins:maven-failsafe-plugin:integration-test execution found
          [relwithdebinfo] [withMaven] Run 'Concordion Publisher'...
          [relwithdebinfo] [withMaven] concordionPublisher - No concordion output dir pattern given, skip.
          [relwithdebinfo] [withMaven] Run 'Dependencies Fingerprint Publisher'...
          [relwithdebinfo] [withMaven] dependenciesFingerprintPublisher - filter: versions[snapshot: true, release: false], scopes:[compile, provided, runtime]
          [relwithdebinfo] [withMaven] Skip fingerprinting release dependency: MavenDependency{...
          ...
          [relwithdebinfo] [withMaven] Run 'Findbugs Publisher'...
          [relwithdebinfo] [withMaven] Run 'JGiven Publisher'...
          [relwithdebinfo] [withMaven] jgivenPublisher - JGiven not found within your project dependencies, aborting.
          [relwithdebinfo] [withMaven] Run 'Pipeline Graph Publisher'...
          [relwithdebinfo] [withMaven] pipelineGraphPublisher - recordDependencies - filter: versions[snapshot: true, release: false], scopes:[compile, provided, runtime]
          ...
          [relwithdebinfo] [withMaven] pipelineGraphPublisher - recordGeneratedArtifacts...
          [relwithdebinfo] [withMaven] pipelineGraphPublisher - Record generated artifact: my_artifact:1.8, version: 1.8, executedLifecyclePhases: [clean, validate, generate-sources, process-sources, process-resources, compile, process-test-sources, process-test-resources, test-compile, test], skipDownstreamTriggers: false, lifecycleThreshold:deploy, file: /var/lib/jenkins/workspace/test-build/pom.xml
          [relwithdebinfo] [withMaven] pipelineGraphPublisher - Record generated artifact: my_artifact:1.8, version: 1.8, executedLifecyclePhases: [clean, validate, generate-sources, process-sources, process-resources, compile, process-test-sources, process-test-resources, test-compile, test], skipDownstreamTriggers: false, lifecycleThreshold:deploy, file: null
          [relwithdebinfo] [withMaven] Run 'Open Task Scanner Publisher'...
          [relwithdebinfo] [withMaven] Jenkins Task Scanner Plugin not found, don't display results of source code scanning for 'TODO' and 'FIXME' in pipeline screen.
          {code}

          ncosta can you lower the log level of the package "org.jenkinsci.plugins.pipeline.maven" to INFO? Most of these messages are FINE or FINER messages.
          If this is still too verbose, could you please try to workaround declaring the publishers you don't want with "enabled=false" in the "Global Tools Configuration"

          Cyrille Le Clerc added a comment - ncosta can you lower the log level of the package "org.jenkinsci.plugins.pipeline.maven" to INFO? Most of these messages are FINE or FINER messages. If this is still too verbose, could you please try to workaround declaring the publishers you don't want with "enabled=false" in the "Global Tools Configuration"
          Cyrille Le Clerc made changes -
          Status Original: Open [ 1 ] New: In Progress [ 3 ]
          Cyrille Le Clerc made changes -
          Assignee Original: Alvaro Lobato [ alobato ] New: Cyrille Le Clerc [ cleclerc ]

          Nuno Costa added a comment -

          cleclerc
          Deleting or changing logger from org.jenkinsci.plugins.pipeline.maven to org.jenkinsci.plugins.pipeline.maven.WithMavenStepExecution cuts all the verbose in the console output but Task Scanner is not installed and is still seen:
          Using Log level All.

          [relwithdebinfo] [withMaven] artifactsPublisher - FAILURE to archive pom.xml under ... file not found in workspace /var/lib/jenkins/workspace/...
          [relwithdebinfo] [withMaven] FAILURE to fingerprint ... , file not found
          [relwithdebinfo] [withMaven] Jenkins Task Scanner Plugin not found, don't display results of source code scanning for 'TODO' and 'FIXME' in pipeline screen.
          

          Same output when using INFO log level.

          Using the withMaven pipeline options to manually disable the publishers (disabled: true) works correctly and skip the publishers but they are still shown.

          The failure on the artifactsPublisher and fingerprint seems to try to use a filename that is slightly different from the one that exists in the workplace but that is probably a different issue.

          Nuno Costa added a comment - cleclerc Deleting or changing logger from org.jenkinsci.plugins.pipeline.maven to org.jenkinsci.plugins.pipeline.maven.WithMavenStepExecution cuts all the verbose in the console output but Task Scanner is not installed and is still seen: Using Log level All. [relwithdebinfo] [withMaven] artifactsPublisher - FAILURE to archive pom.xml under ... file not found in workspace / var /lib/jenkins/workspace/... [relwithdebinfo] [withMaven] FAILURE to fingerprint ... , file not found [relwithdebinfo] [withMaven] Jenkins Task Scanner Plugin not found, don 't display results of source code scanning for ' TODO ' and ' FIXME' in pipeline screen. Same output when using INFO log level. Using the withMaven pipeline options to manually disable the publishers (disabled: true) works correctly and skip the publishers but they are still shown. The failure on the artifactsPublisher and fingerprint seems to try to use a filename that is slightly different from the one that exists in the workplace but that is probably a different issue.
          Cyrille Le Clerc made changes -
          Attachment New: Open Task Scanner Publisher - Disable.png [ 40723 ]

          > The failure on the artifactsPublisher and fingerprint seems to try to use a filename that is slightly different from the one that exists in the workplace but that is probably a different issue.

          Did you created a Jira issue?

          > but Task Scanner is not installed and is still seen

          Could you disable the TaskScannerPublisher in "Manage Master / Global Tool Configuration"?

          Cyrille Le Clerc added a comment - > The failure on the artifactsPublisher and fingerprint seems to try to use a filename that is slightly different from the one that exists in the workplace but that is probably a different issue. Did you created a Jira issue? > but Task Scanner is not installed and is still seen Could you disable the TaskScannerPublisher in "Manage Master / Global Tool Configuration"?

          Nuno Costa added a comment -

          > The failure on the artifactsPublisher and fingerprint seems to try to use a filename that is slightly different from the one that exists in the workplace but that is probably a different issue.

          Regarding artifactsPublisher, the issue was that we are using deleteDir() at the end of the pipeline, to avoid disk usage issues on buildserver. After removing deleteDir(), it successfully archived the artifact.

          The fingerprint part, I still can't figure out were the problem relies. I can see the file on .m2/repository/${EXECUTOR_NUMBER} path on the buildserver.
          It is even strange because the file is not a direct dependency mentioned in the main pom file nor the artifact itself. It seems to be a dependency of a dependency.

          > Could you disable the TaskScannerPublisher in "Manage Master / Global Tool Configuration"?

          If I disable using Global Tool Configuration, it still mentioned that is skipping the Task Scanner at the end of the build. Same behaviour as withMaven pipeline options.

          [relwithdebinfo] [withMaven] Skip 'Open Task Scanner Publisher' disabled by configuration
          

          Nuno Costa added a comment - > The failure on the artifactsPublisher and fingerprint seems to try to use a filename that is slightly different from the one that exists in the workplace but that is probably a different issue. Regarding artifactsPublisher , the issue was that we are using deleteDir() at the end of the pipeline, to avoid disk usage issues on buildserver. After removing deleteDir() , it successfully archived the artifact. The fingerprint part, I still can't figure out were the problem relies. I can see the file on .m2/repository/${EXECUTOR_NUMBER } path on the buildserver. It is even strange because the file is not a direct dependency mentioned in the main pom file nor the artifact itself. It seems to be a dependency of a dependency. > Could you disable the TaskScannerPublisher in "Manage Master / Global Tool Configuration"? If I disable using Global Tool Configuration , it still mentioned that is skipping the Task Scanner at the end of the build. Same behaviour as withMaven pipeline options. [relwithdebinfo] [withMaven] Skip 'Open Task Scanner Publisher' disabled by configuration

          ncosta thanks for deep diving in these problems.

          Cyrille Le Clerc added a comment - ncosta thanks for deep diving in these problems. artifactsPublisher --> good catch on the delete fingerprint --> I have never tested with a Maven repository located in " .m2/repository/${EXECUTOR_NUMBER }" Noisy log message: JENKINS-48657 and https://github.com/jenkinsci/pipeline-maven-plugin/pull/117

            cleclerc Cyrille Le Clerc
            ncosta Nuno Costa
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: