use of org.jboss.shrinkwrap.api.asset.StringAsset in project wildfly by wildfly.
the class WeldBundledLibraryDeploymentEarTestCase method getDeployment.
@Deployment
public static Archive<?> getDeployment() throws Exception {
doSetup();
WebArchive war = ShrinkWrap.create(WebArchive.class, "test.war").addClasses(WeldBundledLibraryDeploymentEarTestCase.class, AbstractBundledLibraryDeploymentTestCase.class).addAsWebInfResource(EmptyAsset.INSTANCE, "beans.xml");
JavaArchive library = ShrinkWrap.create(JavaArchive.class, "library.jar").addClasses(InjectedBean.class).addAsManifestResource(EmptyAsset.INSTANCE, "beans.xml");
JavaArchive ejbJar = ShrinkWrap.create(JavaArchive.class, "ejb-archive.jar").addClasses(InjectedSessionBean.class).addAsManifestResource(EmptyAsset.INSTANCE, "beans.xml");
EnterpriseArchive ear = ShrinkWrap.create(EnterpriseArchive.class);
ear.addAsModule(war);
ear.addAsModule(ejbJar);
ear.addAsLibrary(library);
ear.setManifest(new StringAsset("Extension-List: weld1\nweld1-Extension-Name: " + EXTENSION_NAME + "\n"));
return ear;
}
use of org.jboss.shrinkwrap.api.asset.StringAsset in project wildfly by wildfly.
the class WeldModuleDeploymentTestCase method deploy2.
@Deployment
public static Archive<?> deploy2() throws Exception {
doSetup();
JavaArchive jar = ShrinkWrap.create(JavaArchive.class, "d2.jar");
jar.addClasses(WeldModuleDeploymentTestCase.class);
jar.addAsManifestResource(EmptyAsset.INSTANCE, "beans.xml");
jar.addAsManifestResource(new StringAsset("Dependencies: org.jboss.test.weldModule meta-inf annotations\n"), "MANIFEST.MF");
return jar;
}
use of org.jboss.shrinkwrap.api.asset.StringAsset in project wildfly by wildfly.
the class TransactionIIOPInvocationTestCase method clientDeployment.
@Deployment(name = "client", testable = true)
@TargetsContainer("iiop-client")
public static Archive<?> clientDeployment() {
String ejbJar = FileUtils.readFile(TransactionIIOPInvocationTestCase.class, "ejb-jar.xml");
final Properties properties = new Properties();
properties.putAll(System.getProperties());
if (properties.containsKey("node1")) {
properties.put("node1", NetworkUtils.formatPossibleIpv6Address((String) properties.get("node1")));
}
final JavaArchive jar = ShrinkWrap.create(JavaArchive.class, "client.jar");
jar.addClasses(ClientEjb.class, IIOPTransactionalHome.class, IIOPTransactionalRemote.class, TransactionIIOPInvocationTestCase.class, IIOPTransactionalStatefulHome.class, IIOPTransactionalStatefulRemote.class).addAsManifestResource(TransactionIIOPInvocationTestCase.class.getPackage(), "jboss-ejb3.xml", "jboss-ejb3.xml").addAsManifestResource(new StringAsset(PropertiesValueResolver.replaceProperties(ejbJar, properties)), "ejb-jar.xml");
return jar;
}
use of org.jboss.shrinkwrap.api.asset.StringAsset in project wildfly by wildfly.
the class XSiteBackupForTestCase method getBackupForDeployment.
// a deployment which reads from cache jboss:/infinispan/web/LONrepl
private static Archive<?> getBackupForDeployment() {
WebArchive war = ShrinkWrap.create(WebArchive.class, "xsite.war");
war.addClass(CacheAccessServlet.class);
war.setWebXML(XSiteBackupForTestCase.class.getPackage(), "web-backupfor.xml");
war.setManifest(new StringAsset("Manifest-Version: 1.0\nDependencies: org.infinispan\n"));
return war;
}
use of org.jboss.shrinkwrap.api.asset.StringAsset in project wildfly by wildfly.
the class SingletonServiceTestCase method deployment.
@Deployment
public static Archive<?> deployment() {
WebArchive war = ShrinkWrap.create(WebArchive.class, "singleton.war");
war.addPackage(NodeService.class.getPackage());
war.setManifest(new StringAsset("Manifest-Version: 1.0\nDependencies: org.jboss.as.server\n"));
war.addAsManifestResource(createPermissionsXmlAsset(// See org.jboss.as.server.deployment.service.ServiceActivatorProcessor#deploy()
new RuntimePermission("getClassLoader"), // See org.jboss.as.server.deployment.service.SecuredServiceRegistry
new ServerPermission("useServiceRegistry"), new ServerPermission("getCurrentServiceContainer")), "permissions.xml");
war.addAsServiceProvider(org.jboss.msc.service.ServiceActivator.class, NodeServiceActivator.class);
return war;
}
Aggregations