use of org.jboss.shrinkwrap.api.spec.ResourceAdapterArchive in project wildfly by wildfly.
the class AfterResourceCreationDeploymentTestCase method createDeployment.
/**
* Define the deployment
*
* @return The deployment archive
*/
@Deployment(name = "basic-after.rar")
public static ResourceAdapterArchive createDeployment() throws Exception {
ResourceAdapterArchive raa = ShrinkWrap.create(ResourceAdapterArchive.class, deploymentName);
JavaArchive ja = ShrinkWrap.create(JavaArchive.class, "multiple.jar");
ja.addPackage(MultipleConnectionFactory1.class.getPackage());
raa.addAsLibrary(ja);
raa.addAsManifestResource(AfterResourceCreationDeploymentTestCase.class.getPackage(), "ra.xml", "ra.xml");
return raa;
}
use of org.jboss.shrinkwrap.api.spec.ResourceAdapterArchive in project wildfly by wildfly.
the class AbstractModuleDeploymentTestCaseSetup method fillModuleWithFlatClasses.
/**
* Creates module structure for uncompressed RA archive. RA classes are in
* flat form too
*
* @throws Exception
*/
protected void fillModuleWithFlatClasses(String raFile) throws Exception {
ResourceAdapterArchive rar = ShrinkWrap.create(ResourceAdapterArchive.class);
JavaArchive jar = ShrinkWrap.create(JavaArchive.class, "ra16out.jar");
jar.addPackage(MultipleConnectionFactory1.class.getPackage()).addClass(javax.jms.MessageListener.class);
rar.addAsManifestResource(this.getClass().getPackage(), raFile, "ra.xml");
rar.as(ExplodedExporter.class).exportExploded(testModuleRoot, getSlot());
jar.as(ExplodedExporter.class).exportExploded(testModuleRoot, getSlot());
}
use of org.jboss.shrinkwrap.api.spec.ResourceAdapterArchive in project wildfly by wildfly.
the class InflowFlatTestCase method createRarDeployment.
/**
* Define the deployment
*
* @return The deployment archive
*/
@Deployment
public static Archive<?> createRarDeployment() throws Exception {
JavaArchive ja = createDeployment(false);
ResourceAdapterArchive raa = ShrinkWrap.create(ResourceAdapterArchive.class, "inflow.rar");
ja.addPackage(ValidConnectionFactory.class.getPackage());
raa.addAsLibrary(ja);
raa.addAsManifestResource(NegativeValidationTestCase.class.getPackage(), "ra.xml", "ra.xml").addAsManifestResource(new StringAsset("Dependencies: javax.inject.api,org.jboss.as.connector,org.jboss.as.controller-client,org.jboss.dmr,org.jboss.as.cli\n"), "MANIFEST.MF");
return raa;
}
use of org.jboss.shrinkwrap.api.spec.ResourceAdapterArchive in project wildfly by wildfly.
the class RaWithElytronAuthContextTestCase method deploymentSingleton.
@Deployment
public static Archive<?> deploymentSingleton() {
final JavaArchive jar = ShrinkWrap.create(JavaArchive.class, "single.jar").addClass(RaWithElytronAuthContextTestCase.class).addPackage(MultipleConnectionFactory1.class.getPackage());
jar.addClasses(AbstractElytronSetupTask.class, ServerSetupTask.class);
final ResourceAdapterArchive rar = ShrinkWrap.create(ResourceAdapterArchive.class, "test.rar").addAsLibrary(jar).addAsManifestResource(RaWithElytronAuthContextTestCase.class.getPackage(), "ra.xml", "ra.xml").addAsManifestResource(RaWithElytronAuthContextTestCase.class.getPackage(), "ironjacamar-elytron.xml", "ironjacamar.xml");
return rar;
}
use of org.jboss.shrinkwrap.api.spec.ResourceAdapterArchive in project wildfly by wildfly.
the class IronJacamarDeploymentStatisticsTestCase method createDeployment.
public static ResourceAdapterArchive createDeployment(String deploymentName) throws Exception {
ResourceAdapterArchive raa = ShrinkWrap.create(ResourceAdapterArchive.class, "archive" + deploymentName + ".rar");
JavaArchive ja = ShrinkWrap.create(JavaArchive.class, deploymentName + ".jar");
ja.addPackage(pack);
raa.addAsLibrary(ja);
raa.addAsManifestResource(IronJacamarDeploymentStatisticsTestCase.class.getPackage(), "ra.xml", "ra.xml");
raa.addAsManifestResource(IronJacamarDeploymentStatisticsTestCase.class.getPackage(), "ironjacamar" + deploymentName + ".xml", "ironjacamar.xml");
return raa;
}
Aggregations