Examples of ArtifactStub


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

    @Test(expected = EnforcerRuleException.class)
    @SuppressWarnings("unchecked")
    public void validateExceptionOnFindingPocDependenciesInAPIs() throws Exception {

        // Assemble
        final ArtifactStub ignoredImplementationDependency = new ArtifactStub();
        ignoredImplementationDependency.setGroupId("se.jguru.nazgul.poc.foo");
        ignoredImplementationDependency.setArtifactId("foobar-poc");
        ignoredImplementationDependency.setVersion("1.0.0");
        ignoredImplementationDependency.setScope(Artifact.SCOPE_COMPILE);
        ignoredImplementationDependency.setType("jar");

        fooApiProject.getDependencyArtifacts().add(ignoredImplementationDependency);

        // Act & Assert
        unitUnderTest.execute(new MockEnforcerRuleHelper(fooApiProject));
View Full Code Here

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

        return createArtifact( groupId, artifactId, type, version, null );
    }

    protected Artifact createArtifact( String groupId, String artifactId, String type, String version, String scope )
    {
        ArtifactStub artifact = new ArtifactStub();

        artifact.setGroupId( groupId );
        artifact.setArtifactId( artifactId );
        artifact.setType( type );
        artifact.setVersion( version );
        artifact.setScope( scope );

        return artifact;
    }
View Full Code Here

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

     * {@inheritDoc}
     */
    protected void setUp()
        throws Exception
    {
        node = new DependencyNode( new ArtifactStub() );

        acceptingFilter = createDependencyNodeFilter( node, true );
        rejectingFilter = createDependencyNodeFilter( node, false );
    }
View Full Code Here

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

     * {@inheritDoc}
     */
    protected void setUp()
        throws Exception
    {
        Artifact artifact = new ArtifactStub();
        Artifact relatedArtifact = new ArtifactStub();

        includedNode = new DependencyNode( artifact, DependencyNode.INCLUDED );
        omittedForDuplicateNode = new DependencyNode( artifact, DependencyNode.OMITTED_FOR_DUPLICATE, relatedArtifact );
        omittedForConflictNode = new DependencyNode( artifact, DependencyNode.OMITTED_FOR_CONFLICT, relatedArtifact );
        omittedForCycleNode = new DependencyNode( artifact, DependencyNode.OMITTED_FOR_CYCLE );
View Full Code Here

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

     * {@inheritDoc}
     */
    protected void setUp()
        throws Exception
    {
        artifact = new ArtifactStub();
        node = new DependencyNode( artifact );
    }
View Full Code Here

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

     * {@inheritDoc}
     */
    protected void setUp()
        throws Exception
    {
        artifact = new ArtifactStub();
        node = new DependencyNode( artifact );

        includeFilter = createDependencyNodeFilter( node, true );
        excludeFilter = createDependencyNodeFilter( node, false );
    }
View Full Code Here

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

        return createArtifact( groupId, artifactId, type, version, null );
    }

    protected Artifact createArtifact( String groupId, String artifactId, String type, String version, String scope )
    {
        ArtifactStub artifact = new ArtifactStub();

        artifact.setGroupId( groupId );
        artifact.setArtifactId( artifactId );
        artifact.setType( type );
        artifact.setVersion( version );
        artifact.setScope( scope );

        return artifact;
    }
View Full Code Here

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

        File testPom = new File( getBasedir(), pomXml );

        CompilerMojo mojo = (CompilerMojo) lookupMojo( "compile", testPom );

        setVariableValueToObject( mojo, "log", new DebugEnabledLog() );
        setVariableValueToObject( mojo, "projectArtifact", new ArtifactStub() );
        setVariableValueToObject( mojo, "classpathElements", Collections.EMPTY_LIST );

        assertNotNull( mojo );

        return mojo;
View Full Code Here

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

        List<String> compileSourceRoots = new ArrayList<String>();
        compileSourceRoots.add( getBasedir() + "/src/main/java" );
        setCompileSourceRoots( compileSourceRoots );

        ArtifactStub artifact = new ArtifactStub();
        artifact.setGroupId( "commons-logging" );
        artifact.setArtifactId( "commons-logging" );
        artifact.setVersion( "1.1.1" );
        artifact.setScope( Artifact.SCOPE_RUNTIME );
        artifact.setType( "jar" );
        artifact.setFile( getBasedir() );

        dependencyArtifacts.add( artifact );
    }
View Full Code Here

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

    public void testAutodetectSimpleOverlay( Overlay currentProjectOverlay )
        throws Exception
    {

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

        final List overlays = 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.