Package org.apache.maven.plugin

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


            lookupMojo( "instrument", PlexusTestCase.getBasedir() +
                "/src/test/plugin-configs/instrument-plugin-config.xml" );

        setVariableValueToObject( mojo, "pluginClasspathList", getPluginClasspath() );

        mojo.execute();

        MavenProject project = (MavenProject) getVariableValueFromObject( mojo, "project" );

        File instrumentedDir = new File( project.getBuild().getOutputDirectory() );
View Full Code Here


            }
        };

        setVariableValueToObject( mojo, "log", log );

        mojo.execute();

        MavenProject project = (MavenProject) getVariableValueFromObject( mojo, "project" );

        File instrumentedDir = new File( project.getBuild().getOutputDirectory() );
View Full Code Here

            }
        };

        setVariableValueToObject( mojo, "log", log );

        mojo.execute();

        MavenProject project = (MavenProject) getVariableValueFromObject( mojo, "project" );

        File instrumentedDir = new File( project.getBuild().getOutputDirectory() );
View Full Code Here

        File dataFile = (File) getVariableValueFromObject( mojo, "dataFile" );

        assertTrue( "Test if the ser file has been prepared", dataFile.exists() );

        mojo.execute();

        assertFalse( "ser file must have been deleted", dataFile.exists() );
    }
}
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

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

        mojo.execute();

        assertTrue( "Test an archive was created", ArchiverManagerStub.archiverStub.getDestFile().exists() );
    }

    public void testAttachedMojoDependencySet()
View Full Code Here

    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

    {
        File pluginXmlFile = new File( getBasedir(), "src/test/idea-plugin-configs/min-plugin-config.xml" );

        Mojo mojo = lookupMojo( "idea", pluginXmlFile );

        mojo.execute();

        File basedir = new File( getBasedir()"target/test-harness/i-min" );

        String artifactId = "plugin-test-i-min";
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.