Examples of ValidationUtil


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

    public void nonTransitiveFilter() {

        File file = Maven.resolver().loadPomFromFile("target/poms/test-child.xml")
            .resolve("org.jboss.shrinkwrap.test:test-child:1.0.0").withoutTransitivity().asSingle(File.class);

        new ValidationUtil("test-child-1.0.0.jar").validate(file);
    }
View Full Code Here

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

    public void nonTransitiveFilterInferredVersion() {

        File file = Maven.resolver().loadPomFromFile("target/poms/test-remote-child.xml")
            .resolve("org.jboss.shrinkwrap.test:test-deps-c").withoutTransitivity().asSingle(File.class);

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

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

        // no pom.xml file was loaded here
        File file = Maven.configureResolver().fromFile(REMOTE_ENABLED_SETTINGS)
            .resolve("org.jboss.shrinkwrap.test:test-dependency:1.0.0")
            .using(new AcceptScopesStrategy(ScopeType.RUNTIME)).asSingle(File.class);

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

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

            .resolve("org.jboss.shrinkwrap.test:test-dependency:1.0.0")
            .using(
                new CombinedStrategy(NonTransitiveStrategy.INSTANCE, new AcceptScopesStrategy(ScopeType.COMPILE,
                    ScopeType.TEST))).as(File.class);

        new ValidationUtil("test-dependency-test-1.0.0.jar", "test-dependency-1.0.0.jar").validate(files);

    }
View Full Code Here

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

        File[] files = Maven.resolver().loadPomFromFile("target/poms/test-parent.xml").addDependency(dependency)
                .addDependency(dependency2).resolve()
                .using(new CombinedStrategy(NonTransitiveStrategy.INSTANCE, new AcceptScopesStrategy(ScopeType.TEST)))
                .as(File.class);

        new ValidationUtil("test-dependency-test-1.0.0.jar", "test-dependency-1.0.0.jar").validate(files);
    }
View Full Code Here

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

        File file = Maven.resolver().loadPomFromFile("target/poms/test-parent.xml")
                .addDependencies(dependency, dependency2).resolve()
                .using(new CombinedStrategy(NonTransitiveStrategy.INSTANCE, new AcceptScopesStrategy(ScopeType.PROVIDED)))
                .asSingle(File.class);

        new ValidationUtil("test-dependency-1.0.0.jar").validate(file);
    }
View Full Code Here

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

    public void control1() {
        // This should resolve from Maven Central
        final File file = Maven.resolver().resolve("junit:junit:4.11").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

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

     */
    @Test(expected = NoResolvedResultException.class)
    public void control2() {
        final File file = Maven.resolver().resolve("junit:junit:4.11").withClassPathResolution(false)
                .withMavenCentralRepo(false).withoutTransitivity().asSingle(File.class);
        new ValidationUtil("junit").validate(file);
        final File localRepo = new File(FAKE_REPO);
        Assert.assertTrue(file.getAbsolutePath().contains(localRepo.getAbsolutePath()));
    }
View Full Code Here

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

     */
    @Test(expected = InvalidConfigurationFileException.class)
    public void control4() {
        final File file = Maven.configureResolver().withClassPathResolution(false)
                .withMavenCentralRepo(false).loadPomFromFile("pom.xml").resolve("junit:junit").withoutTransitivity().asSingle(File.class);
        new ValidationUtil("junit").validate(file);
        final File localRepo = new File(FAKE_REPO);
        Assert.assertTrue(file.getAbsolutePath().contains(localRepo.getAbsolutePath()));
    }
View Full Code Here

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

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

        new ValidationUtil("test-deps-a-1.0.0", "test-managed-dependency-1.0.0").validate(files);
    }
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.