[MPLUGIN-117] Emphasize goal/parameter deprecation
git-svn-id: https://svn.apache.org/repos/asf/maven/plugin-tools/trunk@657607 13f79535-47bb-0310-9956-ffa450edef68master
parent
a28cef0e4b
commit
86aa89d224
|
|
@ -322,20 +322,20 @@ public class PluginReport
|
|||
*/
|
||||
String goalDocumentationLink = "./" + mojo.getGoal() + "-mojo.html";
|
||||
|
||||
String description = mojo.getDescription();
|
||||
if ( StringUtils.isEmpty( description ) )
|
||||
String description;
|
||||
if ( StringUtils.isNotEmpty( mojo.getDeprecated() ) )
|
||||
{
|
||||
description = getBundle( locale ).getString( "report.plugin.goal.nodescription" );
|
||||
description =
|
||||
"<strong>" + getBundle( locale ).getString( "report.plugin.goal.deprecated" ) + "</strong> "
|
||||
+ PluginUtils.makeHtmlValid( mojo.getDeprecated() );
|
||||
}
|
||||
else if ( StringUtils.isNotEmpty( mojo.getDescription() ) )
|
||||
{
|
||||
description = PluginUtils.makeHtmlValid( mojo.getDescription() );
|
||||
}
|
||||
else
|
||||
{
|
||||
description = PluginUtils.makeHtmlValid( description );
|
||||
}
|
||||
|
||||
String deprecated = mojo.getDeprecated();
|
||||
if ( StringUtils.isNotEmpty( deprecated ) )
|
||||
{
|
||||
description = "<strong>" + getBundle( locale ).getString( "report.plugin.goal.deprecated" ) + "</strong> " + description;
|
||||
description = getBundle( locale ).getString( "report.plugin.goal.nodescription" );
|
||||
}
|
||||
|
||||
sink.tableRow();
|
||||
|
|
|
|||
|
|
@ -168,20 +168,30 @@ public class PluginXdocGenerator
|
|||
+ mojoDescriptor.getPluginDescriptor().getVersion() + ":" + mojoDescriptor.getGoal() );
|
||||
w.endElement(); //p
|
||||
|
||||
if ( StringUtils.isNotEmpty( mojoDescriptor.getDeprecated() ) )
|
||||
{
|
||||
w.startElement( "p" );
|
||||
w.writeMarkup( "<strong>" + getBundle( locale ).getString( "pluginxdoc.mojodescriptor.deprecated" )
|
||||
+ "</strong>:" );
|
||||
w.endElement(); // p
|
||||
w.startElement( "div" );
|
||||
w.writeMarkup( PluginUtils.makeHtmlValid( mojoDescriptor.getDeprecated() ) );
|
||||
w.endElement(); // div
|
||||
}
|
||||
|
||||
w.startElement( "p" );
|
||||
w.writeMarkup( "<strong>"+ getBundle( locale ).getString( "pluginxdoc.description" ) + "</strong>:" );
|
||||
w.endElement(); //p
|
||||
|
||||
w.startElement( "div" );
|
||||
if ( StringUtils.isNotEmpty( mojoDescriptor.getDescription() ) )
|
||||
{
|
||||
w.writeMarkup( PluginUtils.makeHtmlValid( mojoDescriptor.getDescription() ) );
|
||||
}
|
||||
else
|
||||
{
|
||||
w.startElement( "p" );
|
||||
w.writeText( getBundle( locale ).getString( "pluginxdoc.nodescription" ) );
|
||||
w.endElement(); // p
|
||||
}
|
||||
w.endElement(); // div
|
||||
|
||||
writeGoalAttributes( mojoDescriptor, w );
|
||||
|
||||
|
|
@ -214,13 +224,7 @@ public class PluginXdocGenerator
|
|||
|
||||
w.startElement( "ul" );
|
||||
|
||||
String value = mojoDescriptor.getDeprecated();
|
||||
if ( StringUtils.isNotEmpty( value ) )
|
||||
{
|
||||
w.startElement( "li" );
|
||||
w.writeMarkup( getBundle( locale ).getString( "pluginxdoc.mojodescriptor.deprecated" ) + ": " + value + "." );
|
||||
w.endElement(); //li
|
||||
}
|
||||
String value;
|
||||
|
||||
if ( mojoDescriptor.isProjectRequired() )
|
||||
{
|
||||
|
|
@ -374,21 +378,28 @@ public class PluginXdocGenerator
|
|||
w.writeMarkup( "<strong><a name=\"" + parameter.getName() + "\">" + parameter.getName() + "</a>:</strong>" );
|
||||
w.endElement(); //p
|
||||
|
||||
if ( StringUtils.isNotEmpty( parameter.getDeprecated() ) )
|
||||
{
|
||||
w.startElement( "div" );
|
||||
w.writeMarkup( "<strong>"
|
||||
+ getBundle( locale ).getString( "pluginxdoc.mojodescriptor.parameter.deprecated" ) + ".</strong> "
|
||||
+ PluginUtils.makeHtmlValid( parameter.getDeprecated() ) );
|
||||
w.endElement(); // div
|
||||
}
|
||||
|
||||
w.startElement( "div" );
|
||||
if ( StringUtils.isNotEmpty( parameter.getDescription() ) )
|
||||
{
|
||||
w.writeMarkup( PluginUtils.makeHtmlValid( parameter.getDescription() ) );
|
||||
}
|
||||
else
|
||||
{
|
||||
w.startElement( "p" );
|
||||
w.writeMarkup( getBundle( locale ).getString( "pluginxdoc.nodescription" ) );
|
||||
w.endElement(); // p
|
||||
}
|
||||
w.endElement(); // div
|
||||
|
||||
w.startElement( "ul" );
|
||||
|
||||
writeDetail( getBundle( locale ).getString( "pluginxdoc.mojodescriptor.parameter.deprecated" ), parameter.getDeprecated(), w );
|
||||
|
||||
writeDetail( getBundle( locale ).getString( "pluginxdoc.mojodescriptor.parameter.type" ), parameter.getType(), w );
|
||||
|
||||
if ( StringUtils.isNotEmpty( parameter.getSince() ) )
|
||||
|
|
@ -508,18 +519,20 @@ public class PluginXdocGenerator
|
|||
}
|
||||
w.endElement();//td
|
||||
w.startElement( "td" );
|
||||
String description = parameter.getDescription();
|
||||
if ( StringUtils.isEmpty( description ) )
|
||||
String description;
|
||||
if ( StringUtils.isNotEmpty( parameter.getDeprecated() ) )
|
||||
{
|
||||
description = getBundle( locale ).getString( "pluginxdoc.nodescription" );
|
||||
description =
|
||||
"<strong>" + getBundle( locale ).getString( "pluginxdoc.mojodescriptor.parameter.deprecated" )
|
||||
+ ".</strong> " + PluginUtils.makeHtmlValid( parameter.getDeprecated() );
|
||||
}
|
||||
else if ( StringUtils.isNotEmpty( parameter.getDescription() ) )
|
||||
{
|
||||
description = PluginUtils.makeHtmlValid( parameter.getDescription() );
|
||||
}
|
||||
else
|
||||
{
|
||||
description = PluginUtils.makeHtmlValid( description );
|
||||
}
|
||||
if ( StringUtils.isNotEmpty( parameter.getDeprecated() ) )
|
||||
{
|
||||
description = "<strong>" + getBundle( locale ).getString( "pluginxdoc.mojodescriptor.parameter.deprecated" ) + "</strong>. " + description;
|
||||
description = getBundle( locale ).getString( "pluginxdoc.nodescription" );
|
||||
}
|
||||
w.writeMarkup( description + " " );
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue