[JIRA] (JENKINS-40792) Pipeline Maven fails when configured to use settings.xml from config file provider

5 views
Skip to first unread message

rfikree@gmail.com (JIRA)

unread,
Jan 3, 2017, 8:06:01 PM1/3/17
to jenkinsc...@googlegroups.com
Reza Fikree created an issue
 
Jenkins / Bug JENKINS-40792
Pipeline Maven fails when configured to use settings.xml from config file provider
Issue Type: Bug Bug
Assignee: Alvaro Lobato
Components: pipeline-maven-plugin
Created: 2017/Jan/04 1:05 AM
Environment: Linux RHEL 7.3
Windows 10
Priority: Blocker Blocker
Reporter: Reza Fikree

Pipeline Example

Unable to find source-code formatter for language: groovy. Available languages are: actionscript, html, java, javascript, none, sql, xhtml, xml
node('master') {
    stage('Checkout') {
        git(
                url: 'git@-------------:pipeline/pipeline-java.git',
                branch: 'develop'
        )
    }
    stage('Build') {
        withMaven(jdk: 'jdk_8u112', maven: 'M3', mavenSettingsConfig: '219cf7fb-31d1-4b7f-b96b-7b65567b49f5') {
            sh("mvn clean -f Test1/pom.xml")
        }
    }
}

With latest version 0.5 maven build fails with error:

java.lang.NoSuchMethodError: org.jenkinsci.lib.configprovider.model.Config.getByIdOrNull(Ljava/lang/String;)Lorg/jenkinsci/lib/configprovider/model/Config;
	at org.jenkinsci.plugins.pipeline.maven.WithMavenStepExecution.settingsFromConfig(WithMavenStepExecution.java:525)
	at org.jenkinsci.plugins.pipeline.maven.WithMavenStepExecution.setupSettingFile(WithMavenStepExecution.java:453)
	at org.jenkinsci.plugins.pipeline.maven.WithMavenStepExecution.setupMaven(WithMavenStepExecution.java:219)
	at org.jenkinsci.plugins.pipeline.maven.WithMavenStepExecution.start(WithMavenStepExecution.java:138)
	at org.jenkinsci.plugins.workflow.cps.DSL.invokeStep(DSL.java:184)
	at org.jenkinsci.plugins.workflow.cps.DSL.invokeMethod(DSL.java:126)
	at org.jenkinsci.plugins.workflow.cps.CpsScript.invokeMethod(CpsScript.java:108)
	at groovy.lang.GroovyObject$invokeMethod.call(Unknown Source)
	at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:48)
	at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:113)
	at org.kohsuke.groovy.sandbox.impl.Checker$1.call(Checker.java:151)
	at org.kohsuke.groovy.sandbox.GroovyInterceptor.onMethodCall(GroovyInterceptor.java:21)

Downgrade to version 0.4 and build is successful

Add Comment Add Comment
 
This message was sent by Atlassian JIRA (v7.1.7#71011-sha1:2526d7c)
Atlassian logo

rfikree@gmail.com (JIRA)

unread,
Jan 4, 2017, 9:33:02 AM1/4/17
to jenkinsc...@googlegroups.com
Reza Fikree updated an issue
Change By: Reza Fikree
h3. Pipeline Example

{code:
groovy java }

node('master') {
    stage('Checkout') {
        git(
                url: 'git@-------------:pipeline/pipeline-java.git',
                branch: 'develop'
        )
    }
    stage('Build') {
        withMaven(jdk: 'jdk_8u112', maven: 'M3', mavenSettingsConfig: '219cf7fb-31d1-4b7f-b96b-7b65567b49f5') {
            sh("mvn clean -f Test1/pom.xml")
        }
    }
}
{code}
----

With latest version 0.5 maven build fails with error:


{code:java}

java.lang.NoSuchMethodError: org.jenkinsci.lib.configprovider.model.Config.getByIdOrNull(Ljava/lang/String;)Lorg/jenkinsci/lib/configprovider/model/Config;
at org.jenkinsci.plugins.pipeline.maven.WithMavenStepExecution.settingsFromConfig(WithMavenStepExecution.java:525)
at org.jenkinsci.plugins.pipeline.maven.WithMavenStepExecution.setupSettingFile(WithMavenStepExecution.java:453)
at org.jenkinsci.plugins.pipeline.maven.WithMavenStepExecution.setupMaven(WithMavenStepExecution.java:219)
at org.jenkinsci.plugins.pipeline.maven.WithMavenStepExecution.start(WithMavenStepExecution.java:138)
at org.jenkinsci.plugins.workflow.cps.DSL.invokeStep(DSL.java:184)
at org.jenkinsci.plugins.workflow.cps.DSL.invokeMethod(DSL.java:126)
at org.jenkinsci.plugins.workflow.cps.CpsScript.invokeMethod(CpsScript.java:108)
at groovy.lang.GroovyObject$invokeMethod.call(Unknown Source)
at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:48)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:113)
at org.kohsuke.groovy.sandbox.impl.Checker$1.call(Checker.java:151)
at org.kohsuke.groovy.sandbox.GroovyInterceptor.onMethodCall(GroovyInterceptor.java:21)
{code}


Downgrade to version 0.4 and build is successful

alobato@cloudbees.com (JIRA)

unread,
Jan 9, 2017, 4:18:01 AM1/9/17
to jenkinsc...@googlegroups.com
Alvaro Lobato commented on Bug JENKINS-40792
 
Re: Pipeline Maven fails when configured to use settings.xml from config file provider

What version of config-file-provider do you have installed?

cleclerc@cloudbees.com (JIRA)

unread,
Jan 23, 2017, 8:36:01 AM1/23/17
to jenkinsc...@googlegroups.com

Can you please test with config-file-provider 2.15.1 and pipeline-maven-plugin 0.5 ?

alobato@cloudbees.com (JIRA)

unread,
Mar 5, 2017, 1:11:01 PM3/5/17
to jenkinsc...@googlegroups.com
Alvaro Lobato closed an issue as Cannot Reproduce
 

Please reopen if it is still happening, and provide the requested information. Thanks.

Change By: Alvaro Lobato
Status: Open Closed
Resolution: Cannot Reproduce
This message was sent by Atlassian JIRA (v7.3.0#73011-sha1:3c73d0e)
Atlassian logo
Reply all
Reply to author
Forward
0 new messages