@ArquillianResource
private ManagementClient managementClient;
@Deployment(testable = false)
public static Archive<?> deploy() {
final EnterpriseArchive ear = ShrinkWrap.create(EnterpriseArchive.class, APP_NAME + ".ear");
final JavaArchive lib = ShrinkWrap.create(JavaArchive.class, "lib.jar");
lib.addClasses(AppClientSingletonRemote.class, AppClientWrapper.class, CallbackHandler.class);
ear.addAsLibrary(lib);
final JavaArchive ejb = ShrinkWrap.create(JavaArchive.class, MODULE_NAME + ".jar");
ejb.addClasses(SimpleApplicationClientTestCase.class, AppClientStateSingleton.class);
ear.addAsModule(ejb);
final JavaArchive appClient = ShrinkWrap.create(JavaArchive.class, "client-annotation.jar");
appClient.addClasses(AppClientMain.class);
appClient.addAsManifestResource(new StringAsset("Main-Class: " + AppClientMain.class.getName() + "\n"), "MANIFEST.MF");
ear.addAsModule(appClient);
final JavaArchive clientDD = ShrinkWrap.create(JavaArchive.class, "client-dd.jar");
clientDD.addClasses(DescriptorClientMain.class);
clientDD.addAsManifestResource(new StringAsset("Main-Class: " + DescriptorClientMain.class.getName() + "\n"), "MANIFEST.MF");
clientDD.addAsManifestResource(SimpleApplicationClientTestCase.class.getPackage(), "application-client.xml", "application-client.xml");
ear.addAsModule(clientDD);
final JavaArchive clientOverride = ShrinkWrap.create(JavaArchive.class, "client-override.jar");
clientOverride.addClasses(DescriptorClientMain.class);
clientOverride.addAsManifestResource(new StringAsset("Main-Class: " + DescriptorClientMain.class.getName() + "\n"), "MANIFEST.MF");
clientOverride.addAsManifestResource(SimpleApplicationClientTestCase.class.getPackage(), "application-client.xml", "application-client.xml");
clientOverride.addAsManifestResource(SimpleApplicationClientTestCase.class.getPackage(), "jboss-client.xml", "jboss-client.xml");
ear.addAsModule(clientOverride);
archive = ear;
return ear;
}