use of org.jboss.shrinkwrap.api.spec.ResourceAdapterArchive in project wildfly by wildfly.
the class AbstractModuleDeploymentTestCaseSetup method fillModuleWithJar.
/**
* Creates module structure for uncompressed RA archive.
* RA classes are packed in .jar archive
*
* @throws Exception
*/
protected void fillModuleWithJar(String raFile) throws Exception {
ResourceAdapterArchive rar = ShrinkWrap.create(ResourceAdapterArchive.class);
JavaArchive jar = ShrinkWrap.create(JavaArchive.class, "ra16out.jar");
jar.addPackage(MultipleConnectionFactory1.class.getPackage());
rar.addAsManifestResource(PureJarTestCase.class.getPackage(), raFile, "ra.xml");
rar.as(ExplodedExporter.class).exportExploded(testModuleRoot, getSlot());
copyFile(new File(slot, "ra16out.jar"), jar.as(ZipExporter.class).exportAsInputStream());
}
use of org.jboss.shrinkwrap.api.spec.ResourceAdapterArchive in project wildfly by wildfly.
the class IronJacamarDeploymentTestCase method createDeployment.
/**
* Define the deployment
*
* @return The deployment archive
*/
@Deployment
public static ResourceAdapterArchive createDeployment() throws Exception {
String deploymentName = "ij.rar";
ResourceAdapterArchive raa = ShrinkWrap.create(ResourceAdapterArchive.class, deploymentName);
JavaArchive ja = ShrinkWrap.create(JavaArchive.class, "ij.jar");
ja.addPackage(ValidResourceAdapter.class.getPackage()).addClasses(IronJacamarDeploymentTestCase.class, MgmtOperationException.class, XMLElementReader.class, XMLElementWriter.class);
ja.addPackage(AbstractMgmtTestBase.class.getPackage());
raa.addAsLibrary(ja);
raa.addAsManifestResource(IronJacamarDeploymentTestCase.class.getPackage(), "ra.xml", "ra.xml").addAsManifestResource(IronJacamarDeploymentTestCase.class.getPackage(), "ironjacamar.xml", "ironjacamar.xml").addAsManifestResource(new StringAsset("Dependencies: org.jboss.as.controller-client,org.jboss.dmr,org.jboss.as.cli,javax.inject.api,org.jboss.as.connector\n"), "MANIFEST.MF");
return raa;
}
use of org.jboss.shrinkwrap.api.spec.ResourceAdapterArchive in project wildfly by wildfly.
the class IronJacamarDoubleDeploymentTestCase method createEAR2Deployment.
@Deployment(name = deployment2Name)
public static EnterpriseArchive createEAR2Deployment() throws Exception {
ResourceAdapterArchive raa = createSubDeployment(deployment2ConfigName);
EnterpriseArchive earTest = ShrinkWrap.create(EnterpriseArchive.class, deployment2Name);
earTest.addAsManifestResource(IronJacamarDoubleDeploymentTestCase.class.getPackage(), "application.xml", "application.xml");
earTest.addAsModule(raa);
return earTest;
}
use of org.jboss.shrinkwrap.api.spec.ResourceAdapterArchive in project wildfly by wildfly.
the class IronJacamarDoubleDeploymentTestCase method createEARDeployment.
@Deployment(name = deploymentName)
public static EnterpriseArchive createEARDeployment() throws Exception {
ResourceAdapterArchive raa = createSubDeployment(deploymentConfigName);
EnterpriseArchive earTest = ShrinkWrap.create(EnterpriseArchive.class, deploymentName);
earTest.addAsManifestResource(IronJacamarDoubleDeploymentTestCase.class.getPackage(), "application.xml", "application.xml");
earTest.addAsModule(raa);
return earTest;
}
Aggregations