Package org.jboss.shrinkwrap.resolver.impl.maven.util

Examples of org.jboss.shrinkwrap.resolver.impl.maven.util.ValidationUtil


        File[] files = Resolvers.use(MavenResolverSystem.class)
                .loadPomFromFile("target/poms/test-profiles.xml", "version2").importRuntimeDependencies().resolve()
                .withTransitivity().as(File.class);

        new ValidationUtil("test-deps-d-1.0.0", "test-managed-dependency-2.0.0").validate(files);
    }
View Full Code Here


        File[] files = Resolvers.use(MavenResolverSystem.class)
                .loadPomFromFile("target/poms/test-profiles-file-activation.xml").importRuntimeDependencies().resolve()
                .withTransitivity()
                .as(File.class);

        new ValidationUtil("test-deps-d-1.0.0", "test-deps-a-1.0.0").validate(files);
    }
View Full Code Here

        File[] files = Resolvers.use(MavenResolverSystem.class)
                .loadPomFromFile("target/poms/test-profiles-file-activation.xml", "!add-dependency-a")
                .importRuntimeDependencies().resolve().withTransitivity().as(File.class);

        new ValidationUtil("test-deps-d-1.0.0").validate(files);
    }
View Full Code Here

        final MavenResolvedArtifact[] resolvedArtifactInfos = Maven.resolver().addDependencies(dependencyA, dependencyB)
                .resolve()
                .withoutTransitivity().asResolvedArtifact();

        // then
        new ValidationUtil("test-deps-a-1.0.0.jar").validate(resolvedArtifactInfos[0].as(File.class));

        assertEquals("jar", resolvedArtifactInfos[0].getExtension());
        assertEquals("1.0.0", resolvedArtifactInfos[0].getResolvedVersion());
        assertEquals(false, resolvedArtifactInfos[0].isSnapshotVersion());
        assertEquals("jar", resolvedArtifactInfos[0].getExtension());
        assertEquals(false, resolvedArtifactInfos[0].isOptional());
        assertEquals(originalCoordinateA, resolvedArtifactInfos[0].getCoordinate());

        new ValidationUtil("test-deps-b-1.0.0.jar").validate(resolvedArtifactInfos[1].as(File.class));

        assertEquals("jar", resolvedArtifactInfos[1].getExtension());
        assertEquals("1.0.0", resolvedArtifactInfos[1].getResolvedVersion());
        assertEquals(false, resolvedArtifactInfos[1].isSnapshotVersion());
        assertEquals("jar", resolvedArtifactInfos[1].getExtension());
View Full Code Here

        // when
        final MavenResolvedArtifact resolvedArtifact = Maven.resolver().loadPomFromFile("target/poms/test-parent.xml")
                .resolve(artifactCanonicalForm).withoutTransitivity().asSingleResolvedArtifact();

        // then
        new ValidationUtil("test-deps-a-1.0.0.jar").validate(resolvedArtifact.as(File.class));

        assertEquals("jar", resolvedArtifact.getExtension());
        assertEquals("1.0.0", resolvedArtifact.getResolvedVersion());
        assertEquals(false, resolvedArtifact.isSnapshotVersion());
        assertEquals("jar", resolvedArtifact.getExtension());
View Full Code Here

        assertEquals("MavenResolvedArtifact list should have one element", 1, resolvedArtifactInfos.length);

        final MavenResolvedArtifact resolvedArtifact = resolvedArtifactInfos[0];
        assertEquals("Resolved artifact should have children", 2, resolvedArtifact.getDependencies().length);

        new ValidationUtil("test-dependency-1.0.0.jar").validate(resolvedArtifact.as(File.class));

        assertEquals("jar", resolvedArtifact.getExtension());
        assertEquals("1.0.0", resolvedArtifact.getResolvedVersion());
        assertEquals(false, resolvedArtifact.isSnapshotVersion());
        assertEquals("jar", resolvedArtifact.getExtension());
View Full Code Here

        assertEquals("MavenResolvedArtifact list should have two elements", 2, resolvedArtifactInfos.length);

        final MavenResolvedArtifact resolvedArtifact = resolvedArtifactInfos[0];
        assertEquals("Resolved artifact should have one child", 1, resolvedArtifact.getDependencies().length);

        new ValidationUtil("test-deps-optional-1.0.0.jar").validate(resolvedArtifact.as(File.class));

        assertEquals("jar", resolvedArtifact.getExtension());
        assertEquals("1.0.0", resolvedArtifact.getResolvedVersion());
        assertEquals(false, resolvedArtifact.isSnapshotVersion());
        assertEquals("jar", resolvedArtifact.getExtension());
View Full Code Here

    @Test
    public void resolutionDepth0Jar() {
        File[] files = Maven.resolver().resolve("org.jboss.shrinkwrap.test:test-deps-c:1.0.0")
                .using(new DepthStrategy(0)).asFile();

        new ValidationUtil("test-deps-c").validate(files);
    }
View Full Code Here

    @Test
    public void resolutionDepth1Pom() {
        File[] files = Maven.resolver().resolve("org.jboss.shrinkwrap.test:test-filter:pom:1.0.0")
                .using(new DepthStrategy(1)).asFile();

        new ValidationUtil("test-deps-a", "test-deps-c", "test-deps-d", "test-deps-e").validate(files);
    }
View Full Code Here

    @Test
    public void resolutionDepth1Jar() {
        File[] files = Maven.resolver().resolve("org.jboss.shrinkwrap.test:test-deps-c:1.0.0")
                .using(new DepthStrategy(1)).asFile();

        new ValidationUtil("test-deps-b", "test-deps-c").validate(files);
    }
View Full Code Here

TOP

Related Classes of org.jboss.shrinkwrap.resolver.impl.maven.util.ValidationUtil

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.