Search in sources :

Example 96 with JavaArchive

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

the class WarPackagingTestCase method deploy.

@Deployment(name = "test")
public static Archive<?> deploy() {
    WebArchive war = ShrinkWrap.create(WebArchive.class, ARCHIVE_NAME + ".war");
    // classes directly in war
    war.addClasses(Servlet.class, WarBean.class, WarPackagingTestCase.class);
    war.addAsWebInfResource(WarPackagingTestCase.class.getPackage(), "ejb-jar.xml", "ejb-jar.xml");
    war.addAsWebInfResource(WarPackagingTestCase.class.getPackage(), "web.xml", "web.xml");
    // jar with bean interface
    JavaArchive jarInterface = ShrinkWrap.create(JavaArchive.class, "interfacelib.jar");
    jarInterface.addClass(BeanInterface.class);
    // jar with bean implementation
    JavaArchive jar = ShrinkWrap.create(JavaArchive.class, "jarlib.jar");
    jar.addClass(JarBean.class);
    war.addAsLibraries(jarInterface);
    war.addAsLibraries(jar);
    return war;
}
Also used : WebArchive(org.jboss.shrinkwrap.api.spec.WebArchive) JavaArchive(org.jboss.shrinkwrap.api.spec.JavaArchive) OperateOnDeployment(org.jboss.arquillian.container.test.api.OperateOnDeployment) Deployment(org.jboss.arquillian.container.test.api.Deployment)

Example 97 with JavaArchive

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

the class SecurityDDOverrideTestCase method runAsDeployment.

@Deployment
public static Archive<?> runAsDeployment() {
    final Package currentPackage = SecurityDDOverrideTestCase.class.getPackage();
    final JavaArchive jar = ShrinkWrap.create(JavaArchive.class, "ejb3-security-partial-dd-test.jar").addPackage(PartialDDBean.class.getPackage()).addClass(Util.class).addClasses(AbstractSecurityDomainSetup.class, EjbSecurityDomainSetup.class).addAsResource(currentPackage, "users.properties", "users.properties").addAsResource(currentPackage, "roles.properties", "roles.properties").addAsManifestResource(currentPackage, "partial-ejb-jar.xml", "ejb-jar.xml").addAsManifestResource(new StringAsset("Manifest-Version: 1.0\nDependencies: org.jboss.as.controller-client,org.jboss.dmr\n"), "MANIFEST.MF").addAsManifestResource(currentPackage, "permissions.xml", "permissions.xml").addPackage(CommonCriteria.class.getPackage());
    return jar;
}
Also used : StringAsset(org.jboss.shrinkwrap.api.asset.StringAsset) CommonCriteria(org.jboss.as.test.categories.CommonCriteria) Util(org.jboss.as.test.shared.integration.ejb.security.Util) PartialDDBean(org.jboss.as.test.integration.ejb.security.dd.override.PartialDDBean) JavaArchive(org.jboss.shrinkwrap.api.spec.JavaArchive) Deployment(org.jboss.arquillian.container.test.api.Deployment)

Example 98 with JavaArchive

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

the class AsynchronousSecurityTestCase method deploy.

@Deployment
public static Archive<?> deploy() {
    final Package currentPackage = AsynchronousSecurityTestCase.class.getPackage();
    JavaArchive jar = ShrinkWrap.create(JavaArchive.class, ARCHIVE_NAME + ".jar").addPackage(currentPackage).addClass(AnnotationAuthorizationTestCase.class).addClasses(EjbSecurityDomainSetup.class, AbstractSecurityDomainSetup.class, ServerSetupTask.class, Util.class).addAsResource(currentPackage, "roles.properties", "roles.properties").addAsResource(currentPackage, "users.properties", "users.properties").addAsManifestResource(new StringAsset("Dependencies: org.jboss.as.controller-client,org.jboss.dmr\n"), "MANIFEST.MF").addAsManifestResource(currentPackage, "permissions.xml", "permissions.xml").addPackage(CommonCriteria.class.getPackage());
    return jar;
}
Also used : StringAsset(org.jboss.shrinkwrap.api.asset.StringAsset) CommonCriteria(org.jboss.as.test.categories.CommonCriteria) Util(org.jboss.as.test.shared.integration.ejb.security.Util) EjbSecurityDomainSetup(org.jboss.as.test.integration.ejb.security.EjbSecurityDomainSetup) JavaArchive(org.jboss.shrinkwrap.api.spec.JavaArchive) AbstractSecurityDomainSetup(org.jboss.as.test.integration.security.common.AbstractSecurityDomainSetup) ServerSetupTask(org.jboss.as.arquillian.api.ServerSetupTask) Deployment(org.jboss.arquillian.container.test.api.Deployment)

Example 99 with JavaArchive

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

the class ServletUnitTestCase method getClient.

private static JavaArchive getClient(String archiveName) {
    JavaArchive jar = ShrinkWrap.create(JavaArchive.class, archiveName);
    jar.addClasses(WarTestObject.class);
    return jar;
}
Also used : JavaArchive(org.jboss.shrinkwrap.api.spec.JavaArchive)

Example 100 with JavaArchive

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

the class ServletUnitTestCase method getEjbs.

private static JavaArchive getEjbs(String archiveName) {
    JavaArchive jar = ShrinkWrap.create(JavaArchive.class, archiveName);
    jar.addClasses(Session30.class, Session30Bean.class, Session30BusinessLocal.class, Session30BusinessRemote.class, Session30Home.class, Session30Local.class, Session30LocalHome.class, Session30Remote.class, StatefulBean.class, StatefulLocal.class, StatefulRemote.class, StatelessBean.class, StatelessLocal.class, TestObject.class);
    jar.addAsManifestResource(ServletUnitTestCase.class.getPackage(), "jboss-ejb3.xml", "jboss-ejb3.xml");
    return jar;
}
Also used : JavaArchive(org.jboss.shrinkwrap.api.spec.JavaArchive)

Aggregations

JavaArchive (org.jboss.shrinkwrap.api.spec.JavaArchive)636 Deployment (org.jboss.arquillian.container.test.api.Deployment)523 StringAsset (org.jboss.shrinkwrap.api.asset.StringAsset)214 EnterpriseArchive (org.jboss.shrinkwrap.api.spec.EnterpriseArchive)134 WebArchive (org.jboss.shrinkwrap.api.spec.WebArchive)104 OperateOnDeployment (org.jboss.arquillian.container.test.api.OperateOnDeployment)64 File (java.io.File)56 ResourceAdapterArchive (org.jboss.shrinkwrap.api.spec.ResourceAdapterArchive)53 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