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

Examples of org.jboss.shrinkwrap.resolver.api.maven.strategy.RejectDependenciesStrategy


   */
  public static JavaArchive[] hibernateSearchLibraries() {
    String currentVersion = Version.getVersionString();
    return Maven.resolver()
      .resolve( "org.hibernate:hibernate-search-orm:" + currentVersion )
      .using( new RejectDependenciesStrategy(
        false, //we need some dependencies at the right version: Lucene, search-engine, etc..
        "org.hibernate:hibernate-core",
        "org.hibernate:hibernate-commons-annotations",
        "org.hibernate.javax.persistence:hibernate-jpa-2.1-api",
        "org.jboss.logging:jboss-logging") )
View Full Code Here


    }

    @Test
    public void testIncludeFromPomWithExclusionFilter() {
        final File[] jars = Maven.resolver().loadPomFromFile("target/poms/test-filter.xml")
            .importRuntimeDependencies().resolve().using(new RejectDependenciesStrategy("org.jboss.shrinkwrap.test:test-deps-c"))
            .as(File.class);

        // We should not bring in b and c, as b is transitive from c, and we excluded c above.
        new ValidationUtil("test-deps-a", "test-deps-d", "test-deps-e").validate(jars);
View Full Code Here

            .loadPomFromFile("target/poms/test-filter.xml")
            .importRuntimeDependencies().resolve()
            .using(
                    // because RejectDependenciesStrategy is rejectTranstivites by default, we remove all mentioned nedpendencies
                    // and their possible ancestors in dependency graph
                    new RejectDependenciesStrategy("org.jboss.shrinkwrap.test:test-deps-a",
                            "org.jboss.shrinkwrap.test:test-deps-c", "org.jboss.shrinkwrap.test:test-deps-d"))
            .asSingle(File.class);

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

                .importRuntimeAndTestDependencies()
                .resolve()
                .using(
                // JavaMelody's ServletFilter/Listener interfere with test
                // deployments
                new RejectDependenciesStrategy(false,
                        "net.bull.javamelody:javamelody-core")).asFile();
    }
View Full Code Here

TOP

Related Classes of org.jboss.shrinkwrap.resolver.api.maven.strategy.RejectDependenciesStrategy

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.