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


Java JavaArchive.addPackage方法代碼示例

本文整理匯總了Java中org.jboss.shrinkwrap.api.spec.JavaArchive.addPackage方法的典型用法代碼示例。如果您正苦於以下問題:Java JavaArchive.addPackage方法的具體用法?Java JavaArchive.addPackage怎麽用?Java JavaArchive.addPackage使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在org.jboss.shrinkwrap.api.spec.JavaArchive的用法示例。


在下文中一共展示了JavaArchive.addPackage方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: createJavaDeployment

import org.jboss.shrinkwrap.api.spec.JavaArchive; //導入方法依賴的package包/類
@Deployment
public static JavaArchive createJavaDeployment() {
	final JavaArchive jar = create(JavaArchive.class, "alternative-test.jar");
	jar.addPackage(Coder.class.getPackage());
	jar.addPackage(CoderBrutalImpl.class.getPackage());
	jar.addAsManifestResource(new FileAsset(new File("src/test/resources/META-INF/beans-alternative.xml")),
			"beans.xml");
	return jar;
}
 
開發者ID:PacktPublishing,項目名稱:Mastering-Java-EE-Development-with-WildFly,代碼行數:10,代碼來源:AlternativeTestCase.java

示例2: createEJBDeployment

import org.jboss.shrinkwrap.api.spec.JavaArchive; //導入方法依賴的package包/類
@Deployment
public static JavaArchive createEJBDeployment() {
	final JavaArchive jar = create(JavaArchive.class, "scopes-test.jar");
	jar.addPackage(MyPosts.class.getPackage());
	jar.addAsManifestResource(new FileAsset(new File("src/test/resources/META-INF/persistence-test.xml")),
			"persistence.xml");
	return jar;
}
 
開發者ID:PacktPublishing,項目名稱:Mastering-Java-EE-Development-with-WildFly,代碼行數:9,代碼來源:ScopesTestCase.java

示例3: createJavaDeployment

import org.jboss.shrinkwrap.api.spec.JavaArchive; //導入方法依賴的package包/類
@Deployment
public static JavaArchive createJavaDeployment() {
	final JavaArchive jar = create(JavaArchive.class, "inject-test.jar");
	jar.addPackage(Service.class.getPackage());
	jar.addPackage(CommentService.class.getPackage());
	jar.addPackage(Book.class.getPackage());
	jar.addPackage(UserNumberBean.class.getPackage());
	jar.addPackage(Bank.class.getPackage());
	jar.addPackage(MockBean.class.getPackage());
	jar.addAsManifestResource(INSTANCE, "beans.xml");
	return jar;
}
 
開發者ID:PacktPublishing,項目名稱:Mastering-Java-EE-Development-with-WildFly,代碼行數:13,代碼來源:InjectTestCase.java

示例4: 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

示例5: 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

示例6: createEJBDeployment

import org.jboss.shrinkwrap.api.spec.JavaArchive; //導入方法依賴的package包/類
@Deployment
public static EnterpriseArchive createEJBDeployment() {
	final EnterpriseArchive ear = create(EnterpriseArchive.class, "xml-test.ear");
	final JavaArchive jar = create(JavaArchive.class, "xml-test.jar");
	jar.addPackage(XMLRemote.class.getPackage());
	jar.addAsManifestResource(new FileAsset(new File("src/test/resources/META-INF/ejb-jar.xml")), "ejb-jar.xml");
	ear.addAsModule(jar);
	return ear;
}
 
開發者ID:PacktPublishing,項目名稱:Mastering-Java-EE-Development-with-WildFly,代碼行數:10,代碼來源:XMLTestCase.java

示例7: createJavaDeployment

import org.jboss.shrinkwrap.api.spec.JavaArchive; //導入方法依賴的package包/類
@Deployment
public static JavaArchive createJavaDeployment() {
	final JavaArchive jar = create(JavaArchive.class, "models-test.jar");
	jar.addPackage(MyCallableTask.class.getPackage());
	jar.addClass(Account.class);
	jar.addPackage(NoConcurrentWriteAccount.class.getPackage());
	jar.addAsManifestResource(new FileAsset(new File("src/test/resources/META-INF/persistence-test.xml")),
			"persistence.xml");
	jar.addAsManifestResource(INSTANCE, "beans.xml");
	return jar;
}
 
開發者ID:PacktPublishing,項目名稱:Mastering-Java-EE-Development-with-WildFly,代碼行數:12,代碼來源:ModelsTestCase.java

示例8: 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

示例9: createEJBDeployment

import org.jboss.shrinkwrap.api.spec.JavaArchive; //導入方法依賴的package包/類
@Deployment
public static JavaArchive createEJBDeployment() {
	final JavaArchive jar = create(JavaArchive.class, "distributed-test.jar");
	jar.addPackage(Magazine.class.getPackage());
	jar.addAsManifestResource(new FileAsset(new File("src/test/resources/distributed/persistence-magazine.xml")),
			"persistence.xml");
	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,代碼行數:11,代碼來源:DistributedTestCase.java

示例10: createCDIDeployment

import org.jboss.shrinkwrap.api.spec.JavaArchive; //導入方法依賴的package包/類
@Deployment
public static JavaArchive createCDIDeployment() {
	final JavaArchive jar = create(JavaArchive.class, "interceptors-cdi-test.jar");
	jar.addPackage(Audit.class.getPackage());
	jar.addPackage(Item.class.getPackage());
	jar.addAsManifestResource(new FileAsset(new File("src/test/resources/META-INF/beans-interceptors.xml")),
			"beans.xml");
	return jar;
}
 
開發者ID:PacktPublishing,項目名稱:Mastering-Java-EE-Development-with-WildFly,代碼行數:10,代碼來源:InterceptorsTestCase.java

示例11: createJavaArchive

import org.jboss.shrinkwrap.api.spec.JavaArchive; //導入方法依賴的package包/類
public static JavaArchive createJavaArchive(String name, Package... packages) {
	final JavaArchive jar = create(JavaArchive.class, name);
	for (Package packagev : packages)
		jar.addPackage(packagev);
	jar.addAsManifestResource(INSTANCE, "beans.xml");
	jar.addAsManifestResource(new FileAsset(new File("src/test/resources/META-INF/persistence-test.xml")),
			"persistence.xml");
	return jar;
}
 
開發者ID:PacktPublishing,項目名稱:Mastering-Java-EE-Development-with-WildFly,代碼行數:10,代碼來源:Default.java

示例12: createJavaDeployment

import org.jboss.shrinkwrap.api.spec.JavaArchive; //導入方法依賴的package包/類
@Deployment
public static JavaArchive createJavaDeployment() {
	final JavaArchive jar = create(JavaArchive.class, "resource-injection-test.jar");
	jar.addPackage(CommonBean.class.getPackage());
	jar.addAsManifestResource(INSTANCE, "beans.xml");
	return jar;
}
 
開發者ID:PacktPublishing,項目名稱:Mastering-Java-EE-Development-with-WildFly,代碼行數:8,代碼來源:ContainerInjectionTestCase.java

示例13: createJavaDeployment

import org.jboss.shrinkwrap.api.spec.JavaArchive; //導入方法依賴的package包/類
@Deployment
public static JavaArchive createJavaDeployment() {
	final JavaArchive jar = create(JavaArchive.class, "context-spi-test.jar");
	jar.addPackage(ConversationBean.class.getPackage());
	jar.addAsManifestResource(INSTANCE, "beans.xml");
	return jar;
}
 
開發者ID:PacktPublishing,項目名稱:Mastering-Java-EE-Development-with-WildFly,代碼行數:8,代碼來源:ContextSPITestCase.java

示例14: createJavaDeployment

import org.jboss.shrinkwrap.api.spec.JavaArchive; //導入方法依賴的package包/類
@Deployment
public static JavaArchive createJavaDeployment() {
	final JavaArchive jar = create(JavaArchive.class, "event-test.jar");
	jar.addPackage(ConfigurationKey.class.getPackage());
	jar.addAsManifestResource(INSTANCE, "beans.xml");
	return jar;
}
 
開發者ID:PacktPublishing,項目名稱:Mastering-Java-EE-Development-with-WildFly,代碼行數:8,代碼來源:UtilTestCase.java

示例15: createEJBDeployment

import org.jboss.shrinkwrap.api.spec.JavaArchive; //導入方法依賴的package包/類
@Deployment
public static JavaArchive createEJBDeployment() {
	final JavaArchive jar = create(JavaArchive.class, "interfaces-test.jar");
	jar.addPackage(Topics.class.getPackage());
	return jar;
}
 
開發者ID:PacktPublishing,項目名稱:Mastering-Java-EE-Development-with-WildFly,代碼行數:7,代碼來源:InterfacesTestCase.java


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