use of org.jboss.shrinkwrap.api.spec.JavaArchive in project wildfly by wildfly.
the class WarPackagingTestCase method deploy.
@Deployment(name = "test")
public static Archive<?> deploy() {
WebArchive war = ShrinkWrap.create(WebArchive.class, ARCHIVE_NAME + ".war");
// classes directly in war
war.addClasses(Servlet.class, WarBean.class, WarPackagingTestCase.class);
war.addAsWebInfResource(WarPackagingTestCase.class.getPackage(), "ejb-jar.xml", "ejb-jar.xml");
war.addAsWebInfResource(WarPackagingTestCase.class.getPackage(), "web.xml", "web.xml");
// jar with bean interface
JavaArchive jarInterface = ShrinkWrap.create(JavaArchive.class, "interfacelib.jar");
jarInterface.addClass(BeanInterface.class);
// jar with bean implementation
JavaArchive jar = ShrinkWrap.create(JavaArchive.class, "jarlib.jar");
jar.addClass(JarBean.class);
war.addAsLibraries(jarInterface);
war.addAsLibraries(jar);
return war;
}
use of org.jboss.shrinkwrap.api.spec.JavaArchive in project wildfly by wildfly.
the class SecurityDDOverrideTestCase method runAsDeployment.
@Deployment
public static Archive<?> runAsDeployment() {
final Package currentPackage = SecurityDDOverrideTestCase.class.getPackage();
final JavaArchive jar = ShrinkWrap.create(JavaArchive.class, "ejb3-security-partial-dd-test.jar").addPackage(PartialDDBean.class.getPackage()).addClass(Util.class).addClasses(AbstractSecurityDomainSetup.class, EjbSecurityDomainSetup.class).addAsResource(currentPackage, "users.properties", "users.properties").addAsResource(currentPackage, "roles.properties", "roles.properties").addAsManifestResource(currentPackage, "partial-ejb-jar.xml", "ejb-jar.xml").addAsManifestResource(new StringAsset("Manifest-Version: 1.0\nDependencies: org.jboss.as.controller-client,org.jboss.dmr\n"), "MANIFEST.MF").addAsManifestResource(currentPackage, "permissions.xml", "permissions.xml").addPackage(CommonCriteria.class.getPackage());
return jar;
}
use of org.jboss.shrinkwrap.api.spec.JavaArchive in project wildfly by wildfly.
the class AsynchronousSecurityTestCase method deploy.
@Deployment
public static Archive<?> deploy() {
final Package currentPackage = AsynchronousSecurityTestCase.class.getPackage();
JavaArchive jar = ShrinkWrap.create(JavaArchive.class, ARCHIVE_NAME + ".jar").addPackage(currentPackage).addClass(AnnotationAuthorizationTestCase.class).addClasses(EjbSecurityDomainSetup.class, AbstractSecurityDomainSetup.class, ServerSetupTask.class, Util.class).addAsResource(currentPackage, "roles.properties", "roles.properties").addAsResource(currentPackage, "users.properties", "users.properties").addAsManifestResource(new StringAsset("Dependencies: org.jboss.as.controller-client,org.jboss.dmr\n"), "MANIFEST.MF").addAsManifestResource(currentPackage, "permissions.xml", "permissions.xml").addPackage(CommonCriteria.class.getPackage());
return jar;
}
use of org.jboss.shrinkwrap.api.spec.JavaArchive in project wildfly by wildfly.
the class ServletUnitTestCase method getClient.
private static JavaArchive getClient(String archiveName) {
JavaArchive jar = ShrinkWrap.create(JavaArchive.class, archiveName);
jar.addClasses(WarTestObject.class);
return jar;
}
use of org.jboss.shrinkwrap.api.spec.JavaArchive in project wildfly by wildfly.
the class ServletUnitTestCase method getEjbs.
private static JavaArchive getEjbs(String archiveName) {
JavaArchive jar = ShrinkWrap.create(JavaArchive.class, archiveName);
jar.addClasses(Session30.class, Session30Bean.class, Session30BusinessLocal.class, Session30BusinessRemote.class, Session30Home.class, Session30Local.class, Session30LocalHome.class, Session30Remote.class, StatefulBean.class, StatefulLocal.class, StatefulRemote.class, StatelessBean.class, StatelessLocal.class, TestObject.class);
jar.addAsManifestResource(ServletUnitTestCase.class.getPackage(), "jboss-ejb3.xml", "jboss-ejb3.xml");
return jar;
}
Aggregations