Continuum

NullPointer when Releasing without <configuration> node in the maven-release-plugin

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: 1.1-beta-3
  • Fix Version/s: 1.1-beta-4
  • Component/s: Release
  • Labels:
    None
  • Complexity:
    Intermediate
  • Number of attachments :
    1

Description

If a pom file contains following, which is correct:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-release-plugin</artifactId>
</plugin>

In the web ui, choose prepare release, this will cause NullPointerException at:
org.apache.maven.continuum.web.action.ReleasePrepareAction.getReleasePluginParameters(ReleasePrepareAction.java:142)
if ( plugin.getGroupId() != null && plugin.getGroupId().equals( "org.apache.maven.plugins" ) &&
plugin.getArtifactId() != null && plugin.getArtifactId().equals( "maven-release-plugin" ) )
{
Xpp3Dom dom = (Xpp3Dom) plugin.getConfiguration();

line 142 Xpp3Dom configuration = dom.getChild( "releaseLabel" );

Cause:
Since the plugin defines no <configuration> node, plugin.getConfiguration() returns null

Workaround:
add empty <configuration>, for example:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-release-plugin</artifactId>
<configuration>
<!-- empty configuration node when we have nothing to configure, this is needed due a bug in continuum 1.1-beta-3 -->
</configuration>
</plugin>

Activity

Hide
Yudong Wang added a comment -

patch supplied.
it is for continuum-webapp module

Show
Yudong Wang added a comment - patch supplied. it is for continuum-webapp module
Hide
Emmanuel Venisse added a comment -

Applied. Thanks.

Show
Emmanuel Venisse added a comment - Applied. Thanks.

People

Vote (0)
Watch (1)

Dates

  • Created:
    Updated:
    Resolved: