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

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


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

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


            .fromFile("target/settings/profiles/settings.xml").loadPomFromFile("target/poms/test-bom.xml");

        final File[] firstRequest = resolver.resolve("org.jboss.shrinkwrap.test:test-deps-a").withoutTransitivity()
            .as(File.class);

        new ValidationUtil("test-deps-a-1.0.0.jar").validate(firstRequest);

        final File[] secondRequest = resolver.resolve("org.jboss.shrinkwrap.test:test-deps-b").withoutTransitivity()
            .as(File.class);

        new ValidationUtil("test-deps-b-1.0.0.jar").validate(secondRequest);
    }
View Full Code Here

    public void testFilesResolution() {
        File[] files = Resolvers.use(MavenResolverSystem.class)
                .resolve("org.jboss.shrinkwrap.test:test-deps-a:1.0.0", "org.jboss.shrinkwrap.test:test-deps-c:1.0.0")
                .withTransitivity().as(File.class);

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

        Assert.assertThat(ejb, not(nullValue()));
        Assert.assertThat(ejb.asFile(), not(nullValue()));
        Assert.assertThat(ejb.getExtension(), is("jar"));
        Assert.assertThat(ejb.getCoordinate().getPackaging(), is(PackagingType.EJB));
        new ValidationUtil("test-ejb").validate(ejb.asFile());

    }
View Full Code Here

        File file = Maven.configureResolver().fromFile("target/settings/profiles/settings.xml")
                .loadPomFromFile("target/poms/test-tests-classifier.xml")
                .resolve("org.jboss.shrinkwrap.test:test-dependency-with-test-jar:jar:tests:1.0.0").withoutTransitivity()
                .asSingleFile();

        new ValidationUtil("test-dependency-with-test-jar").validate(file);

        // check content of resolved jar, it should contain Field class
        boolean containsFieldClass = false;
        JarFile jarFile = new JarFile(file);
        Enumeration<JarEntry> entries = jarFile.entries();
View Full Code Here

                .loadPomFromFile("target/poms/test-tests-classifier.xml")
                .resolve("org.jboss.shrinkwrap.test:test-dependency-with-test-jar:test-jar:tests:1.0.0")
                .withoutTransitivity()
                .asSingleFile();

        new ValidationUtil("test-dependency-with-test-jar").validate(file);

        // check content of resolved jar, it should contain Field class
        boolean containsFieldClass = false;
        JarFile jarFile = new JarFile(file);
        Enumeration<JarEntry> entries = jarFile.entries();
View Full Code Here

                .loadPomFromFile("target/poms/test-tests-classifier.xml")
                .resolve("org.jboss.shrinkwrap.test:test-dependency-with-test-jar:test-jar:tests:1.0.0")
                .withoutTransitivity()
                .asSingleResolvedArtifact();

        new ValidationUtil("test-dependency-with-test-jar").validate(artifact.asFile());

        Assert.assertEquals("jar", artifact.getExtension());
        Assert.assertEquals("tests", artifact.getCoordinate().getClassifier());
        Assert.assertEquals(PackagingType.TEST_JAR, artifact.getCoordinate().getPackaging());
    }
View Full Code Here

                .loadPomFromFile("target/poms/test-tests-classifier.xml")
                .resolve("org.jboss.shrinkwrap.test:test-dependency-with-test-jar:test-jar:tests:?")
                .withoutTransitivity()
                .asSingleFile();

        new ValidationUtil("test-dependency-with-test-jar").validate(file);

        // check content of resolved jar, it should contain Field class
        boolean containsFieldClass = false;
        JarFile jarFile = new JarFile(file);
        Enumeration<JarEntry> entries = jarFile.entries();
View Full Code Here

    public void pomBasedDependenciesImportScopeInDepMgmtAllScopes() {

        final File[] files = Maven.resolver().loadPomFromFile("target/poms/test-testdeps-via-bom-and-depchain.xml")
                .importRuntimeAndTestDependencies().resolve().withTransitivity().as(File.class);

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

        File[] files = Maven.configureResolver().fromFile("target/settings/profiles/settings.xml")
                .loadPomFromFile("target/poms/test-dependency-test-scope.xml")
                .resolve("org.jboss.shrinkwrap.test:test-managed-dependency").withoutTransitivity().as(File.class);

        new ValidationUtil("test-managed-dependency").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.