Uploaded image for project: 'Red Hat Fuse'
  1. Red Hat Fuse
  2. ENTESB-5095

fabric8-maven-plugin: unable to configure for more complex wrap url handler syntax.

XMLWordPrintable

    • % %
    • Hide

      Use supplied testcase fabric8MavenPluginTest.tgz.
      Run

      mvn install fabric8:deploy
      

      Followed by Karaf command:

      container-add-profile root ENTESB-5095
      

      Then verify Export-Package list of the bundle wrap:mvn:org.apache.poi/ooxml-security/1.0

      Show
      Use supplied testcase fabric8MavenPluginTest.tgz. Run mvn install fabric8:deploy Followed by Karaf command: container-add-profile root ENTESB-5095 Then verify Export-Package list of the bundle wrap:mvn:org.apache.poi/ooxml-security/1.0

      The fabric8-maven-plugin can be configured to add additional bundles to the profile created by this Maven plugin, .e.g. I can set properties like

       <properties>
         <fabric8.profile>testprofile</fabric8.profile>
         <fabric8.bundles>
            ...
         </fabric8.bundles>
       </properties>
      

      However I have not found a way how to specify a bundle using wrap url handler while also explicitly configuring the package export list or bundle symbolic name.

      E.g. take this example

      <fabric8.bundles>
        wrap:mvn:org.apache.tomcat/juli/6.0.36;$Bundle-SymbolicName=juli&amp;Bundle-Version=6.0.36&amp;Export-Package=org.apache.juli;version=6.0.36,org.apache.juli.logging;version=6.0.36
      </fabric8.bundles>
      

      When getting deployed to a profile and then to a container, the deployed bundle won't have the Bundle-SymbolicName and Bundle-Version set. The Export-Package list will be exposed but the version of each package is not set.

      Another example is

      <fabric8.bundles>
        wrap:mvn:org.apache.poi/ooxml-security/1.0;$Export-Package=org.etsi.uri.x01903.v14;version=1.0
      </fabric8.bundles>
      

      When getting deployed to a profile definition and then to a container, the deployed bundle exports all its packages, despite the explicit Export-Package directive.

      When deploying each of these bundles manually using

      osgi:install -s 'wrap:mvn:org.apache.tomcat/juli/6.0.36$Bundle-SymbolicName=juli&amp;Bundle-Version=6.0.36&amp;Export-Package=org.apache.juli;version=6.0.36,org.apache.juli.logging;version=6.0.36'
      osgi:install -s 'wrap:mvn:org.apache.poi/ooxml-security/1.0;$Export-Package=org.etsi.uri.x01903.v14;version=1.0'
      

      then all configured properties are set correctly on the bundle.

              johnpoth John Poth
              rhn-support-tmielke Torsten Mielke
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Created:
                Updated:
                Resolved: