本文整理汇总了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;
}