Search in sources :

Example 51 with JavaArchive

use of org.jboss.shrinkwrap.api.spec.JavaArchive in project wildfly by wildfly.

the class InvokedBusinessInterfaceUnitTestCase method deployment.

@Deployment
public static Archive<?> deployment() {
    final JavaArchive jar = ShrinkWrap.create(JavaArchive.class, ARCHIVE_NAME + ".jar").addPackage(InvokedBusinessInterfaceUnitTestCase.class.getPackage());
    jar.addAsManifestResource(InvokedBusinessInterfaceUnitTestCase.class.getPackage(), "ejb-jar.xml", "ejb-jar.xml");
    return jar;
}
Also used : JavaArchive(org.jboss.shrinkwrap.api.spec.JavaArchive) Deployment(org.jboss.arquillian.container.test.api.Deployment)

Example 52 with JavaArchive

use of org.jboss.shrinkwrap.api.spec.JavaArchive in project wildfly by wildfly.

the class JBossDeploymentStructure11ParsingTestCase method createDeployment.

@Deployment
public static Archive createDeployment() {
    final JavaArchive ejbJar = ShrinkWrap.create(JavaArchive.class, MODULE_NAME + ".jar");
    ejbJar.addPackage(JBossDeploymentStructure11ParsingTestCase.class.getPackage());
    ejbJar.addAsManifestResource(JBossDeploymentStructure11ParsingTestCase.class.getPackage(), "jboss-deployment-structure_1_1.xml", "jboss-deployment-structure.xml");
    return ejbJar;
}
Also used : JavaArchive(org.jboss.shrinkwrap.api.spec.JavaArchive) Deployment(org.jboss.arquillian.container.test.api.Deployment)

Example 53 with JavaArchive

use of org.jboss.shrinkwrap.api.spec.JavaArchive in project wildfly by wildfly.

the class SubDirectoryModuleDeploymentTestCase method createDeployment.

@Deployment
public static Archive<?> createDeployment() {
    final EnterpriseArchive ear = ShrinkWrap.create(EnterpriseArchive.class, "subdirectory.ear");
    final JavaArchive jarOne = ShrinkWrap.create(JavaArchive.class, "ejb.jar");
    jarOne.addClass(MessageBean.class);
    ear.addAsModule(new ArchiveAsset(jarOne, ZipExporter.class), "subdir/ejb/ejb.jar");
    final WebArchive war = ShrinkWrap.create(WebArchive.class, "web.war");
    war.addClass(MessageServlet.class);
    ear.addAsModule(new ArchiveAsset(war, ZipExporter.class), "subdir/web/web.war");
    return ear;
}
Also used : EnterpriseArchive(org.jboss.shrinkwrap.api.spec.EnterpriseArchive) ZipExporter(org.jboss.shrinkwrap.api.exporter.ZipExporter) WebArchive(org.jboss.shrinkwrap.api.spec.WebArchive) ArchiveAsset(org.jboss.shrinkwrap.api.asset.ArchiveAsset) JavaArchive(org.jboss.shrinkwrap.api.spec.JavaArchive) Deployment(org.jboss.arquillian.container.test.api.Deployment)

Example 54 with JavaArchive

use of org.jboss.shrinkwrap.api.spec.JavaArchive in project wildfly by wildfly.

the class SharedBeanInEarsUnitTestCase method deployB.

@Deployment(name = "b", testable = false, managed = true)
public static Archive<?> deployB() {
    EnterpriseArchive ear = ShrinkWrap.create(EnterpriseArchive.class, APP_B + ".ear");
    JavaArchive jarB = ShrinkWrap.create(JavaArchive.class, MOD_B + ".jar");
    jarB.addClasses(BEJB.class, BEJBBean.class);
    JavaArchive jarBshared = ShrinkWrap.create(JavaArchive.class, MOD_B_SHARED + ".jar");
    jarBshared.addClasses(Shared.class, SharedBean.class);
    jarBshared.addAsManifestResource(SharedBeanInEarsUnitTestCase.class.getPackage(), "ejb-jar-b.xml", "ejb-jar.xml");
    ear.addAsModule(jarB);
    ear.addAsModule(jarBshared);
    ear.addAsManifestResource(SharedBeanInEarsUnitTestCase.class.getPackage(), "application-b.xml", "application.xml");
    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 55 with JavaArchive

use of org.jboss.shrinkwrap.api.spec.JavaArchive in project wildfly by wildfly.

the class InfinispanInjectionTestCase method deployment.

@Deployment
public static Archive<?> deployment() {
    JavaArchive jar = ShrinkWrap.create(JavaArchive.class, "infinispan-injection.jar");
    jar.addClasses(InfinispanManagedBean.class, InfinispanInjectionTestCase.class);
    jar.addAsResource(new StringAsset("Manifest-Version: 1.0\nDependencies: org.infinispan export\n"), "META-INF/MANIFEST.MF");
    return jar;
}
Also used : StringAsset(org.jboss.shrinkwrap.api.asset.StringAsset) JavaArchive(org.jboss.shrinkwrap.api.spec.JavaArchive) Deployment(org.jboss.arquillian.container.test.api.Deployment)

Aggregations

JavaArchive (org.jboss.shrinkwrap.api.spec.JavaArchive)644 Deployment (org.jboss.arquillian.container.test.api.Deployment)530 StringAsset (org.jboss.shrinkwrap.api.asset.StringAsset)219 EnterpriseArchive (org.jboss.shrinkwrap.api.spec.EnterpriseArchive)141 WebArchive (org.jboss.shrinkwrap.api.spec.WebArchive)110 OperateOnDeployment (org.jboss.arquillian.container.test.api.OperateOnDeployment)64 File (java.io.File)58 ResourceAdapterArchive (org.jboss.shrinkwrap.api.spec.ResourceAdapterArchive)57 Asset (org.jboss.shrinkwrap.api.asset.Asset)44 ZipExporter (org.jboss.shrinkwrap.api.exporter.ZipExporter)41 ArchivePath (org.jboss.shrinkwrap.api.ArchivePath)29 AbstractMgmtTestBase (org.jboss.as.test.integration.management.base.AbstractMgmtTestBase)25 TargetsContainer (org.jboss.arquillian.container.test.api.TargetsContainer)23 PropertyPermission (java.util.PropertyPermission)19 CommonCriteria (org.jboss.as.test.categories.CommonCriteria)15 JMSOperations (org.jboss.as.test.integration.common.jms.JMSOperations)15 URL (java.net.URL)13 VirtualFile (org.jboss.vfs.VirtualFile)11 ExplodedExporter (org.jboss.shrinkwrap.api.exporter.ExplodedExporter)8 OperationBuilder (org.jboss.as.controller.client.OperationBuilder)6