[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 )
|
if ( mojoDescriptor.getDeprecated() != null )
|
||||||
{
|
{
|
||||||
w.startElement( "deprecated" );
|
w.startElement( "deprecated" );
|
||||||
|
|
@ -479,6 +499,22 @@ public class PluginDescriptorGenerator
|
||||||
|
|
||||||
GeneratorUtils.element( w, "type", parameter.getType() );
|
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 ( parameter.getDeprecated() != null )
|
||||||
{
|
{
|
||||||
if ( StringUtils.isEmpty( parameter.getDeprecated() ) )
|
if ( StringUtils.isEmpty( parameter.getDeprecated() ) )
|
||||||
|
|
|
||||||
|
|
@ -72,10 +72,7 @@ public class Full
|
||||||
* A component.
|
* A component.
|
||||||
*
|
*
|
||||||
* @component role="role" roleHint="hint"
|
* @component role="role" roleHint="hint"
|
||||||
* @readonly
|
|
||||||
* @required
|
* @required
|
||||||
* @since tomorrow
|
|
||||||
* @deprecated after tomorrow
|
|
||||||
*/
|
*/
|
||||||
private MojoScanner component;
|
private MojoScanner component;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -77,6 +77,7 @@
|
||||||
<configurator>"role-hint"</configurator>
|
<configurator>"role-hint"</configurator>
|
||||||
<instantiationStrategy>singleton</instantiationStrategy>
|
<instantiationStrategy>singleton</instantiationStrategy>
|
||||||
<executionStrategy>always</executionStrategy>
|
<executionStrategy>always</executionStrategy>
|
||||||
|
<since>now</since>
|
||||||
<deprecated>deprecation text test</deprecated>
|
<deprecated>deprecation text test</deprecated>
|
||||||
<requiresDependencyCollection>test</requiresDependencyCollection>
|
<requiresDependencyCollection>test</requiresDependencyCollection>
|
||||||
<threadSafe>true</threadSafe>
|
<threadSafe>true</threadSafe>
|
||||||
|
|
@ -85,6 +86,7 @@
|
||||||
<name>file</name>
|
<name>file</name>
|
||||||
<alias>myAlias</alias>
|
<alias>myAlias</alias>
|
||||||
<type>java.io.File</type>
|
<type>java.io.File</type>
|
||||||
|
<since>tomorrow</since>
|
||||||
<deprecated>after tomorrow</deprecated>
|
<deprecated>after tomorrow</deprecated>
|
||||||
<required>true</required>
|
<required>true</required>
|
||||||
<editable>false</editable>
|
<editable>false</editable>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue