當前位置: 首頁>>代碼示例>>Java>>正文


Java Maven.resolver方法代碼示例

本文整理匯總了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();
}
 
開發者ID:syndesisio,項目名稱:syndesis,代碼行數:11,代碼來源:RepackageExtensionMojo.java

示例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;
}
 
開發者ID:ecabrerar,項目名稱:AirAlliance,代碼行數:13,代碼來源:SectorRestServiceTest.java

示例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;
}
 
開發者ID:cilf,項目名稱:arquillian-java-ee-7-primefaces-5,代碼行數:13,代碼來源:ViewScopedBeanTest.java

示例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());
}
 
開發者ID:apache,項目名稱:tomee,代碼行數:14,代碼來源:OverridedClientTest.java

示例5: getResolver

import org.jboss.shrinkwrap.resolver.api.maven.Maven; //導入方法依賴的package包/類
private static MavenResolverSystem getResolver() {
  return Maven.resolver();
}
 
開發者ID:Qorr,項目名稱:Hvalspik,代碼行數:4,代碼來源:MavenDeployables.java

示例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;
  }
 
開發者ID:ecabrerar,項目名稱:AirAlliance,代碼行數:15,代碼來源:ItineraryRestServiceTest.java


注:本文中的org.jboss.shrinkwrap.resolver.api.maven.Maven.resolver方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。