Uploaded image for project: 'ShrinkWrap'
  1. ShrinkWrap
  2. SHRINKWRAP-239

Support the notion of shrinkwrap BundleArchive

    Details

    • Type: Feature Request
    • Status: Open (View Workflow)
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: assembly
    • Labels:
      None

      Description

      Currently we create test bundles like this

      final JavaArchive archive = ShrinkWrap.create("test.jar", JavaArchive.class);
      archive.setManifest(new Asset()
      {
      public InputStream openStream()

      { OSGiManifestBuilder builder = OSGiManifestBuilder.newInstance(); builder.addBundleSymbolicName(archive.getName()); builder.addBundleManifestVersion(2); builder.addBundleActivator(SimpleActivator.class.getName()); // [TODO] generate a separate bundle the contains the test case builder.addExportPackages(OSGiEmbeddedFrameworkTestCase.class); builder.addImportPackages("org.jboss.arquillian.junit", "org.jboss.shrinkwrap.api", "org.jboss.shrinkwrap.api.spec"); builder.addImportPackages("javax.inject", "org.junit", "org.junit.runner"); return builder.openStream(); }

      });
      archive.addClasses(SimpleActivator.class, SimpleService.class);
      archive.addClasses(OSGiEmbeddedFrameworkTestCase.class);

      This should be done much easier via a BundleArchive

        Gliffy Diagrams

          Issue Links

            Activity

            Hide
            alrubinger Andrew Rubinger added a comment -

            Likely to be done implicitly via SHRINKWRAP-139 and an OSGi extension to SW

            Show
            alrubinger Andrew Rubinger added a comment - Likely to be done implicitly via SHRINKWRAP-139 and an OSGi extension to SW
            Hide
            thomas.diesler Thomas Diesler added a comment - - edited

            It must be possible to create a BundleArchive from within the OSGi Framework.
            i.e. A (test) Bundle can generate shrinkwrap bundles

            Show
            thomas.diesler Thomas Diesler added a comment - - edited It must be possible to create a BundleArchive from within the OSGi Framework. i.e. A (test) Bundle can generate shrinkwrap bundles
            Hide
            bosschaert David Bosschaert added a comment -

            Yes - Shrinkwrap should be usable from inside an OSGi framework. I've added a separate issue for that: SHRINKWRAP-242 and will start looking into it.

            Show
            bosschaert David Bosschaert added a comment - Yes - Shrinkwrap should be usable from inside an OSGi framework. I've added a separate issue for that: SHRINKWRAP-242 and will start looking into it.

              People

              • Assignee:
                Unassigned
                Reporter:
                thomas.diesler Thomas Diesler
              • Votes:
                1 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:

                  Development