[MPLUGIN-274] fixed style errors in generated HelpMojo source

git-svn-id: https://svn.apache.org/repos/asf/maven/plugin-tools/trunk@1628556 13f79535-47bb-0310-9956-ffa450edef68
master
Herve Boutemy 2014-09-30 21:45:16 +00:00
parent 045ab59621
commit 7bc6873931
1 changed files with 8 additions and 5 deletions

View File

@ -105,7 +105,10 @@ public class HelpMojo
private int indentSize;
// groupId/artifactId/plugin-help.xml
private static final String PLUGIN_HELP_PATH = "/${pluginHelpPath}";
private static final String PLUGIN_HELP_PATH =
"/${pluginHelpPath}";
private static final int DEFAULT_LINE_LENGTH = 80;
private Document build()
throws MojoExecutionException
@ -156,7 +159,7 @@ public class HelpMojo
if ( lineLength <= 0 )
{
getLog().warn( "The parameter 'lineLength' should be positive, using '80' as default." );
lineLength = 80;
lineLength = DEFAULT_LINE_LENGTH;
}
if ( indentSize <= 0 )
{
@ -277,7 +280,7 @@ public class HelpMojo
{
String mojoGoal = getValue( mojo, "goal" );
Node configurationElement = findSingleChild( mojo, "configuration" );
Node description = findSingleChild( mojo, "description" );
Node description = findSingleChild( mojo, "description" );
if ( goal == null || goal.length() <= 0 || mojoGoal.equals( goal ) )
{
append( sb, goalPrefix + ":" + mojoGoal, 0 );
@ -318,7 +321,7 @@ public class HelpMojo
String parameterName = getValue( parameter, "name" );
String parameterDescription = getValue( parameter, "description" );
Element fieldConfigurationElement = (Element)findSingleChild( configurationElement, parameterName );
Element fieldConfigurationElement = (Element) findSingleChild( configurationElement, parameterName );
String parameterDefaultValue = "";
if ( fieldConfigurationElement != null && fieldConfigurationElement.hasAttribute( "default-value" ) )
@ -339,7 +342,7 @@ public class HelpMojo
}
if ( ( fieldConfigurationElement != null ) && isNotEmpty( fieldConfigurationElement.getTextContent() ) )
{
String property = getPropertyFromExpression( fieldConfigurationElement.getTextContent() );
String property = getPropertyFromExpression( fieldConfigurationElement.getTextContent() );
append( sb, "User property: " + property, 3 );
}