[JIRA] (JENKINS-38078) Pipeline withMaven fail build parameters and profile

3 views
Skip to first unread message

david.m.beer@googlemail.com (JIRA)

unread,
Sep 8, 2016, 6:29:02 PM9/8/16
to jenkinsc...@googlegroups.com
David Beer created an issue
 
Jenkins / Bug JENKINS-38078
Pipeline withMaven fail build parameters and profile
Issue Type: Bug Bug
Assignee: Jesse Glick
Components: pipeline, pipeline-maven-plugin
Created: 2016/Sep/08 10:28 PM
Priority: Major Major
Reporter: David Beer

Pipeline groovy script fails when using build parameters and trying to run mvn -P for profile builds.

pipeline snippet:
stage 'Maven clean test install'
def mvnHome = tool '3.0.5'

sh "$

{mvnHome}

/bin/mvn -Pdeployment clean install deploy"

Fails with the following exception:
[INFO] Total time: 4.196s
[INFO] Finished at: Thu Sep 08 23:27:16 BST 2016
[INFO] Final Memory: 17M/214M
[INFO] ------------------------------------------------------------------------
[ERROR] Internal error: java.lang.NullPointerException -> [Help 1]
org.apache.maven.InternalErrorException: Internal error: java.lang.NullPointerException
at org.apache.maven.lifecycle.internal.BuilderCommon.handleBuildError(BuilderCommon.java:128)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:95)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:320)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:141)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)
Caused by: java.lang.NullPointerException
at org.codehaus.plexus.component.configurator.converters.ComponentValueSetter.configure(ComponentValueSetter.java:348)
at org.codehaus.plexus.component.configurator.converters.composite.ObjectWithFieldsConverter.processConfiguration(ObjectWithFieldsConverter.java:161)
at org.codehaus.plexus.component.configurator.converters.composite.ObjectWithFieldsConverter.fromConfiguration(ObjectWithFieldsConverter.java:89)
at org.codehaus.plexus.component.configurator.converters.ComponentValueSetter.configure(ComponentValueSetter.java:295)
at org.codehaus.plexus.component.configurator.converters.composite.ObjectWithFieldsConverter.processConfiguration(ObjectWithFieldsConverter.java:161)
at org.codehaus.plexus.component.configurator.BasicComponentConfigurator.configureComponent(BasicComponentConfigurator.java:56)
at org.apache.maven.plugin.internal.DefaultMavenPluginManager.populatePluginFields(DefaultMavenPluginManager.java:567)
at org.apache.maven.plugin.internal.DefaultMavenPluginManager.getConfiguredMojo(DefaultMavenPluginManager.java:529)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:92)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
... 16 more

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

alobato@cloudbees.com (JIRA)

unread,
Oct 5, 2016, 12:02:03 PM10/5/16
to jenkinsc...@googlegroups.com
Alvaro Lobato commented on Bug JENKINS-38078
 
Re: Pipeline withMaven fail build parameters and profile

David Beer You are not using withMaven on that snipped. I'm removing the component, as it is not related to withMaven.

alobato@cloudbees.com (JIRA)

unread,
Oct 5, 2016, 12:03:03 PM10/5/16
to jenkinsc...@googlegroups.com
Alvaro Lobato updated an issue
 
Pipeline with Maven fail build parameters and profile
Change By: Alvaro Lobato
Component/s: pipeline-maven-plugin

alobato@cloudbees.com (JIRA)

unread,
Oct 5, 2016, 12:03:03 PM10/5/16
to jenkinsc...@googlegroups.com
Alvaro Lobato updated an issue
Change By: Alvaro Lobato
Summary: Pipeline withMaven with Maven fail build parameters and profile

jglick@cloudbees.com (JIRA)

unread,
Oct 5, 2016, 2:16:01 PM10/5/16
to jenkinsc...@googlegroups.com
Jesse Glick resolved as Not A Defect
 

Looks like a bug in Maven. Try using a current version.

Change By: Jesse Glick
Status: Open Resolved
Resolution: Not A Defect
Reply all
Reply to author
Forward
0 new messages