use of org.jboss.shrinkwrap.api.spec.EnterpriseArchive in project wildfly by wildfly.
the class DefaultConcurrencyEJBTestCase method getDeployment.
@Deployment
public static EnterpriseArchive getDeployment() {
final EnterpriseArchive ear = ShrinkWrap.create(EnterpriseArchive.class, DefaultConcurrencyEJBTestCase.class.getSimpleName() + ".ear");
JavaArchive module = ShrinkWrap.create(JavaArchive.class, "module.jar");
module.addClasses(DefaultConcurrencyEJBTestCase.class, DefaultConcurrencyTestEJB.class);
ear.addAsModule(module);
return ear;
}
use of org.jboss.shrinkwrap.api.spec.EnterpriseArchive in project wildfly by wildfly.
the class DefaultDataSourceEJBTestCase method getDeployment.
@Deployment
public static EnterpriseArchive getDeployment() {
final EnterpriseArchive ear = ShrinkWrap.create(EnterpriseArchive.class, DefaultDataSourceEJBTestCase.class.getSimpleName() + ".ear");
JavaArchive module = ShrinkWrap.create(JavaArchive.class, "module.jar");
module.addClasses(DefaultDataSourceEJBTestCase.class, DefaultDataSourceTestEJB.class);
ear.addAsModule(module);
return ear;
}
use of org.jboss.shrinkwrap.api.spec.EnterpriseArchive in project wildfly by wildfly.
the class ClassFileTransformerTestCase method deploy.
@Deployment
public static Archive<?> deploy() {
JavaArchive persistenceProvider = ShrinkWrap.create(JavaArchive.class, "testpersistenceprovider.jar");
persistenceProvider.addClasses(TestClassTransformer.class, TestEntityManagerFactory.class, TestPersistenceProvider.class, TestAdapter.class);
// META-INF/services/javax.persistence.spi.PersistenceProvider
persistenceProvider.addAsResource(new StringAsset("org.jboss.as.test.integration.jpa.mockprovider.classtransformer.TestPersistenceProvider"), "META-INF/services/javax.persistence.spi.PersistenceProvider");
EnterpriseArchive ear = ShrinkWrap.create(EnterpriseArchive.class, ARCHIVE_NAME + ".ear");
JavaArchive ejbjar = ShrinkWrap.create(JavaArchive.class, "ejbjar.jar");
ejbjar.addAsManifestResource(emptyEjbJar(), "ejb-jar.xml");
ejbjar.addClasses(ClassFileTransformerTestCase.class, SFSB1.class);
ejbjar.addAsManifestResource(ClassFileTransformerTestCase.class.getPackage(), "persistence.xml", "persistence.xml");
// add ejbjar to root of ear
ear.addAsModule(ejbjar);
JavaArchive lib = ShrinkWrap.create(JavaArchive.class, "lib.jar");
lib.addClasses(Employee.class, ClassFileTransformerTestCase.class);
ear.addAsLibraries(lib, persistenceProvider);
return ear;
}
use of org.jboss.shrinkwrap.api.spec.EnterpriseArchive in project wildfly by wildfly.
the class PersistenceUnitWarPackagingTestCase method deploy.
@Deployment
public static Archive<?> deploy() {
EnterpriseArchive ear = ShrinkWrap.create(EnterpriseArchive.class, "scopedToEar.ear");
JavaArchive lib = ShrinkWrap.create(JavaArchive.class, "lib.jar");
lib.addClasses(Employee.class);
lib.addAsManifestResource(PersistenceUnitWarPackagingTestCase.class.getPackage(), "persistence.xml", "persistence.xml");
ear.addAsLibrary(lib);
WebArchive override = ShrinkWrap.create(WebArchive.class, "override.war");
override.addClasses(Organisation.class, OrganisationBean.class, LibPersistenceUnitBean.class, PersistenceUnitWarPackagingTestCase.class);
override.addAsResource(PersistenceUnitWarPackagingTestCase.class.getPackage(), "persistence.xml", "META-INF/persistence.xml");
ear.addAsModule(override);
JavaArchive noOverride = ShrinkWrap.create(JavaArchive.class, "noOverride.jar");
noOverride.addClasses(EmployeeBean.class);
ear.addAsModule(noOverride);
return ear;
}
use of org.jboss.shrinkwrap.api.spec.EnterpriseArchive in project wildfly by wildfly.
the class SingletonDeploymentDescriptorTestCase method createDeployment.
private static Archive<?> createDeployment() {
EnterpriseArchive ear = ShrinkWrap.create(EnterpriseArchive.class, DEPLOYMENT_NAME + ".ear");
WebArchive war = ShrinkWrap.create(WebArchive.class, DEPLOYMENT_NAME + ".war");
war.addPackage(TraceServlet.class.getPackage());
ear.addAsModule(war);
ear.addAsManifestResource(SingletonDeploymentDescriptorTestCase.class.getPackage(), "singleton-deployment.xml", "singleton-deployment.xml");
return ear;
}
Aggregations