本文整理匯總了Java中org.jboss.shrinkwrap.api.spec.WebArchive.addAsLibraries方法的典型用法代碼示例。如果您正苦於以下問題:Java WebArchive.addAsLibraries方法的具體用法?Java WebArchive.addAsLibraries怎麽用?Java WebArchive.addAsLibraries使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類org.jboss.shrinkwrap.api.spec.WebArchive
的用法示例。
在下文中一共展示了WebArchive.addAsLibraries方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: createWebDeployment
import org.jboss.shrinkwrap.api.spec.WebArchive; //導入方法依賴的package包/類
@Deployment
public static WebArchive createWebDeployment() {
final WebArchive war = create(WebArchive.class, "mailjob-test.war");
File[] files = resolver().loadPomFromFile("pom.xml").importRuntimeDependencies()
.resolve("org.subethamail:subethasmtp:3.1.7").withTransitivity().asFile();
war.addPackage(MailBatchlet.class.getPackage());
war.addAsWebInfResource(INSTANCE, "beans.xml");
war.addAsWebInfResource(new FileAsset(new File("src/main/resources/META-INF/batch-jobs/" + JOB_NAME + ".xml")),
"classes/META-INF/batch-jobs/" + JOB_NAME + ".xml");
war.addAsLibraries(files);
return war;
}
開發者ID:PacktPublishing,項目名稱:Mastering-Java-EE-Development-with-WildFly,代碼行數:13,代碼來源:MailJobTestCase.java
示例2: createDeployment
import org.jboss.shrinkwrap.api.spec.WebArchive; //導入方法依賴的package包/類
@Deployment(testable = false)
public static WebArchive createDeployment() {
WebArchive war = create(WebArchive.class);
File[] files = resolver().loadPomFromFile("pom.xml").importRuntimeDependencies()
.resolve("it.vige:rubia-forums-ejb:2.2.1").withTransitivity().asFile();
war.addAsLibraries(files);
war.addPackages(true, ApplicationTestCase.class.getPackage())
.addAsWebInfResource((new File("src/main/resources", "default_graphics/theme.properties")),
"classes/default_graphics/theme.properties")
.addAsWebInfResource((new File("src/main/resources", "ResourceJSF.properties")),
"classes/ResourceJSF.properties")
.addAsWebInfResource((new File("src/main/resources", "ResourceJSF_it.properties")),
"classes/ResourceJSF_it.properties")
.addAsWebResource(new File(WEBAPP_SRC + "/views/category", "viewcategory_body.xhtml"),
"views/category/viewcategory_body.xhtml")
.addAsWebResource(new File(WEBAPP_SRC + "/views/admin", "index.xhtml"), "views/admin/index.xhtml")
.addAsWebResource(new File(WEBAPP_SRC + "/views/admin", "deletecategory.xhtml"),
"views/admin/deletecategory.xhtml")
.addAsWebResource(new File(WEBAPP_SRC + "/views/category", "viewcategory_body.xhtml"),
"views/category/viewcategory_body.xhtml")
.addAsWebResource(new File(WEBAPP_SRC + "/views/common", "common.xhtml"), "views/common/common.xhtml")
.addAsWebResource(new File(WEBAPP_SRC + "/views/common", "common_decoration.xhtml"),
"views/common/common_decoration.xhtml")
.addAsWebInfResource((new File(WEBAPP_SRC + "/WEB-INF", "web.xml")), "web.xml")
.addAsWebInfResource((new File(WEBAPP_SRC + "/WEB-INF", "faces-config.xml")), "faces-config.xml")
.addAsWebInfResource((new File(WEBAPP_SRC + "/WEB-INF", "forums.taglib.xml")), "forums.taglib.xml")
.addAsWebInfResource((new File(WEBAPP_SRC + "/WEB-INF", "beans.xml")), "beans.xml")
.addAsManifestResource((new File("src/test/resources", "MANIFEST.MF")), "MANIFEST.MF");
return war;
}
開發者ID:PacktPublishing,項目名稱:Mastering-Java-EE-Development-with-WildFly,代碼行數:31,代碼來源:ApplicationTestCase.java
示例3: getDeployment
import org.jboss.shrinkwrap.api.spec.WebArchive; //導入方法依賴的package包/類
@Deployment
public static Archive<?> getDeployment() {
WebArchive war = ShrinkWrap.create(WebArchive.class);
war.addPackage(EntityToModelMapper.class.getPackage());
war.addClasses(GaeSearchRepository.class, SearchData.class, SearchConfiguration.class);
war.addAsWebInfResource("appengine-web.xml");
war.addAsResource("datastore-indexes.xml");
PomEquippedResolveStage pom = Maven.resolver().loadPomFromFile("pom.xml");
war.addAsLibraries(pom.resolve("com.google.appengine:appengine-api-1.0-sdk").withTransitivity().as(File.class));
war.addAsLibraries(pom.resolve("me.snowdrop.data:spring-data-snowdrop-core").withTransitivity().as(File.class));
return war;
}