当前位置: 首页>>代码示例>>Java>>正文


Java EnterpriseArchive.addAsManifestResource方法代码示例

本文整理汇总了Java中org.jboss.shrinkwrap.api.spec.EnterpriseArchive.addAsManifestResource方法的典型用法代码示例。如果您正苦于以下问题:Java EnterpriseArchive.addAsManifestResource方法的具体用法?Java EnterpriseArchive.addAsManifestResource怎么用?Java EnterpriseArchive.addAsManifestResource使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.jboss.shrinkwrap.api.spec.EnterpriseArchive的用法示例。


在下文中一共展示了EnterpriseArchive.addAsManifestResource方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: setJBossDeploymentStructureXml

import org.jboss.shrinkwrap.api.spec.EnterpriseArchive; //导入方法依赖的package包/类
/**
 * This method sets a new JBoss deployment structure for an enterprise
 * archive.
 * 
 * @param enterpriseArchive
 *            is the {@link EnterpriseArchive} to be edited.
 * @param jbossDeploymentStructure
 *            is the content of the new deployment structure.
 * @throws IOException
 *             No application.xml found
 */
public static void setJBossDeploymentStructureXml(
		EnterpriseArchive enterpriseArchive, String jbossDeploymentStructure)
		throws IOException {
	File tempFile = File.createTempFile(
			JBOSS_DEPLOYMENT_STRUCTURE_XML_FILE_NAME, ".temp");
	tempFile.deleteOnExit();
	IOUtils.write(jbossDeploymentStructure, new FileOutputStream(tempFile));
	// delete the old descriptor
	enterpriseArchive.delete(JBOSS_DEPLOYMENT_STRUCTURE_XML_PATH);
	// set the new descriptor
	enterpriseArchive.addAsManifestResource(tempFile,
			JBOSS_DEPLOYMENT_STRUCTURE_XML_FILE_NAME);
}
 
开发者ID:PureSolTechnologies,项目名称:Purifinity,代码行数:25,代码来源:EnterpriseArchiveUtils.java

示例2: deployWarInsideEar

import org.jboss.shrinkwrap.api.spec.EnterpriseArchive; //导入方法依赖的package包/类
@Deployment(order = 4, name = "war-inside-ear")
public static Archive<?> deployWarInsideEar() throws Exception {
        WebArchive warLib = ShrinkWrap.create(WebArchive.class, "bootstrap.war");
    warLib.addClasses(DatabaseBootstrapWarTester.class);
    warLib.addClasses(HibernateTestUtil.class);
    warLib.addClasses(BootstrapDatabaseITCase.class);
    warLib.addAsWebInfResource("META-INF/persistence.xml", "classes/META-INF/persistence.xml");
    warLib.addAsWebInfResource(EmptyAsset.INSTANCE, ArchivePaths.create("classes/META-INF/beans.xml"));
    warLib.addAsWebInfResource(new StringAsset(hibernate_cfg_xml), "classes/META-INF/hibernate.cfg.xml");
    EnterpriseArchive ear = ShrinkWrap.create(EnterpriseArchive.class, ARCHIVE_NAME + "-war-inside-ear.ear");
    ear.addAsManifestResource(new StringAsset(generateEarDeploymentStructure("bootstrap.war")), "jboss-deployment-structure.xml");
    ear.addAsModule(warLib);
    return ear;
}
 
开发者ID:wildfly-extras,项目名称:db-bootstrap,代码行数:15,代码来源:BootstrapDatabaseITCase.java

示例3: addToEarManifestIfExists

import org.jboss.shrinkwrap.api.spec.EnterpriseArchive; //导入方法依赖的package包/类
public static void addToEarManifestIfExists(EnterpriseArchive archive, String resource)
{
    URL url = TestDeployment.class.getClassLoader().getResource(resource);
    if (url != null) {
        archive.addAsManifestResource(resource);
    }
}
 
开发者ID:apache,项目名称:deltaspike,代码行数:8,代码来源:TestDeployments.java

示例4: getEarDeployment

import org.jboss.shrinkwrap.api.spec.EnterpriseArchive; //导入方法依赖的package包/类
protected static EnterpriseArchive getEarDeployment(String applicationXml, String gaeApplicationXml, WebArchive... wars) {
    EnterpriseArchive ear = toEarDeployment(wars);
    ear.addAsManifestResource(applicationXml, "application.xml");
    ear.addAsResource(gaeApplicationXml, "appengine-application.xml");
    return ear;
}
 
开发者ID:GoogleCloudPlatform,项目名称:appengine-tck,代码行数:7,代码来源:ModulesTestBase.java


注:本文中的org.jboss.shrinkwrap.api.spec.EnterpriseArchive.addAsManifestResource方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。