Hi Philipp,

It's because pax-web is defined in Karaf standard feature.

So, the workaround is to duplicate the Karaf standard feature (using your own classifier for instance). Here you change the pax-web feature version, and so, it will use only this one.

However, you should avoid to upgrade to major pax-web version in Karaf: Karaf and pax-web releases are aligned, so I'm pretty sure you will have some side effects (in some service and shell commands).

Regards
JB

On 11/11/2015 04:31 PM, Philipp Marx wrote:
Hi,

I am assembling a custom distribution with karaf 3.0.5. I want to use
pax-web 4.2 though instead of 3.2. So I added the corresponding
dependency (scope runtime) to my pom.xml and the features as
<bootFeatures> (I am using the karaf-maven-plugin).

This does indeed work as expected and I can use pax-web 4 in my
installation. Though I always have pax 3.2 bundles installed in the
system-directory as well. I know that it isn't actually a problem
because they are not started but I need them to be absent!

As far as I can tell this is due to the default repositories included
in org.apache.karaf.features.cfg. The karaf-maven-plugin will download
and extract the karaf 3.0.5 kar and use the
included org.apache.karaf.features.cfg as blueprint and already include
all the repositories [1] and features [2] listed there.

Is there a proper way to have a somewhat "clean" version of
the org.apache.karaf.features.cfg? I have looked through the
documentation and sources but didn't figure out a way of doing that
(besides maybe use my own base kar instead of the original one).
Wouldn't it be more properly anyway to only include the repository for
karaf-standard in the kar and add the others only for the zip?

Thanks,
Philipp

[1]: 
featuresRepositories=mvn:org.apache.karaf.features/standard/3.0.5/xml/features,mvn:org.apache.karaf.features/enterprise/3.0.5/xml/features,mvn:org.ops4j.pax.web/pax-web-features/3.2.6/xml/features,mvn:org.apache.karaf.features/spring/3.0.5/xml/features

[2]: featuresBoot=config,standard,region,package,kar,ssh,management

--
Jean-Baptiste Onofré
[email protected]
http://blog.nanthrax.net
Talend - http://www.talend.com

Reply via email to