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


Java JavaArchive.addAsResource方法代码示例

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


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

示例1: createEJBDeployment

import org.jboss.shrinkwrap.api.spec.JavaArchive; //导入方法依赖的package包/类
@Deployment
public static JavaArchive createEJBDeployment() {
	final JavaArchive jar = create(JavaArchive.class, "remoting-message.jar");
	jar.addAsResource(new FileAsset(new File("src/test/resources/application-users.properties")),
			"users.properties");
	jar.addAsResource(new FileAsset(new File("src/test/resources/application-roles.properties")),
			"roles.properties");
	jar.addAsManifestResource(INSTANCE, "beans.xml");
	return jar;
}
 
开发者ID:PacktPublishing,项目名称:Mastering-Java-EE-Development-with-WildFly,代码行数:11,代码来源:RemoteTestCase.java

示例2: createJavaDeployment

import org.jboss.shrinkwrap.api.spec.JavaArchive; //导入方法依赖的package包/类
@Deployment
public static JavaArchive createJavaDeployment() {
	final JavaArchive jar = create(JavaArchive.class, "readuncommitted-test.jar");
	jar.addPackage(MyCallableTask.class.getPackage());
	jar.addClass(Account.class);
	jar.addAsManifestResource(new FileAsset(new File("src/test/resources/isolations/readuncommitted-test.xml")),
			"persistence.xml");
	jar.addAsResource(new FileAsset(new File("src/test/resources/store.import.sql")), "store.import.sql");
	jar.addAsManifestResource(new FileAsset(new File("src/test/resources/META-INF/MANIFEST.MF")), "MANIFEST.MF");
	jar.addAsManifestResource(INSTANCE, "beans.xml");
	return jar;
}
 
开发者ID:PacktPublishing,项目名称:Mastering-Java-EE-Development-with-WildFly,代码行数:13,代码来源:ReadUncommittedTestCase.java

示例3: createJavaDeployment

import org.jboss.shrinkwrap.api.spec.JavaArchive; //导入方法依赖的package包/类
@Deployment
public static JavaArchive createJavaDeployment() {
	final JavaArchive jar = create(JavaArchive.class, "repeatableread-test.jar");
	jar.addPackage(MyCallableTask.class.getPackage());
	jar.addClass(Account.class);
	jar.addAsManifestResource(new FileAsset(new File("src/test/resources/isolations/repeatableread-test.xml")),
			"persistence.xml");
	jar.addAsResource(new FileAsset(new File("src/test/resources/store.import.sql")), "store.import.sql");
	jar.addAsManifestResource(new FileAsset(new File("src/test/resources/META-INF/MANIFEST.MF")), "MANIFEST.MF");
	jar.addAsManifestResource(INSTANCE, "beans.xml");
	return jar;
}
 
开发者ID:PacktPublishing,项目名称:Mastering-Java-EE-Development-with-WildFly,代码行数:13,代码来源:RepeatableReadTestCase.java

示例4: createJavaDeployment

import org.jboss.shrinkwrap.api.spec.JavaArchive; //导入方法依赖的package包/类
@Deployment
public static JavaArchive createJavaDeployment() {
	final JavaArchive jar = create(JavaArchive.class, "serializable-test.jar");
	jar.addPackage(MyCallableTask.class.getPackage());
	jar.addClass(Account.class);
	jar.addAsManifestResource(new FileAsset(new File("src/test/resources/isolations/serializable-test.xml")),
			"persistence.xml");
	jar.addAsResource(new FileAsset(new File("src/test/resources/store.import.sql")), "store.import.sql");
	jar.addAsManifestResource(new FileAsset(new File("src/test/resources/META-INF/MANIFEST.MF")), "MANIFEST.MF");
	jar.addAsManifestResource(INSTANCE, "beans.xml");
	return jar;
}
 
开发者ID:PacktPublishing,项目名称:Mastering-Java-EE-Development-with-WildFly,代码行数:13,代码来源:SerializableTestCase.java

示例5: createEJBDeployment

import org.jboss.shrinkwrap.api.spec.JavaArchive; //导入方法依赖的package包/类
@Deployment
public static JavaArchive createEJBDeployment() {
	final JavaArchive jar = create(JavaArchive.class, "commit-test.jar");
	jar.addPackage(Account.class.getPackage());
	jar.addAsManifestResource(new FileAsset(new File("src/test/resources/META-INF/persistence-test.xml")),
			"persistence.xml");
	jar.addAsResource(new FileAsset(new File("src/test/resources/store.import.sql")), "store.import.sql");
	jar.addAsManifestResource(INSTANCE, "beans.xml");
	return jar;
}
 
开发者ID:PacktPublishing,项目名称:Mastering-Java-EE-Development-with-WildFly,代码行数:11,代码来源:CommitTestCase.java

示例6: createJavaDeployment

import org.jboss.shrinkwrap.api.spec.JavaArchive; //导入方法依赖的package包/类
@Deployment
public static JavaArchive createJavaDeployment() {
	final JavaArchive jar = create(JavaArchive.class, "readcommitted-test.jar");
	jar.addPackage(MyCallableTask.class.getPackage());
	jar.addClass(Account.class);
	jar.addAsManifestResource(new FileAsset(new File("src/test/resources/isolations/readcommitted-test.xml")),
			"persistence.xml");
	jar.addAsResource(new FileAsset(new File("src/test/resources/store.import.sql")), "store.import.sql");
	jar.addAsManifestResource(new FileAsset(new File("src/test/resources/META-INF/MANIFEST.MF")), "MANIFEST.MF");
	jar.addAsManifestResource(INSTANCE, "beans.xml");
	return jar;
}
 
开发者ID:PacktPublishing,项目名称:Mastering-Java-EE-Development-with-WildFly,代码行数:13,代码来源:ReadCommittedTestCase.java

示例7: createJavaDeployment

import org.jboss.shrinkwrap.api.spec.JavaArchive; //导入方法依赖的package包/类
@Deployment
public static JavaArchive createJavaDeployment() {
	JavaArchive jar = createJavaArchive("common-test.jar", Forum.class.getPackage(),
			ResultEntity.class.getPackage());
	jar.addAsResource(new FileAsset(new File("src/main/resources/forums.import.sql")), "forums.import.sql");
	return jar;
}
 
开发者ID:PacktPublishing,项目名称:Mastering-Java-EE-Development-with-WildFly,代码行数:8,代码来源:CommonTestCase.java

示例8: createJavaDeployment

import org.jboss.shrinkwrap.api.spec.JavaArchive; //导入方法依赖的package包/类
@Deployment
public static JavaArchive createJavaDeployment() {
	final JavaArchive jar = create(JavaArchive.class, "stored-test.jar");
	jar.addAsManifestResource(INSTANCE, "beans.xml");
	jar.addAsManifestResource(new FileAsset(new File("src/test/resources/META-INF/persistence-store.xml")),
			"persistence.xml");
	jar.addAsResource(new FileAsset(new File("src/test/resources/store.import.sql")), "store.import.sql");
	return jar;
}
 
开发者ID:PacktPublishing,项目名称:Mastering-Java-EE-Development-with-WildFly,代码行数:10,代码来源:StoreProcedureTestCase.java

示例9: createJavaDeployment

import org.jboss.shrinkwrap.api.spec.JavaArchive; //导入方法依赖的package包/类
@Deployment
public static JavaArchive createJavaDeployment() {
	JavaArchive jar = createJavaArchive("search-test.jar", Forum.class.getPackage());
	jar.addAsResource(new FileAsset(new File("src/main/resources/forums.import.sql")), "forums.import.sql");
	return jar;
}
 
开发者ID:PacktPublishing,项目名称:Mastering-Java-EE-Development-with-WildFly,代码行数:7,代码来源:SearchTestCase.java

示例10: addFile

import org.jboss.shrinkwrap.api.spec.JavaArchive; //导入方法依赖的package包/类
public static void addFile(JavaArchive archive, String originalPath) {
    archive.addAsResource(new UrlAsset(Thread.currentThread().getContextClassLoader().getResource("internal/" + originalPath)),
            originalPath);
}
 
开发者ID:eclipse,项目名称:ConfigJSR,代码行数:5,代码来源:AbstractTest.java


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