Package org.jboss.shrinkwrap.api.asset

Examples of org.jboss.shrinkwrap.api.asset.ClassLoaderAsset


        WebArchive archive = ShrinkWrap.create(WebArchive.class, TEST_NAME + ".war")
                .addClass(MultiplePUServlet.class)
                .addClass(Person1.class).addClass(Person2.class)
                .addClass(Runner.class)
                .addAsLibraries(JarLocation.jarLocation(Test.class))
                .addAsResource(new ClassLoaderAsset("org/apache/openejb/arquillian/tests/persistence/multiple/persistence.xml"), "META-INF/persistence.xml")
                .setWebXML(new StringAsset(descriptor.exportAsString()));

        return archive;
    }
View Full Code Here


    @Deployment(testable = false)
    public static WebArchive war() {
        return ShrinkWrap.create(WebArchive.class)
                         .addClass(Rot13.class)
                         .addAsWebInfResource(new ClassLoaderAsset("META-INF/openejb-jar.xml"), ArchivePaths.create("openejb-jar.xml"));
    }
View Full Code Here

    @Deployment(testable = false)
    public static WebArchive getArchive() {
        return base("jsf-resource-injection-test.war")
                .addClass(ResourceManagedBean.class)
                .addAsWebResource(new ClassLoaderAsset(
                        JSFResourceInjectionTest.class.getPackage()
                                .getName().replace('.', '/').concat("/resource.xhtml")), "resource.xhtml");
    }
View Full Code Here

  @Deployment(testable = false)
    public static WebArchive createDeployment() {
        WebArchive archive = ShrinkWrap.create(WebArchive.class, "moviefun.war")
            .addClasses(ActionServlet.class, SetupServlet.class, Movie.class, MovieController.class, Movies.class, MoviesImpl.class, MoviesRemote.class, JsfUtil.class, PaginationHelper.class, ExampleDataProducer.class, Examples.class, Setup.class)
            .addAsResource(new ClassLoaderAsset("META-INF/ejb-jar.xml") , "META-INF/ejb-jar.xml")
            .addAsResource(new ClassLoaderAsset("META-INF/persistence.xml") , "META-INF/persistence.xml")
            .addAsLibraries(new File("target/test-libs/commons-beanutils.jar"),
                new File("target/test-libs/commons-codec.jar"),
                new File("target/test-libs/commons-collections.jar"),
                new File("target/test-libs/commons-digester.jar"),
                new File("target/test-libs/commons-logging.jar"),
View Full Code Here

    @Deployment(testable = false)
    public static WebArchive getArchive() {

        return ShrinkWrap.create(WebArchive.class, "jsf-jms-test.war")
                .addClasses(DummyManagedBean.class)
                .addAsWebResource(new ClassLoaderAsset(
                        JMSInjectionTest.class.getPackage().getName().replace('.', '/').concat("/").concat("dummy.xhtml")), "dummy.xhtml")
                .setWebXML(new StringAsset(Descriptors.create(WebAppDescriptor.class)
                        .version("3.0")
                        .createServlet()
                            .servletName("jsf")
View Full Code Here

    @Deployment
    public static WebArchive archive() {
        return new WebModule(SubjectServiceTomEETest.class).getArchive()
                                                           .addClass(VoteCounter.class)
                   .addPackage(Subject.class.getPackage()) // domain
                   .addAsWebInfResource(new ClassLoaderAsset("META-INF/persistence.xml"), "persistence.xml")
                   .addAsWebInfResource(new ClassLoaderAsset("META-INF/env-entries.properties"), "env-entries.properties")
                   .addAsWebInfResource(new ClassLoaderAsset("META-INF/resources.xml"), "resources.xml")
                   .addAsWebInfResource(EmptyAsset.INSTANCE, "beans.xml")
                   .addPackage(PollingRouter.class.getPackage()) // core
                   .addPackage(SubjectDao.class.getPackage()) // core
                   .addPackage(SubjectService.class.getPackage()) // front
                   .addAsLibrary(JarLocation.jarLocation(IOUtils.class)) // helper for client test
View Full Code Here

    @Deployment
    public static WebArchive getDeployment() {
        TestContext context = new TestContext().setWebXmlFile("rpc-web.xml");
        WebArchive war = getDefaultDeployment(context);
        war.addClasses(RpcEndpoint.class, TestData.class);
        war.add(new ClassLoaderAsset("xindex.html"), "index.html");
        war.add(new ClassLoaderAsset("js/base.js"), "js/base.js");
        war.addAsWebInfResource("rpcendpoint-v1-rest.discovery");
        war.addAsWebInfResource("rpcendpoint-v1-rpc.discovery");
        return war;
    }
View Full Code Here

                    // addPackage() and getClassesPath() methods
                    ArchivePath classesPath = resolveClassesPath(archive);

                    if (classesPath != null) {
                        ArchivePath classNamePath = AssetUtil.getFullPathForClassResource(className);
                        archive.add(new ClassLoaderAsset(classNamePath.get().substring(1), clToUse),
                                ArchivePaths.create(classesPath, classNamePath));
                    } else {
                        archive.addClass(className);
                    }
                }
View Full Code Here

        Asset asset = null;

        if (beansDescriptor != null) {
            asset = new StringAsset(beansDescriptor.exportAsString());
        } else if (beansXml != null) {
            asset = new ClassLoaderAsset(beansXml.getSource());
        } else {
            asset = new StringAsset(Descriptors.create(BeansDescriptor.class).exportAsString());
        }

        if (this.isDebugMode) {
View Full Code Here

                    // See also org.jboss.shrinkwrap.impl.base.container.ContainerBase addPackage() and getClassesPath() methods
                    ArchivePath classesPath = resolveClassesPath(archive);

                    if (classesPath != null) {
                        ArchivePath classNamePath = AssetUtil.getFullPathForClassResource(className);
                        archive.add(new ClassLoaderAsset(classNamePath.get().substring(1), clToUse), new BasicPath(classesPath,
                                classNamePath));
                    } else {
                        archive.addClass(className);
                    }
                }
View Full Code Here

TOP

Related Classes of org.jboss.shrinkwrap.api.asset.ClassLoaderAsset

Copyright © 2018 www.massapicom. 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.