Package org.apache.maven.plugin.descriptor

Examples of org.apache.maven.plugin.descriptor.MojoDescriptor.addParameter()


        StringBuilder sb = new StringBuilder();
        MojoDescriptor md = new MojoDescriptor();
        Parameter parameter = new Parameter();
        parameter.setName( "name" );
        parameter.setExpression( "${valid.expression}" );
        md.addParameter( parameter );
       
        try
        {
            PrivateAccessor.invoke( new DescribeMojo(), "describeMojoParameters", new Class[] { MojoDescriptor.class,
                StringBuilder.class }, new Object[] { md, sb } );
View Full Code Here


        StringBuilder sb = new StringBuilder();
        MojoDescriptor md = new MojoDescriptor();
        Parameter parameter = new Parameter();
        parameter.setName( "name" );
        parameter.setExpression( "${project.build.directory}/generated-sources/foobar" ); //this is a defaultValue
        md.addParameter( parameter );
       
        try
        {
            PrivateAccessor.invoke( new DescribeMojo(), "describeMojoParameters", new Class[] { MojoDescriptor.class,
                StringBuilder.class }, new Object[] { md, sb } );
View Full Code Here

                dParam.setRequired( param.isRequired() );
                dParam.setType( param.getType() );

                try
                {
                    descriptor.addParameter( dParam );
                }
                catch ( DuplicateParameterException e )
                {
                    throw new PluginMetadataParseException( metadataFile,
                                                            "Duplicate parameters detected for mojo: "
View Full Code Here

                dParam.setRequired( param.isRequired() );
                dParam.setType( param.getType() );

                try
                {
                    descriptor.addParameter( dParam );
                }
                catch ( DuplicateParameterException e )
                {
                    throw new PluginMetadataParseException( metadataFile,
                                                            "Duplicate parameters detected for mojo: "
View Full Code Here

                dParam.setRequired( param.isRequired() );
                dParam.setType( param.getType() );

                try
                {
                    descriptor.addParameter( dParam );
                }
                catch ( DuplicateParameterException e )
                {
                    throw new PluginMetadataParseException( metadataFile,
                                                            "Duplicate parameters detected for mojo: "
View Full Code Here

                dParam.setRequired( param.isRequired() );
                dParam.setType( param.getType() );
               
                try
                {
                    descriptor.addParameter( dParam );
                }
                catch ( DuplicateParameterException e )
                {
                    throw new PluginMetadataParseException( metadataFile, "Duplicate parameters detected for mojo: " + mojo.getGoal(), e );
                }
View Full Code Here

                            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();
View Full Code Here

                            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 );
                        }

                        String implementation = relativePath;

                        String dImpl = descriptor.getImplementation();
View Full Code Here

            param.setName( "detail" );
            param.setType( "boolean" );
            param.setDescription( "If <code>true</code>, display all settable properties for each goal." );
            param.setDefaultValue( "false" );
            param.setExpression( "${detail}" );
            descriptor.addParameter( param );

            param = new Parameter();
            param.setName( "goal" );
            param.setType( "java.lang.String" );
            param.setDescription( "The name of the goal for which to show help."
View Full Code Here

            param.setName( "goal" );
            param.setType( "java.lang.String" );
            param.setDescription( "The name of the goal for which to show help."
                + " If unspecified, all goals will be displayed." );
            param.setExpression( "${goal}" );
            descriptor.addParameter( param );

            param = new Parameter();
            param.setName( "lineLength" );
            param.setType( "int" );
            param.setDescription( "The maximum length of a display line, should be positive." );
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.