don't show readonly parameters in help
git-svn-id: https://svn.apache.org/repos/asf/maven/plugin-tools/trunk@1342977 13f79535-47bb-0310-9956-ffa450edef68master
parent
b8269c2016
commit
74a8581cc4
|
|
@ -157,9 +157,12 @@ public class PluginDescriptorGenerator
|
||||||
|
|
||||||
GeneratorUtils.element( w, "goalPrefix", pluginDescriptor.getGoalPrefix() );
|
GeneratorUtils.element( w, "goalPrefix", pluginDescriptor.getGoalPrefix() );
|
||||||
|
|
||||||
GeneratorUtils.element( w, "isolatedRealm", String.valueOf( pluginDescriptor.isIsolatedRealm() ) );
|
if ( !helpDescriptor )
|
||||||
|
{
|
||||||
|
GeneratorUtils.element( w, "isolatedRealm", String.valueOf( pluginDescriptor.isIsolatedRealm() ) );
|
||||||
|
|
||||||
GeneratorUtils.element( w, "inheritedByDefault", String.valueOf( pluginDescriptor.isInheritedByDefault() ) );
|
GeneratorUtils.element( w, "inheritedByDefault", String.valueOf( pluginDescriptor.isInheritedByDefault() ) );
|
||||||
|
}
|
||||||
|
|
||||||
w.startElement( "mojos" );
|
w.startElement( "mojos" );
|
||||||
|
|
||||||
|
|
@ -174,7 +177,10 @@ public class PluginDescriptorGenerator
|
||||||
|
|
||||||
w.endElement();
|
w.endElement();
|
||||||
|
|
||||||
GeneratorUtils.writeDependencies( w, pluginDescriptor );
|
if ( !helpDescriptor )
|
||||||
|
{
|
||||||
|
GeneratorUtils.writeDependencies( w, pluginDescriptor );
|
||||||
|
}
|
||||||
|
|
||||||
w.endElement();
|
w.endElement();
|
||||||
|
|
||||||
|
|
@ -434,7 +440,7 @@ public class PluginDescriptorGenerator
|
||||||
{
|
{
|
||||||
requirements.put( parameter.getName(), parameter.getRequirement() );
|
requirements.put( parameter.getName(), parameter.getRequirement() );
|
||||||
}
|
}
|
||||||
else
|
else if ( !helpDescriptor || parameter.isEditable() ) // don't show readonly parameters in help
|
||||||
{
|
{
|
||||||
// treat it as a normal parameter.
|
// treat it as a normal parameter.
|
||||||
|
|
||||||
|
|
@ -496,6 +502,12 @@ public class PluginDescriptorGenerator
|
||||||
|
|
||||||
for ( Parameter parameter : configuration )
|
for ( Parameter parameter : configuration )
|
||||||
{
|
{
|
||||||
|
if ( helpDescriptor && !parameter.isEditable() )
|
||||||
|
{
|
||||||
|
// don't show readonly parameters in help
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
w.startElement( parameter.getName() );
|
w.startElement( parameter.getName() );
|
||||||
|
|
||||||
String type = parameter.getType();
|
String type = parameter.getType();
|
||||||
|
|
@ -524,7 +536,7 @@ public class PluginDescriptorGenerator
|
||||||
// Requirements
|
// Requirements
|
||||||
// ----------------------------------------------------------------------
|
// ----------------------------------------------------------------------
|
||||||
|
|
||||||
if ( !requirements.isEmpty() )
|
if ( !requirements.isEmpty() && !helpDescriptor )
|
||||||
{
|
{
|
||||||
w.startElement( "requirements" );
|
w.startElement( "requirements" );
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue