[jboss-osgi-issues] [JBoss JIRA] Resolved: (JBOSGI-382) Migrate shrinkwrap test bundles

Thomas Diesler (JIRA) jira-events at lists.jboss.org
Tue Jul 26 05:53:24 EDT 2011


     [ https://issues.jboss.org/browse/JBOSGI-382?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Thomas Diesler resolved JBOSGI-382.
-----------------------------------

    Resolution: Out of Date


Out of Date

> Migrate shrinkwrap test bundles 
> --------------------------------
>
>                 Key: JBOSGI-382
>                 URL: https://issues.jboss.org/browse/JBOSGI-382
>             Project: JBoss OSGi
>          Issue Type: Task
>      Security Level: Public(Everyone can see) 
>          Components: Other
>            Reporter: Thomas Diesler
>             Fix For: Approved and Unscheduled
>
>
> Currently we use a rather verbose syntax like 
>       // Bundle-SymbolicName: simple-fragA
>       // Export-Package: org.jboss.test.osgi.fragments.fragA
>       // Fragment-Host: simple-hostA
>       final JavaArchive archive = ShrinkWrap.create(JavaArchive.class, "simple-hostA");
>       archive.addClasses(FragBeanA.class);
>       archive.addResource(getResourceFile("fragments/resource.txt"));
>       archive.setManifest(new Asset()
>       {
>          public InputStream openStream()
>          {
>             OSGiManifestBuilder builder = OSGiManifestBuilder.newInstance();
>             builder.addBundleManifestVersion(2);
>             builder.addBundleSymbolicName(archive.getName());
>             builder.addExportPackages(FragBeanA.class);
>             builder.addFragmentHost("simple-hostA");
>             return builder.openStream();
>          }
>       });
>       Bundle fragA = installBundle(archive);
>       assertBundleState(Bundle.INSTALLED, fragA.getState());
> This should be supported natively by Shrinkwrap
>       // Bundle-SymbolicName: simple-fragA
>       // Export-Package: org.jboss.test.osgi.fragments.fragA
>       // Fragment-Host: simple-hostA
>       final BundleArchive archive = ShrinkWrap.create(BundleArchive.class, "simple-hostA");
>       archive.addClasses(FragBeanA.class);
>       archive.addResource(getResourceFile("fragments/resource.txt"));
>       archive.addBundleManifestVersion(2);
>       archive.addBundleSymbolicName(archive.getName());
>       archive.addExportPackages(FragBeanA.class);
>       archive.addFragmentHost("simple-hostA");
>       Bundle fragA = installBundle(archive);
>       assertBundleState(Bundle.INSTALLED, fragA.getState());
> or similar

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the jboss-osgi-issues mailing list