You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@karaf.apache.org by "Grzegorz Grzybek (JIRA)" <ji...@apache.org> on 2019/03/19 09:24:00 UTC

[jira] [Created] (KARAF-6200) Bundle processor integrated with features processor

Grzegorz Grzybek created KARAF-6200:
---------------------------------------

             Summary: Bundle processor integrated with features processor
                 Key: KARAF-6200
                 URL: https://issues.apache.org/jira/browse/KARAF-6200
             Project: Karaf
          Issue Type: Proposal
            Reporter: Grzegorz Grzybek
            Assignee: Grzegorz Grzybek
             Fix For: 4.3.0


As described [in dev@karaf.apache.org list|http://karaf.922171.n3.nabble.com/Idea-how-to-override-bundle-headers-without-wrap-tp4055414.html] I'd like to think about mechanism similar to one implemented with KARAF-5376, but concerning bundles themselves.

When features service checks (to resolve) and installs a bundle, it could _transform_ it according to some rules.

Currently I have idea about fixing Manifest headers, in order for example to widen {{javax.servlet}} API import range. That's common case with every major JavaEE/ServletAPI release that it breaks current applications even if it's fully compatible.

Without pasting everything I posted to mailing list, here's example configuration within {{etc/org.apache.karaf.features.xml}}:
{code:xml}
<bundleProcessing>
    <bundle location="mvn:org.eclipse.jetty*/*">
        <add header="Processed-By" value="Karaf Bundle Processor" />
        <clause header="Import-Package" name="javax.servlet"
value='javax.servlet;version="[3.1.0,5)"' />
        <clause header="Import-Package" name="javax.servlet.annotation"
value='javax.servlet.annotation;version="[3.1.0,5)"' />
        <clause header="Import-Package" name="javax.servlet.descriptor"
value='javax.servlet.descriptor;version="[3.1.0,5)"' />
        <clause header="Import-Package" name="javax.servlet.http"
value='javax.servlet.http;version="[3.1.0,5)"' />
    </bundle>
</bundleProcessing> 
{code}

Processed bundles go (by default) to {{$&#123;karaf.data&#125;/repository-bpr}} and then are resolved using _default repositories_ feature of pax-url-aether.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)