Package org.jboss.shrinkwrap.api.spec

Examples of org.jboss.shrinkwrap.api.spec.WebArchive.addPackage()


public class ConstraintValidationTestCase {

    @Deployment
    public static Archive<?> deploy() {
        final WebArchive war = ShrinkWrap.create(WebArchive.class, "testconstraintvalidation.war");
        war.addPackage(ConstraintValidationTestCase.class.getPackage());
        return war;

    }

    @Test
View Full Code Here


public class ScriptAssertTestCase {

    @Deployment
    public static Archive<?> deploy() {
        final WebArchive war = ShrinkWrap.create(WebArchive.class,"testscriptassert.war");
        war.addPackage(ScriptAssertTestCase.class.getPackage());
        return war;

    }

View Full Code Here

    private InitialContext iniCtx;

    @Deployment
    public static Archive<?> deploy() {
        WebArchive war = ShrinkWrap.create(WebArchive.class, "multiplepuinjections.war");
        war.addPackage(MultiplePersistenceContextInjectionsTestCase.class.getPackage());
        war.addAsResource(getPersistenceXml(), "META-INF/persistence.xml");
        return war;
    }

View Full Code Here

public class DataSourceDefinitionTestCase {

    @Deployment
    public static Archive<?> deploy() {
        final WebArchive war = ShrinkWrap.create(WebArchive.class,"testds.war");
        war.addPackage(DataSourceDefinitionTestCase.class.getPackage());
        war.addAsManifestResource(new StringAsset("Dependencies: com.h2database.h2\n"),"MANIFEST.MF");
        return war;

    }
View Full Code Here

    public ServiceContainer serviceContainer;

    @Deployment
    public static Archive<?> deploy() {
        WebArchive war = ShrinkWrap.create(WebArchive.class, "dsrestartjpa.war");
        war.addPackage(JpaInjectedSfsb.class.getPackage());
        war.addAsResource(getPersistenceXml(), "META-INF/persistence.xml");
        war.addAsManifestResource(JpaDsRestartTestCase.class.getPackage(), "MANIFEST.MF", "MANIFEST.MF");
        return war;
    }
View Full Code Here

  private static final String depName = "jsapi";
    @Deployment(name=depName)
    public static Archive<?> deploy() {
        WebArchive war = ShrinkWrap.create(WebArchive.class, "jaxrsnoap.war");
        war.addPackage(HttpRequest.class.getPackage());
        war.addPackage(JaxrsJSApiTestCase.class.getPackage());
        war.addAsWebInfResource(WebXml.get(
            "<servlet-mapping>\n" +
                "        <servlet-name>javax.ws.rs.core.Application</servlet-name>\n" +
                "        <url-pattern>/myjaxrs/*</url-pattern>\n" +
View Full Code Here

  private static final String depName = "jsapi";
    @Deployment(name=depName)
    public static Archive<?> deploy() {
        WebArchive war = ShrinkWrap.create(WebArchive.class, "jaxrsnoap.war");
        war.addPackage(HttpRequest.class.getPackage());
        war.addPackage(JaxrsJSApiTestCase.class.getPackage());
        war.addAsWebInfResource(WebXml.get(
            "<servlet-mapping>\n" +
                "        <servlet-name>javax.ws.rs.core.Application</servlet-name>\n" +
                "        <url-pattern>/myjaxrs/*</url-pattern>\n" +
                "</servlet-mapping>\n" +
View Full Code Here

        final JavaArchive ejbJar = ShrinkWrap.create(JavaArchive.class, "ejbjar.jar");
        ejbJar.addClasses(EJBResource.class, EjbInterceptor.class);
        ear.addAsModule(ejbJar);

        WebArchive war = ShrinkWrap.create(WebArchive.class,"jaxrsnoap.war");
        war.addPackage(HttpRequest.class.getPackage());
        war.addAsWebInfResource(WebXml.get("<servlet-mapping>\n" +
                "        <servlet-name>javax.ws.rs.core.Application</servlet-name>\n" +
                "        <url-pattern>/myjaxrs/*</url-pattern>\n" +
                "    </servlet-mapping>\n" +
                "\n"),"web.xml");
View Full Code Here

public class JaxrsEjbInterceptorsTestCase {

    @Deployment(testable = false)
    public static Archive<?> deploy() {
        WebArchive war = ShrinkWrap.create(WebArchive.class,"jaxrsnoap.war");
        war.addPackage(HttpRequest.class.getPackage());
        war.add(EmptyAsset.INSTANCE, "WEB-INF/beans.xml");
        war.addClasses(EJBResource.class, EjbInterceptor.class);
        war.addAsWebInfResource(WebXml.get("<servlet-mapping>\n" +
                "        <servlet-name>javax.ws.rs.core.Application</servlet-name>\n" +
                "        <url-pattern>/myjaxrs/*</url-pattern>\n" +
View Full Code Here

public class EjbMethodInterceptorTestCase {

    @Deployment
    public static Archive<?> deploy() {
        WebArchive war = ShrinkWrap.create(WebArchive.class, "testmethodinterceptor.war");
        war.addPackage(EjbMethodInterceptorTestCase.class.getPackage());
        war.addAsWebInfResource(EjbMethodInterceptorTestCase.class.getPackage(), "ejb-jar.xml", "ejb-jar.xml");
        return war;
    }

    @Test
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.