use of org.jboss.shrinkwrap.api.spec.JavaArchive in project wildfly by wildfly.
the class RemoteStatelessFailoverTestCase method createDeploymentOnDescriptor.
private static Archive<?> createDeploymentOnDescriptor() {
final JavaArchive jar = ShrinkWrap.create(JavaArchive.class, ARCHIVE_NAME_DD + ".jar");
jar.addClasses(StatelessBeanBase.class, StatelessBeanDD.class, StatelessRemote.class, StatelessRemoteHome.class);
jar.addClass(NodeNameGetter.class);
jar.addAsManifestResource(RemoteStatelessFailoverTestCase.class.getPackage(), "ejb-jar.xml", "ejb-jar.xml");
return jar;
}
use of org.jboss.shrinkwrap.api.spec.JavaArchive in project wildfly by wildfly.
the class RemoteStatelessFailoverTestCase method createDeployment.
private static Archive<?> createDeployment() {
final JavaArchive jar = ShrinkWrap.create(JavaArchive.class, ARCHIVE_NAME + ".jar");
jar.addClasses(StatelessBeanBase.class, StatelessBean.class, StatelessRemote.class, StatelessRemoteHome.class);
jar.addClass(NodeNameGetter.class);
return jar;
}
use of org.jboss.shrinkwrap.api.spec.JavaArchive in project wildfly by wildfly.
the class IIOPSslInvocationTestCase method legacyServer.
@Deployment(name = "legacy-server", testable = false)
@TargetsContainer("iiop-legacy-server")
public static Archive<?> legacyServer() {
final JavaArchive jar = ShrinkWrap.create(JavaArchive.class, "server.jar");
jar.addClasses(IIOPSslStatelessBean.class, IIOPSslStatelessHome.class, IIOPSslStatelessRemote.class).addAsManifestResource(IIOPSslInvocationTestCase.class.getPackage(), "legacy-jboss-ejb3.xml", "jboss-ejb3.xml");
return jar;
}
use of org.jboss.shrinkwrap.api.spec.JavaArchive in project wildfly by wildfly.
the class Hibernate4NativeAPINaturalIdTestCase method deploy.
@Deployment
public static Archive<?> deploy() throws Exception {
EnterpriseArchive ear = ShrinkWrap.create(EnterpriseArchive.class, ARCHIVE_NAME + ".ear");
// add required jars as manifest dependencies
ear.addAsManifestResource(new StringAsset("Dependencies: org.hibernate \n"), "MANIFEST.MF");
JavaArchive lib = ShrinkWrap.create(JavaArchive.class, "beans.jar");
lib.addClasses(SFSBHibernateSFNaturalId.class);
ear.addAsModule(lib);
lib = ShrinkWrap.create(JavaArchive.class, "entities.jar");
lib.addClasses(Person.class);
lib.addAsResource(new StringAsset(testmapping), "testmapping.hbm.xml");
lib.addAsResource(new StringAsset(hibernate_cfg), "hibernate.cfg.xml");
ear.addAsLibraries(lib);
final WebArchive main = ShrinkWrap.create(WebArchive.class, "main.war");
main.addClasses(Hibernate4NativeAPINaturalIdTestCase.class);
ear.addAsModule(main);
// add application dependency on H2 JDBC driver, so that the Hibernate classloader (same as app classloader)
// will see the H2 JDBC driver.
// equivalent hack for use of shared Hiberante module, would be to add the H2 dependency directly to the
// shared Hibernate module.
// also add dependency on org.slf4j
ear.addAsManifestResource(new StringAsset("<jboss-deployment-structure>" + " <deployment>" + " <dependencies>" + " <module name=\"com.h2database.h2\" />" + " <module name=\"org.slf4j\"/>" + " </dependencies>" + " </deployment>" + "</jboss-deployment-structure>"), "jboss-deployment-structure.xml");
return ear;
}
use of org.jboss.shrinkwrap.api.spec.JavaArchive in project wildfly by wildfly.
the class DsWithSecurityDomainTestCase method deployment.
@Deployment
public static Archive<?> deployment() {
final JavaArchive jar = ShrinkWrap.create(JavaArchive.class, "single.jar").addClasses(DsWithSecurityDomainTestCase.class);
jar.addClasses(AbstractLoginModuleSecurityDomainTestCaseSetup.class, AbstractSecurityDomainSetup.class);
final EnterpriseArchive ear = ShrinkWrap.create(EnterpriseArchive.class, "test.ear").addAsLibrary(jar).addAsManifestResource(DsWithSecurityDomainTestCase.class.getPackage(), "security-ds.xml", "security-ds.xml");
return ear;
}
Aggregations