Package org.jboss.shrinkwrap.api.spec

Examples of org.jboss.shrinkwrap.api.spec.EnterpriseArchive.addAsManifestResource()


    @Deployment
    public static EnterpriseArchive createDeployment() {
        final WebArchive war = createWAR(SampleBean.class, "ws-notannotated-XXX.war");
        final EnterpriseArchive ear = ShrinkWrap.create(EnterpriseArchive.class, "ws-notannotated-XXX.ear");
        ear.addAsManifestResource(NotAnnotatedDeployTestCase.class.getPackage(), "application-notannotated.xml", "application.xml");
        ear.addAsModule(war);
        return ear;
    }

}
View Full Code Here


    @Deployment
    public static EnterpriseArchive createDeployment() {
        final WebArchive war = createWAR(SampleBeanWebService.class, "ws-annotated-XXX.war");
        final EnterpriseArchive ear = ShrinkWrap.create(EnterpriseArchive.class, "ws-annotated-XXX.ear");
        ear.addAsManifestResource(AnnotatedDeployTestCase.class.getPackage(), "application.xml", "application.xml");
        ear.addAsModule(war);
        return ear;
    }

}
View Full Code Here

        ear.addAsModule(ejbjar);        // add ejbjar to root of ear

        JavaArchive lib = ShrinkWrap.create(JavaArchive.class, "lib.jar");
        lib.addClasses(Employee.class, TxTimeoutTestCase.class);
        ear.addAsLibraries(lib, persistenceProvider);
        ear.addAsManifestResource(new StringAsset("Dependencies: org.jboss.jboss-transaction-spi export \n"), "MANIFEST.MF");
        return ear;

    }

    private static StringAsset emptyEjbJar() {
View Full Code Here

        sar.addClasses(SarWithinEarServiceMBean.class, SarWithinEarService.class);
        sar.addAsManifestResource(SarWithinEarTestCase.class.getPackage(), "jboss-service-with-application-xml.xml", "jboss-service.xml");

        final EnterpriseArchive ear = ShrinkWrap.create(EnterpriseArchive.class, EAR_WITH_APPLICATION_XML);
        ear.addAsModule(sar);
        ear.addAsManifestResource(SarWithinEarTestCase.class.getPackage(), "application.xml", "application.xml");
        return ear;
    }

    /**
     * Tests that invocation on a service deployed within a .sar, inside a .ear without an application.xml, is successful.
View Full Code Here

        WebArchive war = ShrinkWrap.create(WebArchive.class, "test.war");
        war.addClasses(TestAA.class, EarJbossStructureAdditionalModuleTestCase.class);

        EnterpriseArchive ear = ShrinkWrap.create(EnterpriseArchive.class);
        ear.addAsModule(war);
        ear.addAsManifestResource(new StringAsset(
                "<jboss-deployment-structure>" +
                        "<sub-deployment name=\"test.war\">" +
                        "<dependencies>" +
                        "<module name=\"deployment.somemodule\" />" +
                        "</dependencies>" +
View Full Code Here

        // create the .ear with the .sar and the .jar and the jboss-deployment-structure.xml
        final EnterpriseArchive ear = ShrinkWrap.create(EnterpriseArchive.class, EAR_NAME + ".ear");
        ear.addAsModule(sar);
        ear.addAsModule(jar);
        ear.addAsManifestResource(MBeanTCCLTestCase.class.getPackage(), "jboss-deployment-structure.xml", "jboss-deployment-structure.xml");

        logger.info("created deployment: " + ear.toString(true));
        return ear;
    }
View Full Code Here

    @Deployment
    public static EnterpriseArchive createEar() {
        // create the top level ear
        EnterpriseArchive ear = ShrinkWrap.create(EnterpriseArchive.class, EAR_NAME);
        // add application.xml
        ear.addAsManifestResource(OverriddenAppNameTestCase.class.getPackage(), "application.xml", "application.xml");

        // create the jar containing the EJBs
        JavaArchive jar = ShrinkWrap.create(JavaArchive.class, JAR_NAME);
        // add ejb-jar.xml
        jar.addAsManifestResource(OverriddenAppNameTestCase.class.getPackage(), "ejb-jar.xml", "ejb-jar.xml");
View Full Code Here

                HelloWorldManagedConnectionMetaData.class);
        rar.addAsLibraries(rarJar);

        ear.addAsModule(rar);

        ear.addAsManifestResource(new StringAsset(
               "<jboss-deployment-structure><ear-subdeployments-isolated>true</ear-subdeployments-isolated></jboss-deployment-structure>"),
                "jboss-deployment-structure.xml");

        return ear;
    }
View Full Code Here

        war.addAsWebInfResource(ServletUnitTestCase.class.getPackage(), "jboss-web-ear.xml", "jboss-web.xml");
        war.addAsWebInfResource(ServletUnitTestCase.class.getPackage(), "web-ear.xml", "web.xml");
        war.addClass(EJBServletEar.class);
        ear.addAsModule(war);

        ear.addAsManifestResource(ServletUnitTestCase.class.getPackage(), "application.xml", "application.xml");
        log.info(ear.toString(true));
        return ear;
    }

    private static JavaArchive getEjbs(String archiveName) {
View Full Code Here

        ejb = ShrinkWrap.create(JavaArchive.class, "ejb2.jar");
        ejb.addClasses(MyEjb2.class);
        ear.addAsModule(ejb);

        ear.addAsManifestResource(new StringAsset(
               "<jboss-deployment-structure><ear-subdeployments-isolated>false</ear-subdeployments-isolated></jboss-deployment-structure>"),
                "jboss-deployment-structure.xml");

        return ear;
    }
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.