[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-ffa450edef68master
parent
224a654684
commit
43877dc10f
|
|
@ -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 );
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue