Package org.jboss.shrinkwrap.resolver.api.maven

Examples of org.jboss.shrinkwrap.resolver.api.maven.MavenArtifactInfo


        assertEquals(false, resolvedArtifact.isSnapshotVersion());
        assertEquals("jar", resolvedArtifact.getExtension());
        assertEquals(false, resolvedArtifact.isOptional());
        assertEquals(originalCoordinate, resolvedArtifact.getCoordinate());

        final MavenArtifactInfo child1 = resolvedArtifact.getDependencies()[0];
        assertEquals("jar", child1.getExtension());
        assertEquals("1.0.0", child1.getResolvedVersion());
        assertEquals(false, child1.isSnapshotVersion());
        assertEquals("jar", child1.getExtension());
        assertEquals(true, child1.isOptional());
        assertEquals(child1Coordinate, child1.getCoordinate());
        assertEquals(ScopeType.COMPILE, child1.getScope());
    }
View Full Code Here


        assertEquals(false, resolvedArtifact.isSnapshotVersion());
        assertEquals("jar", resolvedArtifact.getExtension());
        assertEquals(false, resolvedArtifact.isOptional());
        assertEquals(originalCoordinate, resolvedArtifact.getCoordinate());

        final MavenArtifactInfo child1 = resolvedArtifact.getDependencies()[0];
        assertEquals("jar", child1.getExtension());
        assertEquals("1.0.0", child1.getResolvedVersion());
        assertEquals(false, child1.isSnapshotVersion());
        assertEquals("jar", child1.getExtension());
        assertEquals(false, child1.isOptional());
        assertEquals(child1Coordinate, child1.getCoordinate());
        assertEquals(ScopeType.COMPILE, child1.getScope());

        final MavenArtifactInfo child2 = resolvedArtifact.getDependencies()[1];
        assertEquals("jar", child2.getExtension());
        assertEquals("1.0.0", child2.getResolvedVersion());
        assertEquals(false, child2.isSnapshotVersion());
        assertEquals("jar", child2.getExtension());
        assertEquals(false, child2.isOptional());
        assertEquals(child2Coordinate, child2.getCoordinate());
        assertEquals(ScopeType.RUNTIME, child2.getScope());
    }
View Full Code Here

    private static String buildDependencyTree(StringBuilder sb, String indent, MavenArtifactInfo[] artifacts) {

        int length = artifacts.length - 1;
        for (int i = 0; i <= length; i++) {
            MavenArtifactInfo artifact = artifacts[i];

            String parsedIndent = indent;
            String nextLevelIndent = indent.replaceAll("\\+- $", "\\|  ") + "+- ";
            // indent last one in different manner
            if (i == length) {
                parsedIndent = parsedIndent.replaceAll("\\+- $", "\\\\- ");
                nextLevelIndent = indent.replaceAll("\\+- $", "   ") + "+- ";
            }

            sb.append(parsedIndent).append(artifact.getCoordinate().toCanonicalForm()).append(" [").append(artifact.getScope())
                .append("]").append("\n");
            buildDependencyTree(sb, nextLevelIndent, artifact.getDependencies());
        }

        return sb.toString();
    }
View Full Code Here

TOP

Related Classes of org.jboss.shrinkwrap.resolver.api.maven.MavenArtifactInfo

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.