Search in sources :

Example 36 with ResourceAdapterArchive

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

the class EarJbossStructureRestrictedVisibilityTestCase method deploy.

@Deployment
public static Archive<?> deploy() {
    EnterpriseArchive ear = ShrinkWrap.create(EnterpriseArchive.class);
    WebArchive war = ShrinkWrap.create(WebArchive.class, "test.war");
    war.addClasses(TestAA.class);
    ear.addAsModule(war);
    JavaArchive ejb = ShrinkWrap.create(JavaArchive.class, "ejb1.jar");
    ejb.addClasses(MyEjb.class, EarJbossStructureRestrictedVisibilityTestCase.class);
    ear.addAsModule(ejb);
    ejb = ShrinkWrap.create(JavaArchive.class, "ejb2.jar");
    ejb.addClasses(MyEjb2.class);
    ear.addAsModule(ejb);
    ResourceAdapterArchive rar = ShrinkWrap.create(ResourceAdapterArchive.class, "rar.rar");
    JavaArchive rarJar = ShrinkWrap.create(JavaArchive.class, "rarJar.jar");
    rarJar.addClass(RarClass.class);
    rarJar.addClasses(HelloWorldResourceAdapter.class, HelloWorldConnection.class, HelloWorldConnectionFactory.class, HelloWorldConnectionFactoryImpl.class, HelloWorldConnectionImpl.class, HelloWorldManagedConnection.class, HelloWorldManagedConnectionFactory.class, HelloWorldManagedConnectionMetaData.class);
    rar.addAsLibraries(rarJar);
    ear.addAsModule(rar);
    ear.addAsManifestResource(new StringAsset("<jboss-deployment-structure><ear-subdeployments-isolated>true</ear-subdeployments-isolated></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) ResourceAdapterArchive(org.jboss.shrinkwrap.api.spec.ResourceAdapterArchive) JavaArchive(org.jboss.shrinkwrap.api.spec.JavaArchive) Deployment(org.jboss.arquillian.container.test.api.Deployment)

Example 37 with ResourceAdapterArchive

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

the class ArchiveValidationDeploymentTestCase method createDeployment.

/**
     * Define the deployment
     *
     * @return The deployment archive
     */
public static ResourceAdapterArchive createDeployment(String name) throws Exception {
    ResourceAdapterArchive raa = ShrinkWrap.create(ResourceAdapterArchive.class, name + ".rar");
    JavaArchive ja = ShrinkWrap.create(JavaArchive.class, name + ".jar");
    ja.addPackage(MultipleConnectionFactory1.class.getPackage()).addClasses(ArchiveValidationDeploymentTestCase.class, MgmtOperationException.class, XMLElementReader.class, XMLElementWriter.class, JcaMgmtServerSetupTask.class);
    ja.addPackage(AbstractMgmtTestBase.class.getPackage());
    raa.addAsLibrary(ja);
    raa.addAsManifestResource(ArchiveValidationDeploymentTestCase.class.getPackage(), name + "ra.xml", "ra.xml").addAsManifestResource(ArchiveValidationDeploymentTestCase.class.getPackage(), "ironjacamar.xml", "ironjacamar.xml").addAsManifestResource(new StringAsset("Dependencies: org.jboss.as.controller-client,org.jboss.dmr,org.jboss.as.cli,org.jboss.as.connector \n"), "MANIFEST.MF");
    return raa;
}
Also used : StringAsset(org.jboss.shrinkwrap.api.asset.StringAsset) ResourceAdapterArchive(org.jboss.shrinkwrap.api.spec.ResourceAdapterArchive) AbstractMgmtTestBase(org.jboss.as.test.integration.management.base.AbstractMgmtTestBase) JavaArchive(org.jboss.shrinkwrap.api.spec.JavaArchive)

Example 38 with ResourceAdapterArchive

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

the class BasicDeployment16TestCase method createDeployment.

/**
     * Define the deployment
     *
     * @return The deployment archive
     */
@Deployment
public static ResourceAdapterArchive createDeployment() throws Exception {
    String deploymentName = "basic.rar";
    ResourceAdapterArchive raa = ShrinkWrap.create(ResourceAdapterArchive.class, deploymentName);
    JavaArchive ja = ShrinkWrap.create(JavaArchive.class, "multiple.jar");
    ja.addPackage(MultipleConnectionFactory1.class.getPackage()).addClasses(BasicDeployment16TestCase.class, MgmtOperationException.class, XMLElementReader.class, XMLElementWriter.class, BasicDeploymentTestCaseSetup.class);
    ja.addPackage(AbstractMgmtTestBase.class.getPackage());
    raa.addAsLibrary(ja);
    raa.addAsManifestResource(BasicDeployment16TestCase.class.getPackage(), "ra16.xml", "ra.xml").addAsManifestResource(new StringAsset("Dependencies: org.jboss.as.controller-client,org.jboss.dmr,org.jboss.as.cli\n"), "MANIFEST.MF");
    return raa;
}
Also used : StringAsset(org.jboss.shrinkwrap.api.asset.StringAsset) ResourceAdapterArchive(org.jboss.shrinkwrap.api.spec.ResourceAdapterArchive) AbstractMgmtTestBase(org.jboss.as.test.integration.management.base.AbstractMgmtTestBase) JavaArchive(org.jboss.shrinkwrap.api.spec.JavaArchive) Deployment(org.jboss.arquillian.container.test.api.Deployment)

Example 39 with ResourceAdapterArchive

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

the class BasicDeployment17TestCase method createDeployment.

/**
     * Define the deployment
     *
     * @return The deployment archive
     */
@Deployment
public static ResourceAdapterArchive createDeployment() throws Exception {
    String deploymentName = "basic17.rar";
    ResourceAdapterArchive raa = ShrinkWrap.create(ResourceAdapterArchive.class, deploymentName);
    JavaArchive ja = ShrinkWrap.create(JavaArchive.class, "multiple.jar");
    ja.addPackage(MultipleConnectionFactory1.class.getPackage()).addClasses(BasicDeployment17TestCase.class, MgmtOperationException.class, XMLElementReader.class, XMLElementWriter.class, BasicDeploymentTestCaseSetup.class);
    ja.addPackage(AbstractMgmtTestBase.class.getPackage());
    raa.addAsLibrary(ja);
    raa.addAsManifestResource(BasicDeployment17TestCase.class.getPackage(), "ra17.xml", "ra.xml").addAsManifestResource(new StringAsset("Dependencies: org.jboss.as.controller-client,org.jboss.dmr,org.jboss.as.cli\n"), "MANIFEST.MF");
    return raa;
}
Also used : StringAsset(org.jboss.shrinkwrap.api.asset.StringAsset) ResourceAdapterArchive(org.jboss.shrinkwrap.api.spec.ResourceAdapterArchive) AbstractMgmtTestBase(org.jboss.as.test.integration.management.base.AbstractMgmtTestBase) JavaArchive(org.jboss.shrinkwrap.api.spec.JavaArchive) Deployment(org.jboss.arquillian.container.test.api.Deployment)

Example 40 with ResourceAdapterArchive

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

the class DisabledValidationTestCase method createDeployment.

/**
     * Define the deployment
     *
     * @return The deployment archive
     */
public static ResourceAdapterArchive createDeployment(String ij) throws Exception {
    String deploymentName = (ij != null ? ij : "valid");
    ResourceAdapterArchive raa = ShrinkWrap.create(ResourceAdapterArchive.class, deploymentName + ".rar");
    JavaArchive ja = ShrinkWrap.create(JavaArchive.class, deploymentName + ".jar");
    ja.addPackage(ValidConnectionFactory.class.getPackage()).addClasses(DisabledValidationTestCase.class, MgmtOperationException.class, XMLElementReader.class, XMLElementWriter.class, JcaMgmtServerSetupTask.class, JcaMgmtBase.class);
    raa.addAsLibrary(ja);
    raa.addAsManifestResource(DisabledValidationTestCase.class.getPackage(), "ra.xml", "ra.xml").addAsManifestResource(DisabledValidationTestCase.class.getPackage(), "ironjacamar" + (ij != null ? "-" + ij : "") + ".xml", "ironjacamar.xml");
    return raa;
}
Also used : ResourceAdapterArchive(org.jboss.shrinkwrap.api.spec.ResourceAdapterArchive) JavaArchive(org.jboss.shrinkwrap.api.spec.JavaArchive)

Aggregations

ResourceAdapterArchive (org.jboss.shrinkwrap.api.spec.ResourceAdapterArchive)59 JavaArchive (org.jboss.shrinkwrap.api.spec.JavaArchive)57 Deployment (org.jboss.arquillian.container.test.api.Deployment)48 StringAsset (org.jboss.shrinkwrap.api.asset.StringAsset)38 AbstractMgmtTestBase (org.jboss.as.test.integration.management.base.AbstractMgmtTestBase)23 EnterpriseArchive (org.jboss.shrinkwrap.api.spec.EnterpriseArchive)15 WebArchive (org.jboss.shrinkwrap.api.spec.WebArchive)7 ValidConnectionFactory (org.jboss.as.test.integration.jca.beanvalidation.ra.ValidConnectionFactory)4 MultipleConnectionFactory1 (org.jboss.as.test.smoke.deployment.rar.MultipleConnectionFactory1)4 ApplicationDescriptor (org.jboss.shrinkwrap.descriptor.api.application6.ApplicationDescriptor)4 WebAppDescriptor (org.jboss.shrinkwrap.descriptor.api.webapp30.WebAppDescriptor)4 File (java.io.File)3 LazyConnectionFactory (org.jboss.as.test.integration.jca.lazyconnectionmanager.rar.LazyConnectionFactory)3 LazyConnectionImpl (org.jboss.as.test.integration.jca.lazyconnectionmanager.rar.LazyConnectionImpl)3 LazyLocalTransaction (org.jboss.as.test.integration.jca.lazyconnectionmanager.rar.LazyLocalTransaction)3 LazyManagedConnection (org.jboss.as.test.integration.jca.lazyconnectionmanager.rar.LazyManagedConnection)3 LazyResourceAdapter (org.jboss.as.test.integration.jca.lazyconnectionmanager.rar.LazyResourceAdapter)3 MultipleAdminObject1 (org.jboss.as.test.integration.jca.rar.MultipleAdminObject1)3 MultipleConnectionFactory1 (org.jboss.as.test.integration.jca.rar.MultipleConnectionFactory1)3 OperateOnDeployment (org.jboss.arquillian.container.test.api.OperateOnDeployment)2