Examples of ArtifactStub


Examples of org.apache.maven.plugin.testing.stubs.ArtifactStub

    public void testSimpleOverlay()
        throws Exception
    {

        final MavenProjectArtifactsStub project = new MavenProjectArtifactsStub();
        final ArtifactStub first = newWarArtifact( "test", "test-webapp" );
        project.addArtifact( first );

        final List overlays = new ArrayList();
        overlays.add( new DefaultOverlay( first ) );
View Full Code Here

Examples of org.apache.maven.plugin.testing.stubs.ArtifactStub

    public void testUnknonwnOverlay()
        throws Exception
    {

        final MavenProjectArtifactsStub project = new MavenProjectArtifactsStub();
        final ArtifactStub first = newWarArtifact( "test", "test-webapp" );
        project.addArtifact( first );

        final List overlays = new ArrayList();
        overlays.add( new Overlay( "test", "test-webapp-2" ) );
View Full Code Here

Examples of org.apache.maven.plugin.testing.stubs.ArtifactStub

    public void testCustomCurrentProject()
        throws Exception
    {

        final MavenProjectArtifactsStub project = new MavenProjectArtifactsStub();
        final ArtifactStub first = newWarArtifact( "test", "test-webapp" );
        final ArtifactStub second = newWarArtifact( "test", "test-webapp-2" );
        project.addArtifact( first );
        project.addArtifact( second );

        final List overlays = new ArrayList();
        overlays.add( new DefaultOverlay( first ) );
View Full Code Here

Examples of org.apache.maven.plugin.testing.stubs.ArtifactStub

    public void testOverlaysWithSameArtifactAndGroupId()
        throws Exception
    {

        final MavenProjectArtifactsStub project = new MavenProjectArtifactsStub();
        final ArtifactStub first = newWarArtifact( "test", "test-webapp" );
        final ArtifactStub second = newWarArtifact( "test", "test-webapp", "my-classifier" );

        project.addArtifact( first );
        project.addArtifact( second );

        final List overlays = new ArrayList();
View Full Code Here

Examples of org.apache.maven.plugin.testing.stubs.ArtifactStub

        if ( artifactStubs != null )
        {
            for ( int i = 0; i < artifactStubs.length; i++ )
            {
                ArtifactStub artifactStub = artifactStubs[i];
                project.addArtifact( artifactStub );
            }
        }

        configureMojo( mojo, new LinkedList(), classesDir, webAppSource, webAppDirectory, project );
View Full Code Here

Examples of org.apache.maven.plugin.testing.stubs.ArtifactStub

        throws Exception
    {
        // setup test data
        final String testId = "no-change";
        final ArtifactHandler artifactHandler = (ArtifactHandler) lookup( ArtifactHandler.ROLE, "jar" );
        ArtifactStub jarArtifact = new JarArtifactStub( getBasedir(), artifactHandler );
        jarArtifact.setArtifactId( "lib-test" );
        jarArtifact.setVersion( "1.0" );

        doTestTwiceWithUpdatedDependency( testId, new ArtifactStub[]{jarArtifact}, new ArtifactStub[]{jarArtifact},
                                          new String[]{"WEB-INF/lib/lib-test-1.0.jar"},
                                          new String[]{"WEB-INF/lib/lib-test-1.0.jar"} );
View Full Code Here

Examples of org.apache.maven.plugin.testing.stubs.ArtifactStub

        throws Exception
    {
        // setup test data
        final String testId = "remove-dependency";
        final ArtifactHandler artifactHandler = (ArtifactHandler) lookup( ArtifactHandler.ROLE, "jar" );
        ArtifactStub jarArtifact = new JarArtifactStub( getBasedir(), artifactHandler );
        jarArtifact.setArtifactId( "lib-test" );
        jarArtifact.setVersion( "1.0" );

        doTestTwiceWithUpdatedDependency( testId, new ArtifactStub[]{jarArtifact}, null,
                                          new String[]{"WEB-INF/lib/lib-test-1.0.jar"}, null );

    }
View Full Code Here

Examples of org.apache.maven.plugin.testing.stubs.ArtifactStub

        throws Exception
    {
        // setup test data
        final String testId = "dependency-update-version";
        final ArtifactHandler artifactHandler = (ArtifactHandler) lookup( ArtifactHandler.ROLE, "jar" );
        ArtifactStub jarArtifact = new JarArtifactStub( getBasedir(), artifactHandler );
        jarArtifact.setArtifactId( "lib-test" );
        jarArtifact.setVersion( "1.0" );

        ArtifactStub jarArtifact2 = new JarArtifactStub( getBasedir(), artifactHandler );
        jarArtifact2.setArtifactId( "lib-test" );
        jarArtifact2.setVersion( "2.0" );

        doTestTwiceWithUpdatedDependency( testId, new ArtifactStub[]{jarArtifact}, new ArtifactStub[]{jarArtifact2},
                                          new String[]{"WEB-INF/lib/lib-test-1.0.jar"},
                                          new String[]{"WEB-INF/lib/lib-test-2.0.jar"} );
View Full Code Here

Examples of org.apache.maven.plugin.testing.stubs.ArtifactStub

        throws Exception
    {
        // setup test data
        final String testId = "dependency-now-provided";
        final ArtifactHandler artifactHandler = (ArtifactHandler) lookup( ArtifactHandler.ROLE, "jar" );
        ArtifactStub jarArtifact = new JarArtifactStub( getBasedir(), artifactHandler );
        jarArtifact.setArtifactId( "lib-test" );
        jarArtifact.setVersion( "1.0" );

        ArtifactStub jarArtifact2 = new JarArtifactStub( getBasedir(), artifactHandler );
        jarArtifact2.setArtifactId( "lib-test" );
        jarArtifact2.setVersion( "1.0" );
        jarArtifact2.setScope( Artifact.SCOPE_PROVIDED );

        doTestTwiceWithUpdatedDependency( testId, new ArtifactStub[]{jarArtifact}, new ArtifactStub[]{jarArtifact2},
                                          new String[]{"WEB-INF/lib/lib-test-1.0.jar"}, null );

    }
View Full Code Here

Examples of org.apache.maven.plugin.testing.stubs.ArtifactStub

    {
        // setup test data
        final String testId = "default-overlay";

        // Add an overlay
        final ArtifactStub overlay = buildWarOverlayStub( "overlay-one" );

        final File webAppDirectory = setUpMojo( testId, new ArtifactStub[]{overlay} );
        final List assertedFiles = new ArrayList();
        try
        {
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.