@SuppressWarnings( "unchecked" )
Map<String, ?> paramMap = descriptor.getParameterMap();
if ( !paramMap.containsKey( "basedir" ) )
{
Parameter param = new Parameter();
param.setName( "basedir" );
param.setAlias( "ant.basedir" );
param.setExpression( "${antBasedir}" );
param.setDefaultValue( "${basedir}" );
param.setType( "java.io.File" );
param.setDescription( "The base directory from which to execute the Ant script." );
param.setEditable( true );
param.setRequired( true );
descriptor.addParameter( param );
}
if ( !paramMap.containsKey( "antMessageLevel" ) )
{
Parameter param = new Parameter();
param.setName( "messageLevel" );
param.setAlias( "ant.messageLevel" );
param.setExpression( "${antMessageLevel}" );
param.setDefaultValue( "info" );
param.setType( "java.lang.String" );
param.setDescription( "The message-level used to tune the verbosity of Ant logging." );
param.setEditable( true );
param.setRequired( false );
descriptor.addParameter( param );
}
if ( !paramMap.containsKey( "project" ) )
{
Parameter param = new Parameter();
param.setName( "project" );
param.setDefaultValue( "${project}" );
param.setType( MavenProject.class.getName() );
param.setDescription( "The current MavenProject instance, which contains classpath elements." );
param.setEditable( false );
param.setRequired( true );
descriptor.addParameter( param );
}
if ( !paramMap.containsKey( "session" ) )
{
Parameter param = new Parameter();
param.setName( "session" );
param.setDefaultValue( "${session}" );
param.setType( "org.apache.maven.execution.MavenSession" );
param.setDescription( "The current MavenSession instance, which is used for plugin-style expression resolution." );
param.setEditable( false );
param.setRequired( true );
descriptor.addParameter( param );
}
if ( !paramMap.containsKey( "mojoExecution" ) )
{
Parameter param = new Parameter();
param.setName( "mojoExecution" );
param.setDefaultValue( "${mojoExecution}" );
param.setType( "org.apache.maven.plugin.MojoExecution" );
param.setDescription( "The current Maven MojoExecution instance, which contains information about the mojo currently executing." );
param.setEditable( false );
param.setRequired( true );
descriptor.addParameter( param );
}
@SuppressWarnings( "unchecked" )