Package org.jboss.shrinkwrap.api.asset

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


   public static JavaArchive getDeployment()
   {

      JavaArchive archive = ShrinkWrap.create(JavaArchive.class, "test.jar")
               .addPackages(true, Root.class.getPackage())
               .addManifestResource(new ByteArrayAsset("<beans/>".getBytes()), ArchivePaths.create("beans.xml"));

      return archive;
   }
View Full Code Here


   public static JavaArchive getDeployment()
   {

      JavaArchive archive = ShrinkWrap.create(JavaArchive.class, "test.jar")
               .addPackages(true, Root.class.getPackage())
               .addManifestResource(new ByteArrayAsset("<beans/>".getBytes()), ArchivePaths.create("beans.xml"));

      return archive;
   }
View Full Code Here

   public static JavaArchive getDeployment()
   {

      JavaArchive archive = ShrinkWrap.create(JavaArchive.class, "test.jar")
               .addPackages(true, Root.class.getPackage())
               .addManifestResource(new ByteArrayAsset("<beans/>".getBytes()), ArchivePaths.create("beans.xml"));

      return archive;
   }
View Full Code Here

   public static JavaArchive getDeployment()
   {

      JavaArchive archive = ShrinkWrap.create(JavaArchive.class, "test.jar")
               .addPackages(true, Root.class.getPackage())
               .addManifestResource(new ByteArrayAsset("<beans/>".getBytes()), ArchivePaths.create("beans.xml"));

      return archive;
   }
View Full Code Here

        testEar.add(new ClassAsset(StrippedDownStartupBeanPreparation.class), ArchivePaths
            .create("/rhq-server.jar/org/rhq/enterprise/server/test/"
                + "StrippedDownStartupBeanPreparation.class"));
        testEar.add(new ClassAsset(FakeStorageClusterSettingsManagerBean.class), ArchivePaths
            .create("/rhq-server.jar/org/rhq/enterprise/server/storage/FakeStorageClusterSettingsManagerBean.class"));
        testEar.addAsManifestResource(new ByteArrayAsset("<beans/>".getBytes()), ArchivePaths.create("beans.xml"));

        // add the test classes to the deployment
        testEar.addAsLibrary(testClassesJar);

        // add the necessary AS7 dependency modules
View Full Code Here

            template.process(dataModel, out);
        } catch (Exception e) {
            throw new RuntimeException("Failed to add ejb-jar.xml to EJB-JAR.", e);
        }

        Asset ejbJarXml = new ByteArrayAsset(byteArrayOutputStream.toByteArray());               

        // add deployment descriptor
        addAsManifestResource(ejbJarXml, "ejb-jar.xml");

        // add entity bean classes
View Full Code Here

        }
        Index index = indexer.complete();
        ByteArrayOutputStream data = new ByteArrayOutputStream();
        IndexWriter writer = new IndexWriter(data);
        writer.write(index);
        jar.addAsManifestResource(new ByteArrayAsset(data.toByteArray()), "jandex.idx");
        FileOutputStream jarFile = new FileOutputStream(new File(file, "webTest.jar"));
        try {
            jar.as(ZipExporter.class).exportTo(jarFile);
        } finally {
            jarFile.flush();
View Full Code Here

    @Deployment
    public static Archive<?> deploy() {
        WebArchive war = ShrinkWrap.create(WebArchive.class);
        JavaArchive libJar = ShrinkWrap.create(JavaArchive.class);
        libJar.addClasses(TestAA.class, EarClassPath2TestCase.class);
        libJar.addAsManifestResource(new ByteArrayAsset("Class-Path: ../../../cp.jar\n".getBytes()), "MANIFEST.MF");
        war.addAsLibraries(libJar);

        EnterpriseArchive ear = ShrinkWrap.create(EnterpriseArchive.class);
        ear.addAsModule(war);
        JavaArchive earLib = ShrinkWrap.create(JavaArchive.class, "cp.jar");
View Full Code Here

                "org.jboss.as.controller", "org.jboss.as.core-security"), "jboss-deployment-structure.xml");
        final Properties props = EJBUtil.createEjbClientConfiguration(StringUtils.strip(
                TestSuiteEnvironment.getServerAddress(), "[]"));
        final ByteArrayOutputStream baos = new ByteArrayOutputStream();
        props.store(baos, null);
        jar.addAsResource(new ByteArrayAsset(baos.toByteArray()), "jboss-ejb-client.properties");
        return jar;
    }
View Full Code Here

        jar.addAsManifestResource(Utils.getJBossDeploymentStructure("org.jboss.as.security-api", "org.jboss.as.core-security-api"), "jboss-deployment-structure.xml");
        final Properties props = EJBUtil.createEjbClientConfiguration(StringUtils.strip(
                TestSuiteEnvironment.getServerAddress(), "[]"));
        final ByteArrayOutputStream baos = new ByteArrayOutputStream();
        props.store(baos, null);
        jar.addAsResource(new ByteArrayAsset(baos.toByteArray()), "jboss-ejb-client.properties");
        return jar;
    }
View Full Code Here

TOP

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

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.