Examples of addAsManifestResource()


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

        // add application dependency on H2 JDBC driver, so that the Hibernate classloader (same as app classloader)
        // will see the H2 JDBC driver.
        // equivalent hack for use of shared Hiberante module, would be to add the H2 dependency directly to the
        // shared Hibernate module.
        // also add dependency on org.slf4j
        ear.addAsManifestResource(new StringAsset(
                "<jboss-deployment-structure>" +
                        " <deployment>" +
                        "  <dependencies>" +
                        "   <module name=\"com.h2database.h2\" />" +
                        "   <module name=\"org.slf4j\"/>" +
View Full Code Here

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

        // add application dependency on H2 JDBC driver, so that the Hibernate classloader (same as app classloader)
        // will see the H2 JDBC driver.
        // equivalent hack for use of shared Hiberante module, would be to add the H2 dependency directly to the
        // shared Hibernate module.
        // also add dependency on org.slf4j
        ear.addAsManifestResource(new StringAsset(
                "<jboss-deployment-structure>" +
                        " <deployment>" +
                        "  <dependencies>" +
                        "   <module name=\"com.h2database.h2\" />" +
                        "   <module name=\"org.slf4j\"/>" +
View Full Code Here

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

        // add application dependency on H2 JDBC driver, so that the Hibernate classloader (same as app classloader)
        // will see the H2 JDBC driver.
        // equivalent hack for use of shared Hiberante module, would be to add the H2 dependency directly to the
        // shared Hibernate module.
        // also add dependency on org.slf4j
        ear.addAsManifestResource(new StringAsset(
            "<jboss-deployment-structure>" +
            " <deployment>" +
            "  <dependencies>" +
            "   <module name=\"com.h2database.h2\" />" +
            "   <module name=\"org.slf4j\"/>" +
View Full Code Here

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

     * @return
     */
    @Deployment
    public static Archive<?> createDeployment() {
        final EnterpriseArchive ear = ShrinkWrap.create(EnterpriseArchive.class, "deployment-structure.ear");
        ear.addAsManifestResource(EarJBossDeploymentStructureTestCase.class.getPackage(), "jboss-deployment-structure.xml", "jboss-deployment-structure.xml");

        final JavaArchive jarOne = ShrinkWrap.create(JavaArchive.class, "available.jar");
        jarOne.addClass(Available.class);
        jarOne.addAsManifestResource(new StringAsset("test resource"), METAINF_RESOURCE_TXT);

View Full Code Here

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

        jarAshared.addClasses(Shared.class, SharedBean.class);
        jarAshared.addAsManifestResource(SharedBeanInEarsUnitTestCase.class.getPackage(), "ejb-jar-a.xml", "ejb-jar.xml");
       
        ear.addAsModule(jarA);
        ear.addAsModule(jarAshared);
        ear.addAsManifestResource(SharedBeanInEarsUnitTestCase.class.getPackage(), "application-a.xml", "application.xml");
        log.info(ear.toString(true));
        return ear;
    }

    @Deployment(name="b", testable = false, managed = true)
View Full Code Here

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

        final EnterpriseArchive ear = ShrinkWrap.create(EnterpriseArchive.class, "mdb-objectmessage-test.ear");
        ear.addAsModule(ejbJar);
        ear.addAsLibraries(libJar);

        ear.addAsManifestResource(new StringAsset("Dependencies: org.jboss.as.controller-client, org.jboss.dmr \n"), "MANIFEST.MF");
        logger.info(ear.toString(true));
        return ear;
    }

    /**
 
View Full Code Here

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

        jarBshared.addClasses(Shared.class, SharedBean.class);
        jarBshared.addAsManifestResource(SharedBeanInEarsUnitTestCase.class.getPackage(), "ejb-jar-b.xml", "ejb-jar.xml");
       
        ear.addAsModule(jarB);
        ear.addAsModule(jarBshared);       
        ear.addAsManifestResource(SharedBeanInEarsUnitTestCase.class.getPackage(), "application-b.xml", "application.xml");
        log.info(ear.toString(true));
        return ear;
    }
   
    private InitialContext getInitialContext() throws NamingException {
View Full Code Here

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

    @Deployment(testable = false) // the incorrectly named "testable" attribute tells Arquillian whether or not
    // it should add Arquillian specific metadata to the archive (which ultimately transforms it to a WebArchive).
    // We don't want that, so set that flag to false
    public static Archive createDeployment() {
        final EnterpriseArchive ear = ShrinkWrap.create(EnterpriseArchive.class, APP_NAME + ".ear");
        ear.addAsManifestResource(JBossAppXMLSecurityTestCase.class.getPackage(),
                "jboss-app.xml", "jboss-app.xml");

        final JavaArchive jar = ShrinkWrap.create(JavaArchive.class, MODULE_NAME + ".jar");
        jar.addClasses(BeanInterface.class,FirstBean.class, SecondBean.class);
View Full Code Here

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

                            serviceProvider.getServiceImplementations());
                }
            }

            if (beansDescriptor != null) {
                library.addAsManifestResource(new StringAsset(beansDescriptor.exportAsString()),
                        beansDescriptor.getDescriptorName());

            } else if (includeEmptyBeanXml) {
                library.addAsManifestResource(EmptyAsset.INSTANCE, ArchivePaths.create("beans.xml"));
            }
View Full Code Here

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

            if (beansDescriptor != null) {
                library.addAsManifestResource(new StringAsset(beansDescriptor.exportAsString()),
                        beansDescriptor.getDescriptorName());

            } else if (includeEmptyBeanXml) {
                library.addAsManifestResource(EmptyAsset.INSTANCE, ArchivePaths.create("beans.xml"));
            }
            return library;
        }

    }
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.