[MPLUGIN-232] java-basic-annotations IT for maven-plugin-plugin fails due to a missing description-tag in the plugin-help.xml

git-svn-id: https://svn.apache.org/repos/asf/maven/plugin-tools/trunk@1405437 13f79535-47bb-0310-9956-ffa450edef68
master
Robert Scholte 2012-11-03 22:44:28 +00:00
parent 224a654684
commit 43877dc10f
1 changed files with 6 additions and 7 deletions

View File

@ -209,8 +209,7 @@ public class HelpMojo
{
throw new MojoExecutionException( "Multiple " + elementName + " in plugin-help.xml" );
}
Node node1 = namedChild.get( 0 );
return node1;
return namedChild.get( 0 );
}
private List<Node> findNamedChild( Node node, String elementName )
@ -248,7 +247,7 @@ public class HelpMojo
{
String mojoGoal = getValue( mojo, "goal" );
Node configurationElement = findSingleChild( mojo, "configuration" );
Node description = findSingleChild( mojo, "description" );
if ( goal == null || goal.length() <= 0 || mojoGoal.equals( goal ) )
{
append( sb, goalPrefix + ":" + mojoGoal, 0 );
@ -256,15 +255,15 @@ public class HelpMojo
if ( ( deprecated != null ) && isNotEmpty( deprecated.getNodeValue() ) )
{
append( sb, "Deprecated. " + deprecated, 1 );
if ( detail )
if ( detail && description != null )
{
append( sb, "", 0 );
append( sb, getValue( mojo, "description" ), 1 );
append( sb, description.getTextContent(), 1 );
}
}
else
else if (description != null )
{
append( sb, getValue( mojo, "description" ), 1 );
append( sb, description.getTextContent(), 1 );
}
append( sb, "", 0 );