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

Examples of org.jboss.shrinkwrap.resolver.api.maven.MavenResolverSystem.resolve()


        JavaArchive[] dependencies;

        if (missingDependency.matches("^[^:]+:[^:]+:[^:]+")) {
            // resolution of the artifact without a version specified
            dependencies = resolver.resolve(missingDependency).withClassPathResolution(false).withTransitivity()
                    .as(JavaArchive.class);
        } else {
            // resolution of the artifact without a version specified
            dependencies = resolver.loadPomFromFile("pom.xml").resolve(missingDependency)
                    .withClassPathResolution(false).withTransitivity().as(JavaArchive.class);
View Full Code Here


        }
        MavenResolverSystem earResolver = Resolvers.use(MavenResolverSystem.class);
        // this must be named rhq.ear because the "rhq" portion is used in the jndi names
        earResolver.offline();
        EnterpriseArchive testEar = ShrinkWrap.create(EnterpriseArchive.class, "rhq.ear");
        EnterpriseArchive rhqEar = earResolver.resolve("org.rhq:rhq-enterprise-server-ear:ear:" + projectVersion)
            .withoutTransitivity().asSingle(EnterpriseArchive.class);
        // merge rhq.ear into testEar but include only the EJB jars and the supporting libraries. Note that we
        // don't include the services sar because tests are responsible for prepare/unprepare of all required services,
        // we don't want the production services performing any unexpected work.
        testEar = testEar.merge(rhqEar, Filters.include("/lib.*|/rhq.*ejb3\\.jar.*|/rhq-server.jar.*"));
 
View Full Code Here

            // settings.xml profiles.  We know at this point the driver is in the local repo, try going offline
            // at this point to force local repo resolution since the oracle driver is not in public repos.
            // see http://stackoverflow.com/questions/6291146/arquillian-shrinkwrap-mavendependencyresolver-behind-proxy
            // Last verified this problem using: Arquillian 1.0.3 bom
            resolver.offline();
            dependencies.addAll(Arrays.asList(resolver
                .resolve("com.oracle:ojdbc6:jar:" + System.getProperty("rhq.ojdbc.version")).withTransitivity()
                .as(JavaArchive.class)));
        }

        // Transitive test dep required by rhq-core-client-api above and for some reason not sucked in.
View Full Code Here

                .as(JavaArchive.class)));
        }

        // Transitive test dep required by rhq-core-client-api above and for some reason not sucked in.
        // TODO: pass in version from pom property
        dependencies.addAll(Arrays.asList(resolver.resolve("commons-jxpath:commons-jxpath:1.3").withTransitivity()
            .as(JavaArchive.class)));

        // exclude any transitive deps we don't want
        String[] excludeFilters = { "testng.*jdk", "rhq-core-domain.*jar" };
        dependencies = exclude(dependencies, excludeFilters);
View Full Code Here

      if (mavenIsUsed())
      {
         resolver.loadPomFromFile(POM_XML);
      }

      return resolver.resolve(artifact).withTransitivity().asFile();
   }

   private boolean mavenIsUsed()
   {
      return new File(POM_XML).exists();
View Full Code Here

    }

    @Test
    public void testMavenSystemResolverAsSessionContainer() {
        MavenResolverSystem resolver = Maven.resolver();
        resolver.resolve("org.jboss.shrinkwrap.test:test-deps-a:1.0.0");

        List<MavenDependency> dependencies = ((MavenWorkingSessionContainer) resolver).getMavenWorkingSession()
                .getDependenciesForResolution();
        Assert.assertEquals("There is one dependency to be resolved", 1, dependencies.size());
        Assert.assertEquals("Dependency artifactId to be resolved matches", "test-deps-a", dependencies.iterator().next()
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.