Package org.apache.maven.plugin

Examples of org.apache.maven.plugin.Mojo.execute()


    public void testAttachedMojoDependencySet()
        throws Exception
    {
        Mojo mojo = lookupMojo( "attached", basedir + "/src/test/plugin-configs/attached/depSet-plugin-config.xml" );

        mojo.execute();

        MavenProject project = (MavenProject) getVariableValueFromObject( mojo, "project" );
        Set artifactSet = project.getArtifacts();

        Map archiveMap = ArchiverManagerStub.archiverStub.getFiles();
View Full Code Here


        assertNotNull( "Mojo found.", mojo );

        setVariableValueToObject( mojo, "anonymousConnection", "scm:svn" );
        try
        {
            mojo.execute();
            assertTrue( "IllegalArgumentException NOT catched", false );
        }
        catch ( IllegalArgumentException e )
        {
            assertTrue( "IllegalArgumentException catched", true );
View Full Code Here

        mojo = lookupMojo( "scm", pluginXmlFile );
        assertNotNull( "Mojo found.", mojo );
        setVariableValueToObject( mojo, "anonymousConnection", "scm:svn:http" );
        try
        {
            mojo.execute();
            assertTrue( "IllegalArgumentException NOT catched", false );
        }
        catch ( Exception e )
        {
            assertTrue( "IllegalArgumentException catched", true );
View Full Code Here

        mojo = lookupMojo( "scm", pluginXmlFile );
        assertNotNull( "Mojo found.", mojo );
        setVariableValueToObject( mojo, "anonymousConnection", "scm" );
        try
        {
            mojo.execute();
            assertTrue( "IllegalArgumentException NOT catched", false );
        }
        catch ( Exception e )
        {
            assertTrue( "IllegalArgumentException catched", true );
View Full Code Here

       
        setVariableValueToObject( mojo, "outputFileFormat", "plain" );

        try
        {
            mojo.execute();

            fail( "Must throw an exception invalid format: plain" );
        }
        catch ( MojoExecutionException e )
        {
View Full Code Here

        mojoSetup( mojo );
       
        setVariableValueToObject( mojo, "outputFile", new File( "target/NoSuchFile.xml" ) );

        mojo.execute();
    }

    public void testNoFail()
        throws Exception
    {
View Full Code Here

        mojoSetup( mojo );
       
        setVariableValueToObject( mojo, "failOnViolation", Boolean.FALSE );

        mojo.execute();
    }
   
    protected void mojoSetup( Mojo mojo )
        throws Exception
    {
View Full Code Here

        final File pom = getPom("execute-script-pom.xml");

        final Mojo executeCommandsMojo = lookupMojo("execute-commands", pom);

        executeCommandsMojo.execute();

        // Create the address
        final ModelNode address = ServerOperations.createAddress("system-property", "org.jboss.maven.plugin");
        final ModelNode op = ServerOperations.createReadAttributeOperation(address, "value");
View Full Code Here

        final File pom = getPom("execute-commands-pom.xml");

        final Mojo executeCommandsMojo = lookupMojo("execute-commands", pom);

        executeCommandsMojo.execute();

        // Read the attribute
        ModelNode address = ServerOperations.createAddress("system-property", "org.jboss.maven.plugin-exec-cmd");
        ModelNode op = ServerOperations.createReadAttributeOperation(address, "value");
        ModelNode result = executeOperation(managementClient.getControllerClient(), op);
View Full Code Here

        final File pom = getPom("execute-batch-commands-pom.xml");

        final Mojo executeCommandsMojo = lookupMojo("execute-commands", pom);

        executeCommandsMojo.execute();

        // Read the attribute
        final ModelNode address = ServerOperations.createAddress("system-property", "org.jboss.maven.plugin-batch");
        final ModelNode op = ServerOperations.createReadAttributeOperation(address, "value");
        final ModelNode result = executeOperation(managementClient.getControllerClient(), op);
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.