[MPLUGIN-207] generate since elements in descriptor
git-svn-id: https://svn.apache.org/repos/asf/maven/plugin-tools/trunk@1343173 13f79535-47bb-0310-9956-ffa450edef68master
parent
12f6d3fe88
commit
a99880200b
|
|
@ -385,6 +385,26 @@ public class PluginDescriptorGenerator
|
|||
//
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
if ( mojoDescriptor.getSince() != null )
|
||||
{
|
||||
w.startElement( "since" );
|
||||
|
||||
if ( StringUtils.isEmpty( mojoDescriptor.getSince() ) )
|
||||
{
|
||||
w.writeText( "No version given" );
|
||||
}
|
||||
else
|
||||
{
|
||||
w.writeText( mojoDescriptor.getSince() );
|
||||
}
|
||||
|
||||
w.endElement();
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
//
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
if ( mojoDescriptor.getDeprecated() != null )
|
||||
{
|
||||
w.startElement( "deprecated" );
|
||||
|
|
@ -479,6 +499,22 @@ public class PluginDescriptorGenerator
|
|||
|
||||
GeneratorUtils.element( w, "type", parameter.getType() );
|
||||
|
||||
if ( parameter.getSince() != null )
|
||||
{
|
||||
w.startElement( "since" );
|
||||
|
||||
if ( StringUtils.isEmpty( parameter.getSince() ) )
|
||||
{
|
||||
w.writeText( "No version given" );
|
||||
}
|
||||
else
|
||||
{
|
||||
w.writeText( parameter.getSince() );
|
||||
}
|
||||
|
||||
w.endElement();
|
||||
}
|
||||
|
||||
if ( parameter.getDeprecated() != null )
|
||||
{
|
||||
if ( StringUtils.isEmpty( parameter.getDeprecated() ) )
|
||||
|
|
|
|||
|
|
@ -72,10 +72,7 @@ public class Full
|
|||
* A component.
|
||||
*
|
||||
* @component role="role" roleHint="hint"
|
||||
* @readonly
|
||||
* @required
|
||||
* @since tomorrow
|
||||
* @deprecated after tomorrow
|
||||
*/
|
||||
private MojoScanner component;
|
||||
|
||||
|
|
|
|||
|
|
@ -77,6 +77,7 @@
|
|||
<configurator>"role-hint"</configurator>
|
||||
<instantiationStrategy>singleton</instantiationStrategy>
|
||||
<executionStrategy>always</executionStrategy>
|
||||
<since>now</since>
|
||||
<deprecated>deprecation text test</deprecated>
|
||||
<requiresDependencyCollection>test</requiresDependencyCollection>
|
||||
<threadSafe>true</threadSafe>
|
||||
|
|
@ -85,6 +86,7 @@
|
|||
<name>file</name>
|
||||
<alias>myAlias</alias>
|
||||
<type>java.io.File</type>
|
||||
<since>tomorrow</since>
|
||||
<deprecated>after tomorrow</deprecated>
|
||||
<required>true</required>
|
||||
<editable>false</editable>
|
||||
|
|
|
|||
Loading…
Reference in New Issue