Package org.apache.maven.plugin.testing.stubs

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<Overlay> overlays = new ArrayList<Overlay>();
        overlays.add( new DefaultOverlay( first ) );
View Full Code Here


    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<Overlay> overlays = new ArrayList<Overlay>();
View Full Code Here

        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

        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

        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

        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

    {
        // 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<File> assertedFiles = new ArrayList<File>();
        try
        {
View Full Code Here

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

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

        final File webAppDirectory = setUpMojo( testId, new ArtifactStub[] { overlay, overlay2 } );
        final List<File> assertedFiles = new ArrayList<File>();
        try
        {
View Full Code Here

    {
        // setup test data
        final String testId = "scenario-one-default-settings";

        // Add an overlay
        final ArtifactStub overlay1 = buildWarOverlayStub( "overlay-full-1" );
        final ArtifactStub overlay2 = buildWarOverlayStub( "overlay-full-2" );
        final ArtifactStub overlay3 = buildWarOverlayStub( "overlay-full-3" );

        final File webAppDirectory =
            setUpMojo( testId, new ArtifactStub[] { overlay1, overlay2, overlay3 }, new String[] {
                "org/sample/company/test.jsp", "jsp/b.jsp" } );
View Full Code Here

    {
        // setup test data
        final String testId = "scenario-one-overlay-settings";

        // Add an overlay
        final ArtifactStub overlay1 = buildWarOverlayStub( "overlay-full-1" );
        final ArtifactStub overlay2 = buildWarOverlayStub( "overlay-full-2" );
        final ArtifactStub overlay3 = buildWarOverlayStub( "overlay-full-3" );

        final File webAppDirectory =
            setUpMojo( testId, new ArtifactStub[] { overlay1, overlay2, overlay3 }, new String[] {
                "org/sample/company/test.jsp", "jsp/b.jsp" } );
View Full Code Here

TOP

Related Classes of org.apache.maven.plugin.testing.stubs.ArtifactStub

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.