use of org.jboss.shrinkwrap.api.spec.EnterpriseArchive in project wildfly by wildfly.
the class DynamicMessageListenerTestCase method createDeplyoment.
@Deployment
public static Archive createDeplyoment() {
final EnterpriseArchive ear = create(EnterpriseArchive.class, "ear-with-rar.ear").addAsModule(create(JavaArchive.class, "telnet-ra.rar").addAsManifestResource(TelnetResourceAdapter.class.getPackage(), "ra.xml", "ra.xml").addPackages(true, TelnetResourceAdapter.class.getPackage(), TelnetListener.class.getPackage(), TelnetServer.class.getPackage())).addAsModule(create(JavaArchive.class, "mdb.jar").addClasses(MyMdb.class));
ear.addAsManifestResource(createPermissionsXmlAsset(// Cmd (TelnetServer package) uses PropertyEditorManager#registerEditor during static initialization
new PropertyPermission("*", "read,write"), // TelnetServer binds socket and accepts connections
new SocketPermission("*", "accept,listen")), "permissions.xml");
return ear;
}
use of org.jboss.shrinkwrap.api.spec.EnterpriseArchive in project wildfly by wildfly.
the class ServletUnitTestCase method deployEar.
@Deployment(name = "ear", order = 4)
public static Archive<?> deployEar() {
EnterpriseArchive ear = ShrinkWrap.create(EnterpriseArchive.class, "ejb3-ear-servlet.ear");
ear.addAsModule(getClient("ejb3-ear-servlet-client.jar"));
ear.addAsModule(getEjbs("ejb3-ear-servlet-ejbs.jar"));
WebArchive war = getServlet("ejb3-ear-servlet.war");
war.addAsWebInfResource(ServletUnitTestCase.class.getPackage(), "jboss-web-ear.xml", "jboss-web.xml");
war.addAsWebInfResource(ServletUnitTestCase.class.getPackage(), "web-ear.xml", "web.xml");
war.addClass(EJBServletEar.class);
ear.addAsModule(war);
ear.addAsManifestResource(ServletUnitTestCase.class.getPackage(), "application.xml", "application.xml");
return ear;
}
use of org.jboss.shrinkwrap.api.spec.EnterpriseArchive in project wildfly by wildfly.
the class DependsOnSingletonUnitTestCase method deployDependsOn.
@Deployment(name = "ear", order = 1, managed = false, testable = false)
public static Archive<?> deployDependsOn() {
JavaArchive jarOne = ShrinkWrap.create(JavaArchive.class, "one.jar");
jarOne.addClass(SingletonOne.class);
JavaArchive jarTwo = ShrinkWrap.create(JavaArchive.class, "two.jar");
jarTwo.addClass(SingletonTwo.class);
JavaArchive jarThree = ShrinkWrap.create(JavaArchive.class, "three.jar");
jarThree.addClass(SingletonThree.class);
EnterpriseArchive ear = ShrinkWrap.create(EnterpriseArchive.class, "dependson-test.ear");
ear.addAsModule(jarOne);
ear.addAsModule(jarTwo);
ear.addAsModule(jarThree);
ear.addAsManifestResource(DependsOnSingletonUnitTestCase.class.getPackage(), "application.xml", "application.xml");
ear.addAsManifestResource(new StringAsset("Dependencies: deployment.callcounter.jar \n"), "MANIFEST.MF");
return ear;
}
use of org.jboss.shrinkwrap.api.spec.EnterpriseArchive in project wildfly by wildfly.
the class JBossAppXMLSecurityTestCase method createDeployment.
// the incorrectly named "testable" attribute tells Arquillian whether or not
@Deployment(testable = false)
public static // We don't want that, so set that flag to false
Archive createDeployment() {
final EnterpriseArchive ear = ShrinkWrap.create(EnterpriseArchive.class, APP_NAME + ".ear");
ear.addAsManifestResource(JBossAppXMLSecurityTestCase.class.getPackage(), "jboss-app.xml", "jboss-app.xml");
final JavaArchive jar = ShrinkWrap.create(JavaArchive.class, MODULE_NAME + ".jar");
jar.addClasses(BeanInterface.class, FirstBean.class, SecondBean.class);
jar.addPackage(CommonCriteria.class.getPackage());
jar.addAsManifestResource(JBossAppXMLSecurityTestCase.class.getPackage(), "jboss-ejb3.xml", "jboss-ejb3.xml");
ear.addAsModule(jar);
return ear;
}
use of org.jboss.shrinkwrap.api.spec.EnterpriseArchive in project wildfly by wildfly.
the class RarInsideEarReDeploymentTestCase method createDeployment.
/**
* Define the deployment
*
* @return The deployment archive
*/
@Deployment(name = deploymentName, managed = false)
public static EnterpriseArchive createDeployment() throws Exception {
ResourceAdapterArchive raa = ShrinkWrap.create(ResourceAdapterArchive.class, subDeploymentName);
JavaArchive ja = ShrinkWrap.create(JavaArchive.class, "multiple.jar");
ja.addPackage(MultipleAdminObject1.class.getPackage()).addClasses(RarInsideEarReDeploymentTestCase.class, MgmtOperationException.class, XMLElementReader.class, XMLElementWriter.class);
ja.addPackage(AbstractMgmtTestBase.class.getPackage());
raa.addAsLibrary(ja);
raa.addAsManifestResource(RarInsideEarReDeploymentTestCase.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");
final EnterpriseArchive ear = ShrinkWrap.create(EnterpriseArchive.class, deploymentName);
ear.addAsModule(raa);
ear.addAsManifestResource(RarInsideEarReDeploymentTestCase.class.getPackage(), "application.xml", "application.xml");
return ear;
}
Aggregations