Examples of StubArtifactRepository


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

        BuildClasspathMojo mojo = (BuildClasspathMojo) lookupMojo( "build-classpath", testPom );

        assertNotNull( mojo );
        assertNotNull( mojo.getProject() );

        ArtifactRepository local = new StubArtifactRepository( stubFactory.getWorkingDir().getPath() );
        mojo.setLocal( local );

        Artifact artifact = stubFactory.getReleaseArtifact();

View Full Code Here

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

        stubFactory.setSrcFile( new File( getBasedir() + File.separatorChar
            + "target/test-classes/unit/unpack-dependencies-test/test.txt" ) );

        mojo.setFactory( DependencyTestUtils.getArtifactFactory() );
        mojo.setResolver( new StubArtifactResolver( stubFactory, false, false ) );
        mojo.setLocal( new StubArtifactRepository( this.testDir.getAbsolutePath() ) );
        mojo.setArtifactCollector( new StubArtifactCollector() );
        mojo.setUseJvmChmod( true );
    }
View Full Code Here

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

        mojo.setArtifactItems( list );

        // init classifier things
        mojo.setFactory( DependencyTestUtils.getArtifactFactory() );
        mojo.setResolver( new StubArtifactResolver( null, are, anfe ) );
        mojo.setLocal( new StubArtifactRepository( this.testDir.getAbsolutePath() ) );

        try
        {
            mojo.execute();
            fail( "ExpectedException" );
View Full Code Here

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

    {
        mojo.classifier = testClassifier;
        mojo.type = testType;
        mojo.setFactory( DependencyTestUtils.getArtifactFactory() );
        mojo.setResolver( new StubArtifactResolver( stubFactory, false, false ) );
        mojo.setLocal( new StubArtifactRepository( this.testDir.getAbsolutePath() ) );

        mojo.execute();

        for (Artifact artifact : (Iterable<Artifact>) mojo.getProject().getArtifacts()) {
            String useClassifier = artifact.getClassifier();
View Full Code Here

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

        mojo.classifier = "jdk";
        mojo.type = "java-sources";
        // init classifier things
        mojo.setFactory( DependencyTestUtils.getArtifactFactory() );
        mojo.setResolver( new StubArtifactResolver( null, are, anfe ) );
        mojo.setLocal( new StubArtifactRepository( this.testDir.getAbsolutePath() ) );

        try
        {
            mojo.execute();
            fail( "ExpectedException" );
View Full Code Here

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

        assertNotNull( mojo.getProject() );
        // MavenProject project = mojo.getProject();
        // init classifier things
        mojo.setFactory( DependencyTestUtils.getArtifactFactory() );
        mojo.setResolver( new StubArtifactResolver( stubFactory, false, false ) );
        mojo.setLocal( new StubArtifactRepository( this.testDir.getAbsolutePath() ) );
        mojo.setArtifactCollector( new StubArtifactCollector() );

    }
View Full Code Here

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

        mojo.setArtifactItems( list );

        // init classifier things
        mojo.setFactory( DependencyTestUtils.getArtifactFactory() );
        mojo.setResolver( new StubArtifactResolver( null, are, anfe ) );
        mojo.setLocal( new StubArtifactRepository( this.testDir.getAbsolutePath() ) );

        try
        {
            mojo.execute();
            fail( "ExpectedException" );
View Full Code Here

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

        throws Exception
    {
        List<ArtifactItem> list = stubFactory.getArtifactItems( stubFactory.getClassifiedArtifacts() );

        mojo.setArtifactItems( list );
        ArtifactRepository local = new StubArtifactRepository( this.testDir.getAbsolutePath() )
        {
            @Override
            public String getId()
            {
                return "ID";
View Full Code Here

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

        TestEclipseWriterConfig config = new TestEclipseWriterConfig();

        File basedir = fileManager.createTempDir();

        File repoDir = new File( basedir, "repo" );
        config.setLocalRepository( new StubArtifactRepository( repoDir.getPath() ) );

        config.setProjectBaseDir( basedir );
        config.setEclipseProjectDirectory( basedir );

        String baseOutputDir = "target/classes";
View Full Code Here

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

        File testPom = new File( getBasedir(), "target/test-classes/unit/get-test/plugin-config.xml" );
        assert testPom.exists();
        mojo = (GetMojo) lookupMojo( "get", testPom );

        assertNotNull( mojo );
        setVariableValueToObject( mojo, "localRepository", new StubArtifactRepository( testDir.getAbsolutePath() ){
            @Override
            public String pathOf( Artifact artifact )
            {
                StringBuilder pathOf = new StringBuilder();
                pathOf.append( artifact.getGroupId() )
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.