-
Bug
-
Resolution: Fixed
-
Major
-
None
-
linux hudson running stand-alone, proxied behind apache. Hudson version 1.394, release plugin 0.6.1
We set up a new project and performed a build which succeeded. After that, I scheduled a maven release. it failed with this error:
Found mavenVersion 2.2.1 from file jar:file:/var/lib/hudson/tools/Maven2/lib/maven-2.2.1-uber.jar!/META-INF/maven/org.apache.maven/maven-core/pom.properties
ERROR: Processing failed due to a bug in the code. Please report this to hudson-users@googlegroups.com
java.lang.NullPointerException
at org.jvnet.hudson.plugins.m2release.M2ReleaseBuildWrapper.getReleaseVersion(M2ReleaseBuildWrapper.java:345)
at org.jvnet.hudson.plugins.m2release.M2ReleaseBuildWrapper.setUp(M2ReleaseBuildWrapper.java:161)
at hudson.maven.MavenModuleSetBuild$RunnerImpl.doRun(MavenModuleSetBuild.java:521)
at hudson.model.AbstractBuild$AbstractRunner.run(AbstractBuild.java:417)
at hudson.model.Run.run(Run.java:1362)
at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:405)
at hudson.model.ResourceController.execute(ResourceController.java:88)
at hudson.model.Executor.run(Executor.java:145)
project=hudson.maven.MavenModuleSet@528e75f2[ften-common-ui_3.0_bugfix]
project.getModules()=[hudson.maven.MavenModule@63d8f452[ften-common-ui_3.0_bugfix/com.ften.ui:ften-common-ui][ften-common-ui_3.0_bugfix/com.ften.ui:ften-common-ui][relativePath:]]
project.getRootModule()=null
FATAL: null
This error may have been because we switched from one shared repository to a separate repository for each project. Not sure. But that's not why I'm creating this issue.
What happened is that the maven goals for the project changed from what they were to the maven release goals. - release:clean release:prepare release:perform.
I suspect that the code to revert the goals to what they were needs to be wrapped in a finally block to ensure that regardless of what happens, the goals are reverted to their original state.
Ironically, the next build actually did a successful release:clean release:prepare release:perform. edit the successful release was because the goals were changed. I didn't invoke the release plugin.
This relates to the m2release plugin, not the release plugin. I am reassigning it that component.