Package org.jboss.shrinkwrap.api.spec

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


            ArchivePath metaInf = ArchivePaths.create("META-INF");


            WebArchive archive = ShrinkWrap.create(WebArchive.class, archiveName);
            for(Package pkg : pkgs) {
                archive.addPackage(pkg);
            }

            File sourceMetaInf = getSourceMetaInfDir(archiveName);
            addFiles(archive, sourceMetaInf, metaInf);
View Full Code Here


        war.addAsWebInfResource("WEB-INF/" + entity + "-beans.xml", "beans.xml");
        war.addAsWebInfResource("WEB-INF/" + entity + "-seam-beans.xml", "classes/META-INF/seam-beans.xml");
        war.addAsWebInfResource("WEB-INF/context.xml", "context.xml");

        war.addPackage(MetaDataLoader.class.getPackage());
        if (entity.equals("sp")) {
            war.addPackage(SpCustomizer.class.getPackage());
            war.addAsWebInfResource("test_keystore.jks", "classes/test_keystore.jks");
        } else if (entity.equals("idp")) {
            war.addPackage(IdpCustomizer.class.getPackage());
View Full Code Here

        war.addAsWebInfResource("WEB-INF/" + entity + "-seam-beans.xml", "classes/META-INF/seam-beans.xml");
        war.addAsWebInfResource("WEB-INF/context.xml", "context.xml");

        war.addPackage(MetaDataLoader.class.getPackage());
        if (entity.equals("sp")) {
            war.addPackage(SpCustomizer.class.getPackage());
            war.addAsWebInfResource("test_keystore.jks", "classes/test_keystore.jks");
        } else if (entity.equals("idp")) {
            war.addPackage(IdpCustomizer.class.getPackage());
            war.addAsWebInfResource("test_keystore.jks", "classes/test_keystore.jks");
        } else if (entity.equals("op")) {
View Full Code Here

        war.addPackage(MetaDataLoader.class.getPackage());
        if (entity.equals("sp")) {
            war.addPackage(SpCustomizer.class.getPackage());
            war.addAsWebInfResource("test_keystore.jks", "classes/test_keystore.jks");
        } else if (entity.equals("idp")) {
            war.addPackage(IdpCustomizer.class.getPackage());
            war.addAsWebInfResource("test_keystore.jks", "classes/test_keystore.jks");
        } else if (entity.equals("op")) {
            war.addPackage(OpCustomizer.class.getPackage());
        } else if (entity.equals("rp")) {
            war.addPackage(RpCustomizer.class.getPackage());
View Full Code Here

            war.addAsWebInfResource("test_keystore.jks", "classes/test_keystore.jks");
        } else if (entity.equals("idp")) {
            war.addPackage(IdpCustomizer.class.getPackage());
            war.addAsWebInfResource("test_keystore.jks", "classes/test_keystore.jks");
        } else if (entity.equals("op")) {
            war.addPackage(OpCustomizer.class.getPackage());
        } else if (entity.equals("rp")) {
            war.addPackage(RpCustomizer.class.getPackage());
        }

        return war;
View Full Code Here

            war.addPackage(IdpCustomizer.class.getPackage());
            war.addAsWebInfResource("test_keystore.jks", "classes/test_keystore.jks");
        } else if (entity.equals("op")) {
            war.addPackage(OpCustomizer.class.getPackage());
        } else if (entity.equals("rp")) {
            war.addPackage(RpCustomizer.class.getPackage());
        }

        return war;
    }
}
View Full Code Here

        return createDeployment();
    }

    private static Archive<?> createDeployment() {
        WebArchive war = ShrinkWrap.create(WebArchive.class, "singleton.war");
        war.addPackage(MyService.class.getPackage());
        war.setManifest(new StringAsset("Manifest-Version: 1.0\nDependencies: org.jboss.msc, org.jboss.as.clustering.singleton, org.jboss.as.server, org.jboss.marshalling, org.jgroups\n"));
        return war;
    }

    @Test
View Full Code Here

    private URL url;

    @Deployment(testable = false)
    public static Archive<?> getDeployment() {
        final WebArchive war = ShrinkWrap.create(WebArchive.class, "war-example.war");
        war.addPackage(WarTestCase.class.getPackage());
        war.setWebXML(WarTestCase.class.getPackage(), "web.xml");
        return war;
    }

    @Test
View Full Code Here

        return createDeployment();
    }

    private static WebArchive createDeployment() {
        WebArchive war = ShrinkWrap.create(WebArchive.class, "stateful.war");
        war.addPackage(StatefulBean.class.getPackage());
        war.addPackage(EJBDirectory.class.getPackage());
        war.setWebXML(StatefulBean.class.getPackage(), "web.xml");
        war.addAsWebInfResource(new StringAsset("<beans>" +
                "<interceptors><class>" + StatefulCDIInterceptor.class.getName() + "</class></interceptors>" +
                "<decorators><class>" + CounterDecorator.class.getName() + "</class></decorators>" +
View Full Code Here

    }

    private static WebArchive createDeployment() {
        WebArchive war = ShrinkWrap.create(WebArchive.class, "stateful.war");
        war.addPackage(StatefulBean.class.getPackage());
        war.addPackage(EJBDirectory.class.getPackage());
        war.setWebXML(StatefulBean.class.getPackage(), "web.xml");
        war.addAsWebInfResource(new StringAsset("<beans>" +
                "<interceptors><class>" + StatefulCDIInterceptor.class.getName() + "</class></interceptors>" +
                "<decorators><class>" + CounterDecorator.class.getName() + "</class></decorators>" +
                "</beans>"), "beans.xml");
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.