Examples of ByteArrayAsset


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

    beansXmlBuilder.append("<class>com.softwaremill.common.cdi.interceptor.NullToEmptyStringParamsInterceptor</class>");
    beansXmlBuilder.append("</interceptors>");
    beansXmlBuilder.append("</beans>");

    return archive.addAsResource(
                new ByteArrayAsset(beansXmlBuilder.toString().getBytes()),
                ArchivePaths.create("META-INF/beans.xml"));
  }
View Full Code Here

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

        beansXmlBuilder.append("<class>com.softwaremill.common.cdi.security.SecurityResultInterceptor</class>");
        beansXmlBuilder.append("</interceptors>");
        beansXmlBuilder.append("</beans>");

        return archive.addAsResource(
                new ByteArrayAsset(beansXmlBuilder.toString().getBytes()),
                ArchivePaths.create("META-INF/beans.xml"));
    }
View Full Code Here

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

        beansXmlBuilder.append("<beans>");
        fillBeansXml(beansXmlBuilder);
        beansXmlBuilder.append("</beans>");

        ar = ar.addAsManifestResource(
                new ByteArrayAsset(beansXmlBuilder.toString().getBytes(Charsets.UTF_8)),
                ArchivePaths.create("beans.xml"));

        return ar;
    }
View Full Code Here

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

         //.addClass(JettyEmbeddedConfiguration.class)
            .addAsLibraries(
                  DependencyResolvers.use(MavenDependencyResolver.class)
                        .artifacts("org.jboss.weld.servlet:weld-servlet:1.0.1-Final").resolveAs(GenericArchive.class))
         .addAsWebInfResource("jetty-env.xml")
         .addAsWebInfResource(new ByteArrayAsset(new byte[0]), "beans.xml")
         .setWebXML("in-container-web.xml");
      log.info(war.toString(true));
      return war;
   }
View Full Code Here

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

   public static Archive<?> createTestArchive()
   {
      return ShrinkWrap.create(WebArchive.class, "test.war")
            .addPackage(Game.class.getPackage())
            .addWebResource("test-persistence.xml", "classes/META-INF/persistence.xml")
            .addWebResource(new ByteArrayAsset(new byte[0]), "beans.xml");
   }
View Full Code Here

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

public class BeanManagerTest
{
   @Deployment
   public static Archive<?> createTestArchive() {
      return ShrinkWrap.create(JavaArchive.class, "test.jar")
         .addManifestResource(new ByteArrayAsset(new byte[0]), "beans.xml");
   }
View Full Code Here

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

                  .addClasses(
                        RequestScopeBean.class,
                        ScopeAwareBean.class)
                  .setWebXML("jsf/jsf-web.xml")
                  .addResource("jsf/index.xhtml", "index.xhtml")
                  .addWebResource(new ByteArrayAsset("<beans/>".getBytes()), ArchivePaths.create("beans.xml"));
   }
View Full Code Here

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

   }

   private JavaArchive persistenceConfigurationSerializedAsProperties()
   {
      return ShrinkWrap.create(JavaArchive.class)
                       .addAsResource(new ByteArrayAsset(exportPersistenceConfigurationAsProperties().toByteArray()), configurationInstance.get().getPrefix() + "properties");
   }
View Full Code Here

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

   {
      final DBUnitConfiguration dbUnitConfigurationPrototype = new DBUnitConfiguration();
      final Map<String, String> extensionProperties = extractExtensionProperties(arquillianDescriptorInstance.get(), dbUnitConfigurationPrototype.getQualifier());
      final ByteArrayOutputStream properties = new PropertiesSerializer(dbUnitConfigurationPrototype.getPrefix()).serializeToProperties(extensionProperties);
      return ShrinkWrap.create(JavaArchive.class)
                       .addAsResource(new ByteArrayAsset(properties.toByteArray()), new DBUnitConfiguration().getPrefix() + "properties");
   }
View Full Code Here

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

   {
      final JpaCacheEvictionConfiguration config = new JpaCacheEvictionConfiguration();
      final Map<String, String> extensionProperties = extractExtensionProperties(arquillianDescriptorInstance.get(), config.getQualifier());
      final ByteArrayOutputStream output = new PropertiesSerializer(config.getPrefix()).serializeToProperties(extensionProperties);
      return ShrinkWrap.create(JavaArchive.class)
            .addAsResource(new ByteArrayAsset(output.toByteArray()), new JpaCacheEvictionConfiguration().getPrefix() + "properties");
   }
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.