Package org.apache.maven.plugin.assembly.mojos

Examples of org.apache.maven.plugin.assembly.mojos.DirectoryMojo


        throws Exception
    {
        File testPom = new File( getBasedir(),
                                 "src/test/plugin-configs/directory/min-plugin-config.xml" );

        DirectoryMojo mojo = ( DirectoryMojo ) lookupMojo( "directory", testPom );

        assertNotNull( mojo );
    }
View Full Code Here


        throws Exception
    {
        File testPom = new File( getBasedir(),
                                 "src/test/plugin-configs/directory/min-plugin-config.xml" );

        DirectoryMojo mojo = ( DirectoryMojo ) lookupMojo( "directory", testPom );

        assertNotNull( mojo );

        AssemblyMojoTest.generateTestFileSets(getBasedir(), "\n");
       
        mojo.execute();

        Map filesArchived = ArchiverManagerStub.archiverStub.getFiles();

        Set files = filesArchived.keySet();
View Full Code Here

        throws Exception
    {
        File testPom = new File( getBasedir(),
                                 "src/test/plugin-configs/directory/appendAssemblyId-false-plugin-config.xml" );

        DirectoryMojo mojo = ( DirectoryMojo ) lookupMojo( "directory", testPom );

        assertNotNull( mojo );

        String classifier = ( String ) getVariableValueFromObject( mojo, "classifier" );

        String finalName = ( String ) getVariableValueFromObject( mojo, "finalName" );

        File outputDir = ( File ) getVariableValueFromObject( mojo, "outputDirectory" );

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

        Set artifacts = project.getArtifacts();

        mojo.execute();

        File dir = new File( outputDir, finalName + "-" + classifier );

        assertTrue( dir.exists() );
View Full Code Here

        throws Exception
    {
        File testPom = new File( getBasedir(),
                                 "src/test/plugin-configs/directory/dependency-set-plugin-config.xml" );

        DirectoryMojo mojo = ( DirectoryMojo ) lookupMojo( "directory", testPom );

        assertNotNull( mojo );

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

        Set artifacts = project.getArtifacts();

        mojo.execute();

        Map filesArchived = ArchiverManagerStub.archiverStub.getFiles();

        Set files = filesArchived.keySet();
View Full Code Here

        throws Exception
    {
        File testPom = new File( getBasedir(),
                                 "src/test/plugin-configs/directory/min-plugin-config-with-exceptions.xml" );

        DirectoryMojo mojo = ( DirectoryMojo ) lookupMojo( "directory", testPom );

        assertNotNull( mojo );

        try
        {
            mojo.execute();

            fail( "Failure Expected" );
        }
        catch( Exception e )
        {
View Full Code Here

TOP

Related Classes of org.apache.maven.plugin.assembly.mojos.DirectoryMojo

Copyright © 2018 www.massapicom. 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.