Package org.apache.maven.plugin.dependency.fromConfiguration

Examples of org.apache.maven.plugin.dependency.fromConfiguration.ArtifactItem


        //stubFactory.setUnpackableFile( mojo.getArchiverManager() );
        // i'm using one file repeatedly to archive so I can test the name
        // programmatically.
        stubFactory.setSrcFile( new File( getBasedir() + File.separatorChar + PACKED_FILE_PATH ) );
        Artifact artifact = stubFactory.createArtifact( "test", "test", "1.0", Artifact.SCOPE_COMPILE, "jar", null );
        ArtifactItem item = stubFactory.getArtifactItem( artifact );
        List<ArtifactItem> list = new ArrayList<ArtifactItem>( 1 );
        list.add( item );
        assertNotNull( mojo );
        assertNotNull( mojo.getProject() );
View Full Code Here


    public void testIncludeArtifactItemOverride()
        throws Exception
    {
        Artifact artifact = stubFactory.createArtifact( "test", "test", "1.0", Artifact.SCOPE_COMPILE, "jar", null );
        ArtifactItem item = stubFactory.getArtifactItem( artifact );
        item.setIncludes( "**/*" );
        List<ArtifactItem> list = new ArrayList<ArtifactItem>( 1 );
        list.add( item );
        mojo.setArtifactItems( list );
        mojo.setIncludes( "**/test2" + UNPACKED_FILE_SUFFIX );
        mojo.execute();
View Full Code Here

    public void testExcludeArtifactItemOverride()
        throws Exception
    {
        Artifact artifact = stubFactory.createArtifact( "test", "test", "1.0", Artifact.SCOPE_COMPILE, "jar", null );
        ArtifactItem item = stubFactory.getArtifactItem( artifact );
        item.setExcludes( "**/*" );
        List<ArtifactItem> list = new ArrayList<ArtifactItem>( 1 );
        list.add( item );
        mojo.setArtifactItems( list );
        mojo.setExcludes( "**/test2" + UNPACKED_FILE_SUFFIX );
        mojo.execute();
View Full Code Here

    public void testIncludeArtifactItemMultipleMarker()
        throws Exception
    {
        List<ArtifactItem> list = new ArrayList<ArtifactItem>();
        Artifact artifact = stubFactory.createArtifact( "test", "test", "1.0", Artifact.SCOPE_COMPILE, "jar", null );
        ArtifactItem item = stubFactory.getArtifactItem( artifact );
        item.setOverWrite( "false" );
        item.setIncludes( "**/test2" + UNPACKED_FILE_SUFFIX );
        list.add( item );
        item = stubFactory.getArtifactItem( artifact );
        item.setOverWrite( "false" );
        item.setIncludes( "**/test3" + UNPACKED_FILE_SUFFIX );
        list.add( item );
        mojo.setArtifactItems( list );
        mojo.execute();
        assertUnpacked( false, UNPACKED_FILE_PREFIX + 1 + UNPACKED_FILE_SUFFIX );
        assertUnpacked( false, UNPACKED_FILE_PREFIX + 11 + UNPACKED_FILE_SUFFIX );
View Full Code Here

    public void testIncludeArtifactItemMultipleExecutions()
        throws Exception
    {
        List<ArtifactItem> list = new ArrayList<ArtifactItem>();
        Artifact artifact = stubFactory.createArtifact( "test", "test", "1.0", Artifact.SCOPE_COMPILE, "jar", null );
        ArtifactItem item = stubFactory.getArtifactItem( artifact );
        item.setOverWrite( "false" );
        item.setIncludes( "**/test2" + UNPACKED_FILE_SUFFIX );
        list.add( item );
        item = stubFactory.getArtifactItem( artifact );
        item.setOverWrite( "false" );
        item.setIncludes( "**/test3" + UNPACKED_FILE_SUFFIX );
        list.add( item );
        mojo.setArtifactItems( list );
        mojo.execute();
        assertUnpacked( false, UNPACKED_FILE_PREFIX + 1 + UNPACKED_FILE_SUFFIX );
        assertUnpacked( false, UNPACKED_FILE_PREFIX + 11 + UNPACKED_FILE_SUFFIX );
View Full Code Here

        Set<Artifact> artifacts_ = artifacts;
        Set<Artifact> result = new HashSet<Artifact>();
       
        for ( Artifact artifact : artifacts_ )
        {
            if ( isArtifactIncluded( new ArtifactItem( artifact ) ) )
            {
                result.add( artifact );
            }
        }
        return result;
View Full Code Here

        Set<Artifact> artifacts_ = artifacts;
        Set<Artifact> result = new HashSet<Artifact>();
       
        for ( Artifact artifact : artifacts_ )
        {
            if ( isArtifactIncluded( new ArtifactItem( artifact ) ) )
            {
                result.add( artifact );
            }
        }
        return result;
View Full Code Here

        Set<Artifact> artifacts_ = artifacts;
        Set<Artifact> result = new HashSet<Artifact>();
       
        for( Artifact artifact : artifacts_ )
        {
            if ( isArtifactIncluded( new ArtifactItem( artifact ) ) )
            {
                result.add( artifact );
            }
        }
        return result;
View Full Code Here

        Set<Artifact> artifacts_ = artifacts;
        Set<Artifact> result = new HashSet<Artifact>();
       
        for( Artifact artifact : artifacts_ )
        {
            if ( isArtifactIncluded( new ArtifactItem( artifact ) ) )
            {
                result.add( artifact );
            }
        }
        return result;
View Full Code Here

        //stubFactory.setUnpackableFile( mojo.getArchiverManager() );
        // i'm using one file repeatedly to archive so I can test the name
        // programmatically.
        stubFactory.setSrcFile( new File( getBasedir() + File.separatorChar + PACKED_FILE_PATH ) );
        Artifact artifact = stubFactory.createArtifact( "test", "test", "1.0", Artifact.SCOPE_COMPILE, "jar", null );
        ArtifactItem item = stubFactory.getArtifactItem( artifact );
        List<ArtifactItem> list = new ArrayList<ArtifactItem>( 1 );
        list.add( item );
        assertNotNull( mojo );
        assertNotNull( mojo.getProject() );
View Full Code Here

TOP

Related Classes of org.apache.maven.plugin.dependency.fromConfiguration.ArtifactItem

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.