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

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


    public void importRuntimeDependencies() {
        File[] files = Maven.configureResolver().fromFile(REMOTE_ENABLED_SETTINGS)
                .loadPomFromFile("target/poms/test-dependency-scopes.xml")
                .importRuntimeDependencies().resolve().withTransitivity().as(File.class);

        new ValidationUtil("test-deps-a", "test-deps-i", "test-deps-g", "test-deps-h").validate(files);
    }
View Full Code Here


    public void importTestOnlyDependencies() {
        File[] files = Maven.configureResolver().fromFile(REMOTE_ENABLED_SETTINGS)
                .loadPomFromFile("target/poms/test-dependency-scopes.xml")
                .importTestDependencies().resolve().withTransitivity().as(File.class);

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

    @Test
    public void wrongScopeDefined() {
        File[] jars = Maven.configureResolver().fromFile(SETTINGS_XML).loadPomFromFile("target/poms/test-wrong-scope.xml")
                .importRuntimeAndTestDependencies().resolve().withTransitivity().asFile();

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

    @Test
    public void wrongScopeRetrieved() {
        File[] jars = Maven.configureResolver().fromFile(SETTINGS_XML)
                .resolve("org.jboss.shrinkwrap.test:test-wrong-scope:1.0.0").withTransitivity().asFile();

        new ValidationUtil("test-wrong-scope", "test-deps-a").validate(jars);
    }
View Full Code Here

    @Test
    public void searchRemoteWithCorrectPassword() throws Exception {
        // Configure with correct password and expect to pass
        final File resolved = Maven.configureResolver().fromFile("target/settings/profiles/settings-auth.xml")
                .resolve("org.jboss.shrinkwrap.test:test-deps-i:1.0.0").withoutTransitivity().asSingle(File.class);
        new ValidationUtil("test-deps-i").validate(resolved);
    }
View Full Code Here

                "target/settings/profiles/settings-security.xml");

        // Configure with correct password and expect to pass
        final File resolved = Maven.configureResolver().fromFile("target/settings/profiles/settings-auth-encrypted.xml")
                .resolve("org.jboss.shrinkwrap.test:test-deps-i:1.0.0").withoutTransitivity().asSingle(File.class);
        new ValidationUtil("test-deps-i").validate(resolved);
    }
View Full Code Here

        // FIXME for some reason transitive dependencies defined in <dependencyManagement> section are not honored
        File[] files = Resolvers.use(MavenResolverSystem.class)
            .loadPomFromFile("target/poms/test-depmngmt-transitive.xml").importRuntimeDependencies().resolve().withTransitivity().as(File.class);

        Assert.assertEquals("Exactly 2 files were resolved", 2, files.length);
        new ValidationUtil("test-deps-b-2.0.0", "test-deps-c-1.0.0").validate(files);

    }
View Full Code Here

     // FIXME for some reason transitive dependencies defined in <dependencyManagement> section are not honored
        File[] files = Resolvers.use(MavenResolverSystem.class).loadPomFromFile("target/poms/test-child-depmngmt.xml")
            .importRuntimeDependencies().resolve().withTransitivity().as(File.class);

        new ValidationUtil("test-deps-j-1.0.0", "test-managed-dependency-2.0.0").validate(files);

    }
View Full Code Here

        File[] files = Maven.configureResolver().fromFile("target/settings/profiles/settings.xml")
                .resolve("org.jboss.shrinkwrap.test:test-system-scope:pom:1.0.0")
                .withTransitivity().asFile();

        new ValidationUtil("tools").validate(files);
    }
View Full Code Here

    public void control() {
        // This should resolve from Maven Central
        final File file = Maven.resolver().loadPomFromFile("pom.xml").resolve("junit:junit")
            .withClassPathResolution(false).withoutTransitivity().asSingle(File.class);
        // Ensure we get JUnit
        new ValidationUtil("junit").validate(file);
        final File localRepo = new File(FAKE_REPO);
        // Ensure we're pulling from the alternate repo we've designated above
        Assert.assertTrue(file.getAbsolutePath().contains(localRepo.getAbsolutePath()));
    }
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.