use of org.jboss.shrinkwrap.api.spec.ResourceAdapterArchive in project wildfly by wildfly.
the class BasicDeployment15TestCase method createDeployment.
/**
* Define the deployment
*
* @return The deployment archive
*/
@Deployment
public static ResourceAdapterArchive createDeployment() throws Exception {
String deploymentName = "basic15.rar";
ResourceAdapterArchive raa = ShrinkWrap.create(ResourceAdapterArchive.class, deploymentName);
JavaArchive ja = ShrinkWrap.create(JavaArchive.class, "multiple.jar");
ja.addPackage(MultipleConnectionFactory1.class.getPackage()).addClasses(BasicDeployment15TestCase.class, MgmtOperationException.class, XMLElementReader.class, XMLElementWriter.class, BasicDeploymentTestCaseSetup.class);
ja.addPackage(AbstractMgmtTestBase.class.getPackage());
raa.addAsLibrary(ja);
raa.addAsManifestResource(BasicDeployment15TestCase.class.getPackage(), "ra15.xml", "ra.xml").addAsManifestResource(new StringAsset("Dependencies: 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 BasicDoubleDeployment16TestCase method createDeployment.
@Deployment
public static ResourceAdapterArchive createDeployment() {
ResourceAdapterArchive raa = ShrinkWrap.create(ResourceAdapterArchive.class, DEPLOYMENT_NAME);
JavaArchive ja = ShrinkWrap.create(JavaArchive.class, SUB_DEPLOYMENT_NAME);
ja.addPackage(MultipleConnectionFactory1.class.getPackage()).addClasses(MgmtOperationException.class, XMLElementReader.class, XMLElementWriter.class, BasicDoubleDeployment16TestCase.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;
}
use of org.jboss.shrinkwrap.api.spec.ResourceAdapterArchive in project wildfly by wildfly.
the class BasicDoubleDeploymentFail16_1TestCase method createDeployment.
@Deployment
public static ResourceAdapterArchive createDeployment() {
ResourceAdapterArchive raa = ShrinkWrap.create(ResourceAdapterArchive.class, DEPLOYMENT_NAME);
JavaArchive ja = ShrinkWrap.create(JavaArchive.class, SUB_DEPLOYMENT_NAME);
ja.addPackage(MultipleConnectionFactory1.class.getPackage()).addClasses(MgmtOperationException.class, XMLElementReader.class, XMLElementWriter.class, BasicDoubleDeploymentFail16_1TestCase.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;
}
use of org.jboss.shrinkwrap.api.spec.ResourceAdapterArchive in project wildfly by wildfly.
the class BasicDoubleDeploymentFail16_2TestCase method createDeployment.
@Deployment
public static ResourceAdapterArchive createDeployment() {
ResourceAdapterArchive raa = ShrinkWrap.create(ResourceAdapterArchive.class, DEPLOYMENT_NAME);
JavaArchive ja = ShrinkWrap.create(JavaArchive.class, SUB_DEPLOYMENT_NAME);
ja.addPackage(MultipleConnectionFactory1.class.getPackage()).addClasses(MgmtOperationException.class, XMLElementReader.class, XMLElementWriter.class, BasicDoubleDeploymentFail16_2TestCase.class, BasicDoubleDeploymentTestCaseSetup.class);
ja.addPackage(AbstractMgmtTestBase.class.getPackage());
raa.addAsLibrary(ja);
raa.addAsManifestResource(BasicDoubleDeploymentFail16_2TestCase.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;
}
use of org.jboss.shrinkwrap.api.spec.ResourceAdapterArchive in project tomee by apache.
the class ConnectorWithApplicationResourcesInEarTest method createDeployment.
@Deployment
public static EnterpriseArchive createDeployment() {
final JavaArchive apiJar = ShrinkWrap.create(JavaArchive.class, "connector-sample-api.jar");
apiJar.addPackage("org.superbiz.connector.api");
System.out.println("API JAR:\n" + apiJar.toString(true));
final JavaArchive implJar = ShrinkWrap.create(JavaArchive.class, "connector-sample-impl.jar");
implJar.addPackage("org.superbiz.connector.adapter");
System.out.println("IMPL JAR:\n" + implJar.toString(true));
final ResourceAdapterArchive rar = ShrinkWrap.create(ResourceAdapterArchive.class, "connector-sample-ra.rar");
rar.addAsLibraries(implJar);
rar.setResourceAdapterXML(ConnectorWithApplicationResourcesInEarTest.class.getResource("/connector/ra.xml"));
System.out.println("RAR:\n" + rar.toString(true));
final WebArchive webArchive = ShrinkWrap.create(WebArchive.class, "connector-sample-war.war");
webArchive.addPackage("org.superbiz.application");
final WebAppDescriptor webAppDescriptor = Descriptors.create(WebAppDescriptor.class);
webAppDescriptor.version("3.0");
webArchive.addAsWebInfResource(ConnectorWithApplicationResourcesInEarTest.class.getResource("/connector/resources.xml"), "resources.xml");
webArchive.setWebXML(new StringAsset(webAppDescriptor.exportAsString()));
System.out.println("Webapp:\n" + webArchive.toString(true));
final EnterpriseArchive enterpriseArchive = ShrinkWrap.create(EnterpriseArchive.class, "connector-sample.ear");
enterpriseArchive.addAsLibraries(apiJar);
enterpriseArchive.addAsModule(rar);
enterpriseArchive.addAsModule(webArchive);
ApplicationDescriptor applicationXml = Descriptors.create(ApplicationDescriptor.class);
applicationXml.displayName("connector-sample-ear");
applicationXml.createModule().getOrCreateWeb().webUri("connector-sample-war.war").contextRoot("/sample").up().up().createModule().connector("connector-sample-ra.rar").up().libraryDirectory("lib");
enterpriseArchive.setApplicationXML(new StringAsset(applicationXml.exportAsString()));
System.out.println(enterpriseArchive.toString(true));
return enterpriseArchive;
}
Aggregations