本文整理匯總了Java中org.jboss.shrinkwrap.resolver.api.maven.Maven.resolver方法的典型用法代碼示例。如果您正苦於以下問題:Java Maven.resolver方法的具體用法?Java Maven.resolver怎麽用?Java Maven.resolver使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類org.jboss.shrinkwrap.resolver.api.maven.Maven
的用法示例。
在下文中一共展示了Maven.resolver方法的6個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: obtainBomDependencies
import org.jboss.shrinkwrap.resolver.api.maven.Maven; //導入方法依賴的package包/類
protected Set<MavenDependency> obtainBomDependencies(String urlLocation) throws IOException, MojoExecutionException {
ArtifactResult artifact = downloadAndInstallArtifact(urlLocation);
File file = artifact.getArtifact().getFile();
MavenResolverSystem resolver = Maven.resolver();
resolver.loadPomFromFile(file).importCompileAndRuntimeDependencies();
MavenWorkingSession session =((MavenWorkingSessionContainer)resolver).getMavenWorkingSession();
return session.getDependencyManagement();
}
示例2: deployment
import org.jboss.shrinkwrap.resolver.api.maven.Maven; //導入方法依賴的package包/類
@Deployment
public static Archive<?> deployment() {
WebArchive war = Deployments.getBaseDeployment();
MavenResolverSystem resolver = Maven.resolver();
war.addAsLibraries(resolver.loadPomFromFile("pom.xml")
.resolve("com.jayway.restassured:rest-assured")
.withTransitivity().asFile());
System.out.println(war.toString(true));
return war;
}
示例3: createDeployment
import org.jboss.shrinkwrap.resolver.api.maven.Maven; //導入方法依賴的package包/類
@Deployment(testable = false)
public static WebArchive createDeployment() {
MavenResolverSystem resolver = Maven.resolver();
WebArchive webArchive = ShrinkWrap.create(WebArchive.class, "viewscopedbean.war")
.setWebXML(new File(WEBAPP_SRC, "WEB-INF/web.xml"))
.addClass(ViewScopedBean.class)
.addAsLibraries(resolver.loadPomFromFile("pom.xml").resolve("org.primefaces:primefaces:5.1").withoutTransitivity().asFile())
.addAsWebResource(new File(WEBAPP_SRC, "index.xhtml"))
.addAsWebInfResource(EmptyAsset.INSTANCE, "beans.xml");
System.out.println(webArchive.toString(true));
return webArchive;
}
示例4: war
import org.jboss.shrinkwrap.resolver.api.maven.Maven; //導入方法依賴的package包/類
@Deployment
public static Archive<?> war() {
final MavenResolverSystem resolver = Maven.resolver();
final String jerseyVersion = "2.17";
final String hkApi = "2.4.0-b16";
return ShrinkWrap.create(WebArchive.class, "OverridedClientTest.war")
.addAsServiceProvider(ClientBuilder.class.getName(), "org.glassfish.jersey.client.JerseyClientBuilder") // missing in jersey
.addAsLibraries(resolver.resolve("org.glassfish.jersey.core:jersey-common:" + jerseyVersion).withoutTransitivity().asFile())
.addAsLibraries(resolver.resolve("org.glassfish.jersey.core:jersey-client:" + jerseyVersion).withoutTransitivity().asFile())
.addAsLibraries(resolver.resolve("org.glassfish.hk2:hk2-api:" + hkApi).withoutTransitivity().asFile())
.addAsLibraries(resolver.resolve("org.glassfish.hk2:hk2-core:" + hkApi).withoutTransitivity().asFile())
.addAsLibraries(resolver.resolve("org.glassfish.jersey.bundles.repackaged:jersey-guava:" + jerseyVersion).withoutTransitivity().asFile());
}
示例5: getResolver
import org.jboss.shrinkwrap.resolver.api.maven.Maven; //導入方法依賴的package包/類
private static MavenResolverSystem getResolver() {
return Maven.resolver();
}
示例6: deployment
import org.jboss.shrinkwrap.resolver.api.maven.Maven; //導入方法依賴的package包/類
@Deployment
public static Archive<?> deployment() {
MavenResolverSystem resolver = Maven.resolver();
WebArchive war = Deployments.getBaseDeployment();
war.addAsLibraries(resolver.loadPomFromFile("pom.xml")
.resolve("com.jayway.restassured:rest-assured").withTransitivity().asFile());
System.out.println(war.toString(true));
return war;
}