Package org.jboss.shrinkwrap.api.spec

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


        JavaArchive testClassesJar = ShrinkWrap.create(JavaArchive.class, "test-classes.jar");
        testClassesJar = addClasses(testClassesJar, new File("target/test-classes/org"), null);

        // add non itests-2 RHQ classes used by the test classes, as well as needed resources
        testClassesJar.addClass(ThrowableUtil.class);
        testClassesJar.addClass(MessageDigestGenerator.class);
        testClassesJar.addClass(StreamUtil.class);
        testClassesJar.addClass(AssertUtils.class);
        testClassesJar.addClass(ResourceBuilder.class);
        testClassesJar.addClass(ResourceTypeBuilder.class);
        testClassesJar.addClass(BuilderException.class);
View Full Code Here


        testClassesJar = addClasses(testClassesJar, new File("target/test-classes/org"), null);

        // add non itests-2 RHQ classes used by the test classes, as well as needed resources
        testClassesJar.addClass(ThrowableUtil.class);
        testClassesJar.addClass(MessageDigestGenerator.class);
        testClassesJar.addClass(StreamUtil.class);
        testClassesJar.addClass(AssertUtils.class);
        testClassesJar.addClass(ResourceBuilder.class);
        testClassesJar.addClass(ResourceTypeBuilder.class);
        testClassesJar.addClass(BuilderException.class);
        testClassesJar.addClasses(PropertyMatcher.class, MatchResult.class, PropertyMatchException.class);
View Full Code Here

        // add non itests-2 RHQ classes used by the test classes, as well as needed resources
        testClassesJar.addClass(ThrowableUtil.class);
        testClassesJar.addClass(MessageDigestGenerator.class);
        testClassesJar.addClass(StreamUtil.class);
        testClassesJar.addClass(AssertUtils.class);
        testClassesJar.addClass(ResourceBuilder.class);
        testClassesJar.addClass(ResourceTypeBuilder.class);
        testClassesJar.addClass(BuilderException.class);
        testClassesJar.addClasses(PropertyMatcher.class, MatchResult.class, PropertyMatchException.class);
        testClassesJar.addAsManifestResource(EmptyAsset.INSTANCE, ArchivePaths.create("beans.xml")); // add CDI injection (needed by arquillian injection);
View Full Code Here

        // add non itests-2 RHQ classes used by the test classes, as well as needed resources
        testClassesJar.addClass(ThrowableUtil.class);
        testClassesJar.addClass(MessageDigestGenerator.class);
        testClassesJar.addClass(StreamUtil.class);
        testClassesJar.addClass(AssertUtils.class);
        testClassesJar.addClass(ResourceBuilder.class);
        testClassesJar.addClass(ResourceTypeBuilder.class);
        testClassesJar.addClass(BuilderException.class);
        testClassesJar.addClasses(PropertyMatcher.class, MatchResult.class, PropertyMatchException.class);
        testClassesJar.addAsManifestResource(EmptyAsset.INSTANCE, ArchivePaths.create("beans.xml")); // add CDI injection (needed by arquillian injection);
        //TOD0 (jshaughn): Once we have identified all of the necessary test resource files, see if we can just add the
View Full Code Here

        testClassesJar.addClass(ThrowableUtil.class);
        testClassesJar.addClass(MessageDigestGenerator.class);
        testClassesJar.addClass(StreamUtil.class);
        testClassesJar.addClass(AssertUtils.class);
        testClassesJar.addClass(ResourceBuilder.class);
        testClassesJar.addClass(ResourceTypeBuilder.class);
        testClassesJar.addClass(BuilderException.class);
        testClassesJar.addClasses(PropertyMatcher.class, MatchResult.class, PropertyMatchException.class);
        testClassesJar.addAsManifestResource(EmptyAsset.INSTANCE, ArchivePaths.create("beans.xml")); // add CDI injection (needed by arquillian injection);
        //TOD0 (jshaughn): Once we have identified all of the necessary test resource files, see if we can just add the
        //      entire /resources dir in one statement
View Full Code Here

        testClassesJar.addClass(MessageDigestGenerator.class);
        testClassesJar.addClass(StreamUtil.class);
        testClassesJar.addClass(AssertUtils.class);
        testClassesJar.addClass(ResourceBuilder.class);
        testClassesJar.addClass(ResourceTypeBuilder.class);
        testClassesJar.addClass(BuilderException.class);
        testClassesJar.addClasses(PropertyMatcher.class, MatchResult.class, PropertyMatchException.class);
        testClassesJar.addAsManifestResource(EmptyAsset.INSTANCE, ArchivePaths.create("beans.xml")); // add CDI injection (needed by arquillian injection);
        //TOD0 (jshaughn): Once we have identified all of the necessary test resource files, see if we can just add the
        //      entire /resources dir in one statement
        testClassesJar.addAsResource("binary-blob-sample.jar");
View Full Code Here

            .addAsManifestResource("test-persistence.xml", "persistence.xml") //  the test persistence context           
            .addAsManifestResource(EmptyAsset.INSTANCE, ArchivePaths.create("beans.xml") // add CDI injection (needed by arquillian injection)
            );

        // non-domain RHQ classes in use by domain test classes
        ejbJar.addClass(ThrowableUtil.class) //
            .addClass(MessageDigestGenerator.class) //
            .addClass(StreamUtil.class) //
            .addClass(AssertUtils.class) //
            .addClasses(PropertyMatcher.class, MatchResult.class, PropertyMatchException.class);
View Full Code Here

        // domain classes
        ejbJar = addClasses(ejbJar, new File("target/classes/org"), null);

        // SetupBean class
        ejbJar.addClass(SetupBean.class);

        JavaArchive testClassesJar = ShrinkWrap.create(JavaArchive.class, "test-classes.jar");
        testClassesJar = addClasses(testClassesJar, new File("target/test-classes/org"), null);

        // create test ear
View Full Code Here

                prepareCustomServerPluginService(alertSenderService);
                alertSenderService.masterConfig.getPluginDirectory().mkdirs();
                unprepareServerPluginService();

                JavaArchive archive = ShrinkWrap.create(JavaArchive.class);
                archive.addClass(TestAlertSender.class);
                URL res = this.getClass().getClassLoader().getResource("test-alert-sender-serverplugin.xml");
                archive.addAsResource(res, "META-INF/rhq-serverplugin.xml");

                File pluginFile = new File(alertSenderService.masterConfig.getPluginDirectory(), "test-aler-plugin.jar");
View Full Code Here

            if (entryName.endsWith(".class")) {
                String className
                        = pathToClassName(entryName.substring(0, entryName.length() - (".class".length())));

                javaArchive.addClass(className);
            } else {
                javaArchive.addAsResource(archiveEntry, entryName.replace('\\', '/'));
            }
        }
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.