Search in sources :

Example 96 with EnterpriseArchive

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;
}
Also used : EnterpriseArchive(org.jboss.shrinkwrap.api.spec.EnterpriseArchive) JavaArchive(org.jboss.shrinkwrap.api.spec.JavaArchive) Deployment(org.jboss.arquillian.container.test.api.Deployment)

Example 97 with EnterpriseArchive

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;
}
Also used : EnterpriseArchive(org.jboss.shrinkwrap.api.spec.EnterpriseArchive) JavaArchive(org.jboss.shrinkwrap.api.spec.JavaArchive) Deployment(org.jboss.arquillian.container.test.api.Deployment)

Example 98 with EnterpriseArchive

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;
}
Also used : EnterpriseArchive(org.jboss.shrinkwrap.api.spec.EnterpriseArchive) StringAsset(org.jboss.shrinkwrap.api.asset.StringAsset) JavaArchive(org.jboss.shrinkwrap.api.spec.JavaArchive) Deployment(org.jboss.arquillian.container.test.api.Deployment)

Example 99 with EnterpriseArchive

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;
}
Also used : EnterpriseArchive(org.jboss.shrinkwrap.api.spec.EnterpriseArchive) WebArchive(org.jboss.shrinkwrap.api.spec.WebArchive) JavaArchive(org.jboss.shrinkwrap.api.spec.JavaArchive) Deployment(org.jboss.arquillian.container.test.api.Deployment)

Example 100 with EnterpriseArchive

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;
}
Also used : EnterpriseArchive(org.jboss.shrinkwrap.api.spec.EnterpriseArchive) WebArchive(org.jboss.shrinkwrap.api.spec.WebArchive) TraceServlet(org.jboss.as.test.clustering.cluster.singleton.servlet.TraceServlet)

Aggregations

EnterpriseArchive (org.jboss.shrinkwrap.api.spec.EnterpriseArchive)157 Deployment (org.jboss.arquillian.container.test.api.Deployment)137 JavaArchive (org.jboss.shrinkwrap.api.spec.JavaArchive)133 WebArchive (org.jboss.shrinkwrap.api.spec.WebArchive)80 StringAsset (org.jboss.shrinkwrap.api.asset.StringAsset)54 OperateOnDeployment (org.jboss.arquillian.container.test.api.OperateOnDeployment)21 ResourceAdapterArchive (org.jboss.shrinkwrap.api.spec.ResourceAdapterArchive)11 BeforeClass (org.junit.BeforeClass)10 ModelNode (org.jboss.dmr.ModelNode)8 OperationBuilder (org.jboss.as.controller.client.OperationBuilder)7 File (java.io.File)6 HttpRequest (org.jboss.as.test.integration.common.HttpRequest)6 AbstractMgmtTestBase (org.jboss.as.test.integration.management.base.AbstractMgmtTestBase)4 ByteArrayAsset (org.jboss.shrinkwrap.api.asset.ByteArrayAsset)4 ZipExporterImpl (org.jboss.shrinkwrap.impl.base.exporter.zip.ZipExporterImpl)4 Properties (java.util.Properties)3 PropertyPermission (java.util.PropertyPermission)3 ZipExporter (org.jboss.shrinkwrap.api.exporter.ZipExporter)3 BasicPath (org.jboss.shrinkwrap.impl.base.path.BasicPath)3 FilePermission (java.io.FilePermission)2