[JIRA] (JENKINS-41596) artifactory release NPE on multi-module project

1 view
Skip to first unread message

andres.march@gmail.com (JIRA)

unread,
Jan 31, 2017, 9:39:01 AM1/31/17
to jenkinsc...@googlegroups.com
Andres March created an issue
 
Jenkins / Bug JENKINS-41596
artifactory release NPE on multi-module project
Issue Type: Bug Bug
Assignee: Eyal Ben Moshe
Components: artifactory-plugin
Created: 2017/Jan/31 2:38 PM
Environment: Jenkins ver. 1.651.3
Artifactory plugin 2.5.0
Linux
Java
Maven 3.x (tried 3.1.0, 3.1.1, 3.3.3)
Priority: Major Major
Reporter: Andres March

Had a working multi-module maven build that was releasing fine to artifactory. Added a new sub-module C that is a dependency of another sub-module A. I already had submodule B that depends upon submodule A. The dependency version was an explicit SNAPSHOT equal to the project version. When using this version, I get an error after the version replace stage that there is still a SNAPSHOT in module A.

[RELEASE] Release build triggered
> git config --get remote.origin.url # timeout=10
> git config core.sparsecheckout # timeout=10
> git checkout -f master
[RELEASE] Changing POMs to release version
[RELEASE] ERROR: Snapshot detected in file '/tmp/mcpjenkins/workspace/commerce_squad/rigel-core/Promote/rigel-dropwizard/pom.xml': com.cimpress.mcp:rigel-logging:4.1.3-SNAPSHOT
B

Not knowing what version replacement logic there is and even though I have this same scheme with another module in the same project, I change the module C version in module A pom to be $

{project.version}

. This led to the NPE below. Tried a whole bunch of other techniques that work with maven release:prepare but nothing works.

[RELEASE] Release build triggered
> git config --get remote.origin.url # timeout=10
> git config core.sparsecheckout # timeout=10
> git checkout -f master
[RELEASE] Changing POMs to release version
Jenkins Artifactory Plugin version: 2.5.0
Parsing POMs
ERROR: Processing failed due to a bug in the code. Please report this to jenkins...@googlegroups.com
java.lang.NullPointerException
at org.jfrog.hudson.release.maven.MavenReleaseWrapper$2.tearDown(MavenReleaseWrapper.java:196)
at hudson.maven.MavenModuleSetBuild$MavenModuleSetBuildExecution.doRun(MavenModuleSetBuild.java:882)
at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:534)
at hudson.model.Run.execute(Run.java:1738)
at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:531)
at hudson.model.ResourceController.execute(ResourceController.java:98)
at hudson.model.Executor.run(Executor.java:410)
project=hudson.maven.MavenModuleSet@58727239[commerce_squad/rigel-core/Promote]
project.getModules()=[hudson.maven.MavenModule@5f3b1b66[commerce_squad/rigel-core/Promote/com.cimpress.mcp:rigel-bom][commerce_squad/rigel-core/Promote/com.cimpress.mcp:rigel-bom][relativePath:rigel-bom], hudson.maven.MavenModule@c99d1cc[commerce_squad/rigel-core/Promote/com.cimpress.mcp:rigel-dropwizard][commerce_squad/rigel-core/Promote/com.cimpress.mcp:rigel-dropwizard][relativePath:rigel-dropwizard], hudson.maven.MavenModule@5006508b[commerce_squad/rigel-core/Promote/com.cimpress.mcp:rigel-example-app][commerce_squad/rigel-core/Promote/com.cimpress.mcp:rigel-example-app][relativePath:rigel-example-app], hudson.maven.MavenModule@6dffab14[commerce_squad/rigel-core/Promote/com.cimpress.mcp:rigel-parent][commerce_squad/rigel-core/Promote/com.cimpress.mcp:rigel-parent][relativePath:], hudson.maven.MavenModule@7f2edf9c[commerce_squad/rigel-core/Promote/com.cimpress.rigel:rigel-core][commerce_squad/rigel-core/Promote/com.cimpress.rigel:rigel-core][relativePath:]]
project.getRootModule()=hudson.maven.MavenModule@6dffab14[commerce_squad/rigel-core/Promote/com.cimpress.mcp:rigel-parent][commerce_squad/rigel-core/Promote/com.cimpress.mcp:rigel-parent][relativePath:]
FATAL: null
java.lang.NullPointerException
at org.jfrog.hudson.release.maven.MavenReleaseWrapper$2.tearDown(MavenReleaseWrapper.java:196)
at hudson.maven.MavenModuleSetBuild$MavenModuleSetBuildExecution.doRun(MavenModuleSetBuild.java:882)
at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:534)
at hudson.model.Run.execute(Run.java:1738)
at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:531)
at hudson.model.ResourceController.execute(ResourceController.java:98)
at hudson.model.Executor.run(Executor.java:410)
Build did not succeed and the project is configured to only push after a successful build, so no pushing will occur.
Skipping sonar analysis due to bad build status FAILURE
Started calculate disk usage of build
Finished Calculation of disk usage of build in 0 seconds
Started calculate disk usage of workspace
Finished Calculation of disk usage of workspace in 0 seconds
> git config --get remote.origin.url # timeout=10
> git config core.sparsecheckout # timeout=10
> git checkout -f master
> git config --get remote.origin.url # timeout=10
[RELEASE] Reverting git working copy (reset --hard)

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

eyalb@jfrog.com (JIRA)

unread,
Jan 31, 2017, 12:25:02 PM1/31/17
to jenkinsc...@googlegroups.com
Eyal Ben Moshe commented on Bug JENKINS-41596
 
Re: artifactory release NPE on multi-module project

Andres March, do you get the same exception with the latest Artifactory Plugin version? (2.9.0)

andres.march@gmail.com (JIRA)

unread,
Feb 1, 2017, 11:36:01 AM2/1/17
to jenkinsc...@googlegroups.com

I requested the admin to update because I knew you would ask. In the meantime, I found that running a normal build before clicking artifactory release staging worked around the issue. I'll downgrade the severity. I'm more familiar with the maven release plugin, so I don't really know how the version number stuff is supposed to work. It appears running the release staging directly would version the poms and release them (when it doesn't fail). While running the normal build just sets the version number and runs maven install.

Either way the NPE is probably not the best response to user error if that's what I had.

andres.march@gmail.com (JIRA)

unread,
Feb 1, 2017, 11:36:01 AM2/1/17
to jenkinsc...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages