Package org.jboss.shrinkwrap.descriptor.api.beans11

Examples of org.jboss.shrinkwrap.descriptor.api.beans11.BeansDescriptor


      Project project = projectFactory.createTempProject();
      CDIFacet<?> cdiFacet = facetFactory.install(project, CDIFacet_1_0.class);
      assertNotNull(cdiFacet);
      assertTrue(project.hasFacet(CDIFacet.class));
      assertTrue(project.hasFacet(CDIFacet_1_0.class));
      BeansDescriptor config = (BeansDescriptor) project.getFacet(CDIFacet.class).getConfig();
      assertNotNull(config);
   }
View Full Code Here


   @Override
   public BeansDescriptor getConfig()
   {
      DescriptorImporter<BeansDescriptor> importer = Descriptors.importAs(BeansDescriptor.class);
      BeansDescriptor descriptor = importer.fromStream(getConfigFile().getResourceInputStream());
      return descriptor;
   }
View Full Code Here

     *
     * include::MyManagedScheduledBatchAlternative[]
     */
    @Deployment
    public static WebArchive createDeployment() {
        BeansDescriptor beansXml = Descriptors.create(BeansDescriptor.class);

        WebArchive war = ShrinkWrap.create(WebArchive.class)
                .addClasses(
                        MyBatchlet.class,
                        MyJob.class,
                        MyJobAlternative.class,
                        MyManagedScheduledBatch.class,
                        MyManagedScheduledBatchBean.class,
                        MyManagedScheduledBatchAlternative.class)
                .addAsWebInfResource(
                        new StringAsset(beansXml.createAlternatives().clazz(
                                MyManagedScheduledBatchAlternative.class.getName()).up().exportAsString()),
                        beansXml.getDescriptorName())
                .addAsResource("META-INF/batch-jobs/myJob.xml");
        System.out.println(war.toString(true));
        return war;
    }
View Full Code Here

TOP

Related Classes of org.jboss.shrinkwrap.descriptor.api.beans11.BeansDescriptor

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.