use of org.jboss.shrinkwrap.api.spec.WebArchive in project wildfly by wildfly.
the class WebSecurityDIGESTTestCase method deployment.
@Deployment(name = DEPLOYMENT)
public static WebArchive deployment() throws Exception {
final WebArchive war = ShrinkWrap.create(WebArchive.class, DEPLOYMENT + ".war");
war.addClasses(SimpleServlet.class, SimpleSecuredServlet.class);
war.addAsResource(new StringAsset(USERS), "users.properties");
war.addAsResource(new StringAsset(ROLES), "roles.properties");
war.addAsWebInfResource(Utils.getJBossWebXmlAsset(SECURITY_DOMAIN_NAME), "jboss-web.xml");
war.addAsWebInfResource(WebSecurityDIGESTTestCase.class.getPackage(), "web.xml", "web.xml");
return war;
}
use of org.jboss.shrinkwrap.api.spec.WebArchive in project wildfly by wildfly.
the class ServletLifecycleMethodDescriptorTestCase method single.
@Deployment
public static WebArchive single() {
WebArchive war = ShrinkWrap.create(WebArchive.class, "single.war");
war.addClasses(HttpRequest.class, LifeCycleMethodServlet.class);
war.addAsWebInfResource(ServletLifecycleMethodDescriptorTestCase.class.getPackage(), "web.xml", "web.xml");
war.addAsManifestResource(createPermissionsXmlAsset(new JndiPermission("java:global/env/foo", "bind")), "permissions.xml");
return war;
}
use of org.jboss.shrinkwrap.api.spec.WebArchive in project wildfly by wildfly.
the class ServletResourceOverlaysTestCase method single.
@Deployment
public static WebArchive single() {
WebArchive war = ShrinkWrap.create(WebArchive.class, "single.war");
war.addAsWebResource(new StringAsset("a"), "a.txt");
war.addAsWebResource(new StringAsset("b"), "b.txt");
JavaArchive jar = ShrinkWrap.create(JavaArchive.class, "test.jar");
jar.addAsManifestResource(new StringAsset("b - overlay"), new BasicPath("resources", "b.txt"));
jar.addAsManifestResource(new StringAsset("c - overlay"), new BasicPath("resources", "c.txt"));
war.addAsLibrary(jar);
return war;
}
use of org.jboss.shrinkwrap.api.spec.WebArchive in project wildfly by wildfly.
the class WebSecurityJBossSimpleRoleMappingTestCase method deployment.
@Deployment(testable = false)
public static WebArchive deployment() throws Exception {
WebArchive war = ShrinkWrap.create(WebArchive.class, "web-secure.war");
war.addClasses(SecuredServlet.class);
war.addAsWebResource(WebSecurityJBossSimpleRoleMappingTestCase.class.getPackage(), "login.jsp", "login.jsp");
war.addAsWebResource(WebSecurityJBossSimpleRoleMappingTestCase.class.getPackage(), "error.jsp", "error.jsp");
war.addAsWebInfResource(WebSecurityJBossSimpleRoleMappingTestCase.class.getPackage(), "jboss-web-role-mapping.xml", "jboss-web.xml");
war.addAsWebInfResource(WebSecurityJBossSimpleRoleMappingTestCase.class.getPackage(), "web.xml", "web.xml");
war.addAsResource(WebSecurityJBossSimpleRoleMappingTestCase.class.getPackage(), "users.properties", "users.properties");
war.addAsResource(WebSecurityJBossSimpleRoleMappingTestCase.class.getPackage(), "roles.properties", "roles.properties");
return war;
}
use of org.jboss.shrinkwrap.api.spec.WebArchive in project wildfly by wildfly.
the class WebSecurityJBossWebXmlSecurityRolesTestCase method deployment.
@Deployment(testable = false)
public static WebArchive deployment() throws Exception {
WebArchive war = ShrinkWrap.create(WebArchive.class, "web-secure.war");
war.addClasses(SecuredServlet.class);
war.addAsWebResource(WebSecurityJBossWebXmlSecurityRolesTestCase.class.getPackage(), "login.jsp", "login.jsp");
war.addAsWebResource(WebSecurityJBossWebXmlSecurityRolesTestCase.class.getPackage(), "error.jsp", "error.jsp");
war.addAsWebInfResource(WebSecurityJBossWebXmlSecurityRolesTestCase.class.getPackage(), "jboss-web-role-mapping.xml", "jboss-web.xml");
war.addAsWebInfResource(WebSecurityJBossWebXmlSecurityRolesTestCase.class.getPackage(), "web.xml", "web.xml");
war.addAsResource(WebSecurityJBossWebXmlSecurityRolesTestCase.class.getPackage(), "users.properties", "users.properties");
war.addAsResource(WebSecurityJBossWebXmlSecurityRolesTestCase.class.getPackage(), "roles.properties", "roles.properties");
return war;
}
Aggregations