Search in sources :

Example 1 with JavaArchive

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

the class RemoteStatelessFailoverTestCase method createDeploymentOnDescriptor.

private static Archive<?> createDeploymentOnDescriptor() {
    final JavaArchive jar = ShrinkWrap.create(JavaArchive.class, ARCHIVE_NAME_DD + ".jar");
    jar.addClasses(StatelessBeanBase.class, StatelessBeanDD.class, StatelessRemote.class, StatelessRemoteHome.class);
    jar.addClass(NodeNameGetter.class);
    jar.addAsManifestResource(RemoteStatelessFailoverTestCase.class.getPackage(), "ejb-jar.xml", "ejb-jar.xml");
    return jar;
}
Also used : JavaArchive(org.jboss.shrinkwrap.api.spec.JavaArchive)

Example 2 with JavaArchive

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

the class RemoteStatelessFailoverTestCase method createDeployment.

private static Archive<?> createDeployment() {
    final JavaArchive jar = ShrinkWrap.create(JavaArchive.class, ARCHIVE_NAME + ".jar");
    jar.addClasses(StatelessBeanBase.class, StatelessBean.class, StatelessRemote.class, StatelessRemoteHome.class);
    jar.addClass(NodeNameGetter.class);
    return jar;
}
Also used : JavaArchive(org.jboss.shrinkwrap.api.spec.JavaArchive)

Example 3 with JavaArchive

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

the class IIOPSslInvocationTestCase method legacyServer.

@Deployment(name = "legacy-server", testable = false)
@TargetsContainer("iiop-legacy-server")
public static Archive<?> legacyServer() {
    final JavaArchive jar = ShrinkWrap.create(JavaArchive.class, "server.jar");
    jar.addClasses(IIOPSslStatelessBean.class, IIOPSslStatelessHome.class, IIOPSslStatelessRemote.class).addAsManifestResource(IIOPSslInvocationTestCase.class.getPackage(), "legacy-jboss-ejb3.xml", "jboss-ejb3.xml");
    return jar;
}
Also used : JavaArchive(org.jboss.shrinkwrap.api.spec.JavaArchive) OperateOnDeployment(org.jboss.arquillian.container.test.api.OperateOnDeployment) Deployment(org.jboss.arquillian.container.test.api.Deployment) TargetsContainer(org.jboss.arquillian.container.test.api.TargetsContainer)

Example 4 with JavaArchive

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

the class Hibernate4NativeAPINaturalIdTestCase method deploy.

@Deployment
public static Archive<?> deploy() throws Exception {
    EnterpriseArchive ear = ShrinkWrap.create(EnterpriseArchive.class, ARCHIVE_NAME + ".ear");
    // add required jars as manifest dependencies
    ear.addAsManifestResource(new StringAsset("Dependencies: org.hibernate \n"), "MANIFEST.MF");
    JavaArchive lib = ShrinkWrap.create(JavaArchive.class, "beans.jar");
    lib.addClasses(SFSBHibernateSFNaturalId.class);
    ear.addAsModule(lib);
    lib = ShrinkWrap.create(JavaArchive.class, "entities.jar");
    lib.addClasses(Person.class);
    lib.addAsResource(new StringAsset(testmapping), "testmapping.hbm.xml");
    lib.addAsResource(new StringAsset(hibernate_cfg), "hibernate.cfg.xml");
    ear.addAsLibraries(lib);
    final WebArchive main = ShrinkWrap.create(WebArchive.class, "main.war");
    main.addClasses(Hibernate4NativeAPINaturalIdTestCase.class);
    ear.addAsModule(main);
    // add application dependency on H2 JDBC driver, so that the Hibernate classloader (same as app classloader)
    // will see the H2 JDBC driver.
    // equivalent hack for use of shared Hiberante module, would be to add the H2 dependency directly to the
    // shared Hibernate module.
    // also add dependency on org.slf4j
    ear.addAsManifestResource(new StringAsset("<jboss-deployment-structure>" + " <deployment>" + " <dependencies>" + " <module name=\"com.h2database.h2\" />" + " <module name=\"org.slf4j\"/>" + " </dependencies>" + " </deployment>" + "</jboss-deployment-structure>"), "jboss-deployment-structure.xml");
    return ear;
}
Also used : EnterpriseArchive(org.jboss.shrinkwrap.api.spec.EnterpriseArchive) StringAsset(org.jboss.shrinkwrap.api.asset.StringAsset) WebArchive(org.jboss.shrinkwrap.api.spec.WebArchive) JavaArchive(org.jboss.shrinkwrap.api.spec.JavaArchive) Deployment(org.jboss.arquillian.container.test.api.Deployment)

Example 5 with JavaArchive

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

the class DsWithSecurityDomainTestCase method deployment.

@Deployment
public static Archive<?> deployment() {
    final JavaArchive jar = ShrinkWrap.create(JavaArchive.class, "single.jar").addClasses(DsWithSecurityDomainTestCase.class);
    jar.addClasses(AbstractLoginModuleSecurityDomainTestCaseSetup.class, AbstractSecurityDomainSetup.class);
    final EnterpriseArchive ear = ShrinkWrap.create(EnterpriseArchive.class, "test.ear").addAsLibrary(jar).addAsManifestResource(DsWithSecurityDomainTestCase.class.getPackage(), "security-ds.xml", "security-ds.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)

Aggregations

JavaArchive (org.jboss.shrinkwrap.api.spec.JavaArchive)1209 Deployment (org.jboss.arquillian.container.test.api.Deployment)979 StringAsset (org.jboss.shrinkwrap.api.asset.StringAsset)301 EnterpriseArchive (org.jboss.shrinkwrap.api.spec.EnterpriseArchive)192 WebArchive (org.jboss.shrinkwrap.api.spec.WebArchive)183 File (java.io.File)125 OperateOnDeployment (org.jboss.arquillian.container.test.api.OperateOnDeployment)109 Asset (org.jboss.shrinkwrap.api.asset.Asset)89 ResourceAdapterArchive (org.jboss.shrinkwrap.api.spec.ResourceAdapterArchive)62 ZipExporter (org.jboss.shrinkwrap.api.exporter.ZipExporter)57 PropertyPermission (java.util.PropertyPermission)46 InputStream (java.io.InputStream)39 TargetsContainer (org.jboss.arquillian.container.test.api.TargetsContainer)36 Test (org.junit.Test)36 ArchivePath (org.jboss.shrinkwrap.api.ArchivePath)31 FilePermission (java.io.FilePermission)29 OSGiManifestBuilder (org.jboss.osgi.metadata.OSGiManifestBuilder)26 BeansXml (org.jboss.shrinkwrap.impl.BeansXml)22 CommandSupport (io.fabric8.itests.support.CommandSupport)18 ManifestBuilder (org.jboss.gravia.resource.ManifestBuilder)18