Disable withMaven publishers default configuration

1,391 views
Skip to first unread message

nco...@lbisa.com

unread,
Dec 13, 2017, 7:26:28 AM12/13/17
to Jenkins Users
Hi

Does any one knows what provides and how to disable Maven not to trigger "Maven Publishers with default configuration:" info in Console Output?

If I run the same code on 2 different Jenkins instances, one of them do not have this kind of diferenciation between Maven Publishers set by Default, Global or Pipeline configuration.

Console ouput from my test Jenkins:
[withMaven] Maven Publishers with configuration provided by the pipeline: [org.jenkinsci.plugins.pipeline.maven.publishers.DependenciesFingerprintPublisher[disabled=true, scopes=[compile, provided, runtime], versions={snapshot:true, release:false}], org.jenkinsci.plugins.pipeline.maven.publishers.FindbugsAnalysisPublisher[disabled=true], org.jenkinsci.plugins.pipeline.maven.publishers.GeneratedArtifactsPublisher[disabled=true], org.jenkinsci.plugins.pipeline.maven.publishers.JGivenTestsPublisher[disabled=true], org.jenkinsci.plugins.pipeline.maven.publishers.PipelineGraphPublisher[disabled=true, scopes=[compile, provided, runtime], versions={snapshot:true, release:false}, skipDownstreamTriggers=false, lifecycleThreshold=deploy, ignoreUpstreamTriggers=false], org.jenkinsci.plugins.pipeline.maven.publishers.JunitTestsPublisher[disabled=true], org.jenkinsci.plugins.pipeline.maven.publishers.InvokerRunsPublisher[disabled=true], org.jenkinsci.plugins.pipeline.maven.publishers.TasksScannerPublisher[disabled=true], org.jenkinsci.plugins.pipeline.maven.publishers.ConcordionTestsPublisher[disabled=true]]
[withMaven] Maven Publishers with configuration defined globally: []
[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]]
[withMaven] Use pipeline defined publisher for 'Dependencies Fingerprint Publisher'
[withMaven] Use pipeline defined publisher for 'Findbugs Publisher'
[withMaven] Use pipeline defined publisher for 'Generated Artifacts Publisher'
[withMaven] Use pipeline defined publisher for 'JGiven Publisher'
[withMaven] Use pipeline defined publisher for 'Pipeline Graph Publisher'
[withMaven] Use pipeline defined publisher for 'Invoker Publisher'
[withMaven] Use pipeline defined publisher for 'Junit Publisher'
[withMaven] Use pipeline defined publisher for 'Open Task Scanner Publisher'
[withMaven] Use pipeline defined publisher for 'Concordion Publisher'
[withMaven] Skip 'Generated Artifacts Publisher' disabled by configuration
[withMaven] Skip 'Invoker Publisher' disabled by configuration
[withMaven] Skip 'Junit Publisher' disabled by configuration
[withMaven] Skip 'Concordion Publisher' disabled by configuration
[withMaven] Skip 'Dependencies Fingerprint Publisher' disabled by configuration
[withMaven] Skip 'Findbugs Publisher' disabled by configuration
[withMaven] Skip 'JGiven Publisher' disabled by configuration
[withMaven] Skip 'Pipeline Graph Publisher' disabled by configuration
[withMaven] Skip 'Open Task Scanner Publisher' disabled by configuration

withMaven config:
withMaven(mavenSettingsConfig: "${mvnsettingsid}", options: [
                        openTasksPublisher(disabled: true), 
                        dependenciesFingerprintPublisher(disabled: true), 
                        artifactsPublisher(disabled: true), 
                        junitPublisher(disabled: true), 
                        jgivenPublisher(disabled: true), 
                        invokerPublisher(disabled: true), 
                        findbugsPublisher(disabled: true),
                        concordionPublisher(disabled: true), 
                        pipelineGraphPublisher(disabled: true)
                        ]) { <some code after this>

On the PROD instance, I do not see this entries in console output:
Maven Publishers with configuration provided by the pipeline: [org.jenkinsci.plugins.pipeline.maven.publishers.DependenciesFingerprintPublisher[disabled=true, scopes=[compile, provided, runtime], versions={snapshot:true, release:false}], org.jenkinsci.plugins.pipeline.maven.publishers.FindbugsAnalysisPublisher[disabled=true], org.jenkinsci.plugins.pipeline.maven.publishers.GeneratedArtifactsPublisher[disabled=true], org.jenkinsci.plugins.pipeline.maven.publishers.JGivenTestsPublisher[disabled=true], org.jenkinsci.plugins.pipeline.maven.publishers.PipelineGraphPublisher[disabled=true, scopes=[compile, provided, runtime], versions={snapshot:true, release:false}, skipDownstreamTriggers=false, lifecycleThreshold=deploy, ignoreUpstreamTriggers=false], org.jenkinsci.plugins.pipeline.maven.publishers.JunitTestsPublisher[disabled=true], org.jenkinsci.plugins.pipeline.maven.publishers.InvokerRunsPublisher[disabled=true], org.jenkinsci.plugins.pipeline.maven.publishers.TasksScannerPublisher[disabled=true], org.jenkinsci.plugins.pipeline.maven.publishers.ConcordionTestsPublisher[disabled=true]]
Maven Publishers with configuration defined globally: []
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]]

I only see the skip part:
[withMaven] Skip 'Generated Artifacts Publisher' disabled by configuration
[withMaven] Skip 'Invoker Publisher' disabled by configuration
[withMaven] Skip 'Junit Publisher' disabled by configuration
[withMaven] Skip 'Concordion Publisher' disabled by configuration
[withMaven] Skip 'Dependencies Fingerprint Publisher' disabled by configuration
[withMaven] Skip 'Findbugs Publisher' disabled by configuration
[withMaven] Skip 'JGiven Publisher' disabled by configuration
[withMaven] Skip 'Pipeline Graph Publisher' disabled by configuration
[withMaven] Skip 'Open Task Scanner Publisher' disabled by configuration

Any idea why this happens?

Stephen Connolly

unread,
Dec 13, 2017, 7:41:37 AM12/13/17
to jenkins...@googlegroups.com
Is prod running an older version of the plugin. Disabling is only a recent feature. Also see https://issues.jenkins-ci.org/plugins/servlet/mobile#issue/JENKINS-46785 for a related request about being able to disable default publishers so that options only specifies the ones you want configured.

(I had a moan session at the plugin author earlier today)

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/08fb3ce3-dbed-403e-ad0d-35ca128e62b3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

nco...@lbisa.com

unread,
Dec 13, 2017, 8:53:22 AM12/13/17
to Jenkins Users
Both PROD and test have the same Global Tool Configuration Maven Configuration (defaults and no publishers configured) and are running the same versions of Pipeline Maven Integration (3.0.3).
PROD is on Jenkins 2.92 and test on 2.93, so not sure if that and PROD not restarted after plugin updates could be triggering this difference in behaviour.

Using withEnv(['JENKINS_MAVEN_AGENT_DISABLED=true']) disables all publishers (and all configurantion entries are not seen) except 
[withMaven] pipelineGraphPublisher - triggerDownstreamPipelines
[withMaven] Skip downstream job triggering for upstream build with ignored result status...
...

You still need to disable pipelineGraphPublisher with option pipelineGraphPublisher(disabled: true).
Also, it seems that pipelineGraphPublisher is not in the plugin documentation but is available on Pipeline Syntax snippet generator.

nco...@lbisa.com

unread,
Dec 14, 2017, 5:46:07 AM12/14/17
to Jenkins Users
Just noticed that PROD has a different logger. It is using:
org.jenkinsci.plugins.pipeline.maven.WithMavenStepExecution

and test was using:
org.jenkinsci.plugins.pipeline.maven

Both were set to log level ALL.
After set test instance to use the same logger, the output are similar in both instances.

Additionally, tested remove the logger from test and seems that the default console output is the same as:
org.jenkinsci.plugins.pipeline.maven.WithMavenStepExecution

Cyrille Le Clerc

unread,
Dec 14, 2017, 6:53:50 PM12/14/17
to Jenkins Users
Hello,

You had enabled logging on your test master and we display in the build logs the logs of the plugin, this is why you had these messages on your test masters.

You can disable globally publishers through the Global Tools Configuration screen.

The message may not be intuitive but here is what happened:
  • "Use pipeline defined publisher for 'Findbugs Publisher'" --> the config of the findbugs publisher is defined in the pipeline, in "withMaven(options:[findbugsPublisher(...)]"
  • "Skip 'Findbugs Publisher' disabled by configuration" --> the Findbugs Publisher is disabled
  • "pipelineGraphPublisher - triggerDownstreamPipelines" --> even if you disable the "pipelineGraphPublisher" by configuration, we have a listener of the pipeline build completion to decide if we trigger downstream pipelines. We need to wait for the completion of the build because the downstream pipeline trigger strategy is based on the result of the upstream build, you probably don't want to trigger downstream pipelines if your build failed.
Stephen Connolly mentioned another use case:disabling all the publishers unless they are explicitly enabled in the pipeline ("withMaven(options:[myPublisher(enabled: true])"). James Nord had created a while ago the RFE JENKINS-46785 add a way to disable all reporters (and selectively enable a few).
If have started to work on it with https://github.com/jenkinsci/pipeline-maven-plugin/pull/116 and James validated the user Experience. I'll provide details later.

Did this clarify your messages?

Cyrille 

nco...@lbisa.com

unread,
Dec 20, 2017, 5:11:00 AM12/20/17
to Jenkins Users

Hi Cyrille

Thanks for your clarification.

I now have the TEST and PROD using the same logger (org.jenkinsci.plugins.pipeline.maven.WithMavenStepExecution >> ALL).
Disabling the publishers on Global Tools Configuration screen, the publishers are shown as "Skip ... disabled by configuration" in Console output. Same as using the options from pipeline configuration.

Having the publishers disabled by default would be a better starting point, to avoid extra configuration. I'm now following JENKINS-46785.

I still think that when pipeline-maven auxiliar plugins are not installed, it shouldn't display that information on console log, when using this logger:
org.jenkinsci.plugins.pipeline.maven

On logger output, one can see that the findbugs plugin is not found and jgiven is not even shown here(it should !?). None of them is installed on TEST instance.
Dec 20, 2017 10:40:28 AM FINE org.jenkinsci.plugins.pipeline.maven.publishers.FindbugsAnalysisPublisher
No org.codehaus.mojo:findbugs-maven-plugin:findbugs execution found

On console log, it could mention that they are not installed or even  not shown at all. At the moment, there is no indication that the plugins are not installed.
In case of JGiven, it is not clear (at least for me) if the abort is due to missing jenkins plugin or if the project being built, does not use jgiven. In my understanding, I would assume the latter.
[debug] [withMaven] Run 'Findbugs Publisher'...
[debug] [withMaven] Run 'JGiven Publisher'...
[debug] [withMaven] jgivenPublisher - JGiven not found within your project dependencies, aborting.

Not sure if this input is already being considered (our previsously discarded) but if you think it should have a new bug report open, let me know :)

nco...@lbisa.com

unread,
Jan 15, 2018, 5:51:25 AM1/15/18
to Jenkins Users
I still think that when pipeline-maven auxiliar plugins are not installed, it shouldn't display that information on console log, when using this logger:
org.jenkinsci.plugins.pipeline.maven

On logger output, one can see that the findbugs plugin is not found and jgiven is not even shown here(it should !?). None of them is installed on TEST instance.
Dec 20, 2017 10:40:28 AM FINE org.jenkinsci.plugins.pipeline.maven.publishers.FindbugsAnalysisPublisher
No org.codehaus.mojo:findbugs-maven-plugin:findbugs execution found

On console log, it could mention that they are not installed or even  not shown at all. At the moment, there is no indication that the plugins are not installed.
In case of JGiven, it is not clear (at least for me) if the abort is due to missing jenkins plugin or if the project being built, does not use jgiven. In my understanding, I would assume the latter.
[debug] [withMaven] Run 'Findbugs Publisher'...
[debug] [withMaven] Run 'JGiven Publisher'...
[debug] [withMaven] jgivenPublisher - JGiven not found within your project dependencies, aborting.

Not sure if this input is already being considered (our previsously discarded) but if you think it should have a new bug report open, let me know :)


Issues created for JGiven (JENKINS-48935) and FindBugs (JENKINS-48937) improvements. 
Reply all
Reply to author
Forward
0 new messages