use of org.jboss.shrinkwrap.api.asset.StringAsset in project wildfly by wildfly.
the class EarPackagedMultiRarDeploymentTestCase method createDeployment.
/**
* Define the deployment
*
* @return The deployment archive
*/
@Deployment
public static EnterpriseArchive createDeployment() throws Exception {
String deploymentName = "ear_packaged.ear";
String subDeploymentName = "ear_packaged.rar";
String subDeploymentName2 = "ear_packaged2.rar";
ResourceAdapterArchive raa = ShrinkWrap.create(ResourceAdapterArchive.class, subDeploymentName);
raa.addAsManifestResource(EarPackagedMultiRarDeploymentTestCase.class.getPackage(), "ra.xml", "ra.xml").addAsManifestResource(EarPackagedMultiRarDeploymentTestCase.class.getPackage(), "ironjacamar.xml", "ironjacamar.xml");
ResourceAdapterArchive raa2 = ShrinkWrap.create(ResourceAdapterArchive.class, subDeploymentName2);
raa2.addAsManifestResource(EarPackagedMultiRarDeploymentTestCase.class.getPackage(), "ra2.xml", "ra.xml").addAsManifestResource(EarPackagedMultiRarDeploymentTestCase.class.getPackage(), "ironjacamar2.xml", "ironjacamar.xml");
final EnterpriseArchive ear = ShrinkWrap.create(EnterpriseArchive.class, deploymentName);
JavaArchive ja = ShrinkWrap.create(JavaArchive.class, "multiple.jar");
ja.addPackage(MultipleConnectionFactory1.class.getPackage()).addClasses(EarPackagedMultiRarDeploymentTestCase.class, MgmtOperationException.class, XMLElementReader.class, XMLElementWriter.class);
ja.addPackage(AbstractMgmtTestBase.class.getPackage());
ear.addAsLibrary(ja);
ear.addAsModule(raa);
ear.addAsModule(raa2);
ear.addAsManifestResource(EarPackagedMultiRarDeploymentTestCase.class.getPackage(), "application.xml", "application.xml").addAsManifestResource(new StringAsset("Dependencies: org.jboss.as.controller-client,org.jboss.dmr,org.jboss.as.cli\n"), "MANIFEST.MF");
return ear;
}
use of org.jboss.shrinkwrap.api.asset.StringAsset in project wildfly by wildfly.
the class MultipleActivationTestCase method createDeployment.
/**
* Define the deployment
*
* @return The deployment archive
*/
@Deployment
public static ResourceAdapterArchive createDeployment() throws Exception {
String deploymentName = "archive.rar";
ResourceAdapterArchive raa = ShrinkWrap.create(ResourceAdapterArchive.class, deploymentName);
JavaArchive ja = ShrinkWrap.create(JavaArchive.class, "multiple.jar");
ja.addPackage(MultipleConnectionFactory1.class.getPackage()).addClasses(MultipleActivationTestCase.class, MgmtOperationException.class, XMLElementReader.class, XMLElementWriter.class);
ja.addPackage(AbstractMgmtTestBase.class.getPackage());
raa.addAsLibrary(ja);
raa.addAsManifestResource(MultipleActivationTestCase.class.getPackage(), "ra.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.asset.StringAsset in project wildfly by wildfly.
the class MultipleObjectActivationTestCase method createDeployment.
/**
* Define the deployment
*
* @return The deployment archive
*/
@Deployment
public static ResourceAdapterArchive createDeployment() throws Exception {
String deploymentName = "archive_mult.rar";
ResourceAdapterArchive raa = ShrinkWrap.create(ResourceAdapterArchive.class, deploymentName);
JavaArchive ja = ShrinkWrap.create(JavaArchive.class, "multiple.jar");
ja.addPackage(MultipleConnectionFactory1.class.getPackage()).addClasses(MultipleObjectActivationTestCase.class, MgmtOperationException.class, XMLElementReader.class, XMLElementWriter.class);
ja.addPackage(AbstractMgmtTestBase.class.getPackage());
raa.addAsLibrary(ja);
raa.addAsManifestResource(MultipleObjectActivationTestCase.class.getPackage(), "ra.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.asset.StringAsset in project wildfly by wildfly.
the class MultipleObjectPartialActivationTestCase method createDeployment.
/**
* Define the deployment
*
* @return The deployment archive
*/
@Deployment
public static ResourceAdapterArchive createDeployment() throws Exception {
String deploymentName = "archive_multi_partial.rar";
ResourceAdapterArchive raa = ShrinkWrap.create(ResourceAdapterArchive.class, deploymentName);
JavaArchive ja = ShrinkWrap.create(JavaArchive.class, "multiple.jar");
ja.addPackage(MultipleConnectionFactory1.class.getPackage()).addClasses(MultipleObjectPartialActivationTestCase.class, AbstractMgmtTestBase.class, MgmtOperationException.class, XMLElementReader.class, XMLElementWriter.class, MultipleObjectPartialActivationTestCaseSetup.class, AbstractMgmtServerSetupTask.class);
ja.addPackage(AbstractMgmtTestBase.class.getPackage());
raa.addAsLibrary(ja);
raa.addAsManifestResource(MultipleObjectPartialActivationTestCase.class.getPackage(), "ra.xml", "ra.xml").addAsManifestResource(new StringAsset("Dependencies: org.jboss.as.controller-client,org.jboss.dmr,org.jboss.as.cli\n"), "MANIFEST.MF");
//org.apache.httpcomponents,
return raa;
}
use of org.jboss.shrinkwrap.api.asset.StringAsset in project wildfly by wildfly.
the class ArtemisMessagingTestCase method createDeployment.
@Deployment
public static JavaArchive createDeployment() throws Exception {
JavaArchive jar = ShrinkWrap.create(JavaArchive.class, "messaging-example.jar");
jar.addAsManifestResource(new StringAsset("Manifest-Version: 1.0\n" + "Dependencies: org.apache.activemq.artemis, org.jboss.dmr, org.jboss.as.controller-client\n"), "MANIFEST.MF");
jar.addClass(ArtemisMessagingTestCase.class);
return jar;
}
Aggregations