karaf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Grzegorz Grzybek (JIRA)" <j...@apache.org>
Subject [jira] [Created] (KARAF-6200) Bundle processor integrated with features processor
Date Tue, 19 Mar 2019 09:24:00 GMT
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}}:
    <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)"' />

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

View raw message