use of org.jboss.shrinkwrap.api.spec.WebArchive in project javaee7-samples by javaee-samples.
the class MyResourceTest method createDeployment.
/**
* Arquillian specific method for creating a file which can be deployed
* while executing the test.
*
* @return a war file
*/
@Deployment(testable = false)
public static WebArchive createDeployment() {
WebArchive war = ShrinkWrap.create(WebArchive.class).addClass(MyApplication.class).addClass(Database.class).addClass(MyResource.class);
System.out.println(war.toString(true));
return war;
}
use of org.jboss.shrinkwrap.api.spec.WebArchive in project javaee7-samples by javaee-samples.
the class MyResourceTest method createDeployment.
@Deployment(testable = false)
public static WebArchive createDeployment() {
WebArchive war = ShrinkWrap.create(WebArchive.class).addClasses(MyApplication.class, MyResource.class, MyObject.class, MyReader.class, MyWriter.class, AnotherObject.class);
System.out.println(war.toString(true));
return war;
}
use of org.jboss.shrinkwrap.api.spec.WebArchive in project javaee7-samples by javaee-samples.
the class CustomConstraintTest method deployment.
@Deployment
public static Archive<?> deployment() {
WebArchive war = ShrinkWrap.create(WebArchive.class).addClasses(MyBean.class, ZipCode.class, ZipCodeValidator.class).addAsResource("ValidationMessages.properties");
System.out.println(war.toString(true));
return war;
}
use of org.jboss.shrinkwrap.api.spec.WebArchive in project javaee7-samples by javaee-samples.
the class SecureServletTest method createDeployment.
@Deployment(testable = false)
public static WebArchive createDeployment() {
WebArchive war = ShrinkWrap.create(WebArchive.class).addClass(SecureServlet.class).addAsResource(new File("src/main/resources/log4j.properties")).addAsWebInfResource((new File("src/main/webapp/WEB-INF/web.xml")));
System.out.println(war.toString(true));
return war;
}
use of org.jboss.shrinkwrap.api.spec.WebArchive in project javaee7-samples by javaee-samples.
the class MultiplePuTest method createDeployment.
@Deployment
public static WebArchive createDeployment() {
WebArchive war = ShrinkWrap.create(WebArchive.class).addPackage("org.javaee7.jpa.multiple.pu").addAsResource("META-INF/persistence.xml").addAsResource("META-INF/create.sql").addAsResource("META-INF/drop.sql").addAsResource("META-INF/load.sql");
System.out.println(war.toString(true));
return war;
}
Aggregations