Issues with resolving a feature file using a version range [Karaf 4.1.2]

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Issues with resolving a feature file using a version range [Karaf 4.1.2]

nicolas.brasey
Hi all,

I'm using a feature file which uses another feature repository which is addressed using the range version, for instance:

<repository>mvn:com,xxx.yyy/webapp-features/[1.0.0,2.0.0)/xml/features</repository>


I'm building my own karaf distribution and I see that the feature file is properly existing into the system repository:

./system/com/xxx/yyy/webapp-features/1.11.0-SNAPSHOT/webapp-features-1.11.0-SNAPSHOT-features.xml




When starting karaf, the resolver does not seem to be able to resolve the range. I have the following error:

2017-09-08T17:27:07,818 | DEBUG | pool-1-thread-2  | AetherBasedResolver              | 4 - org.ops4j.pax.url.mvn - 2.5.2 | Repository marked with @multi does not resolve to a directory: /home/nbr/setups/dms/dms-1.11.0-SNAPSHOT/server/data/kar
2017-09-08T17:27:07,820 | DEBUG | pool-1-thread-2  | DefaultLocalRepositoryProvider   | 4 - org.ops4j.pax.url.mvn - 2.5.2 | Using manager PaxLocalRepositoryManager with priority 0.0 for /home/nbr/.m2/repository
2017-09-08T17:27:07,822 | WARN  | pool-1-thread-2  | FeaturesServiceImpl              | 9 - org.apache.karaf.features.core - 4.1.2 | Can't load features repository mvn:com.imtf.dms/dms-webapp-features/[1.0.0,2.0.0)/xml/features
java.io.IOException: Error resolving artifact com.xxx.dms:webapp-features:xml:features:[1.0.0,2.0.0) : mvn:com.xxx.dms/webapp-features/[1.0.0,2.0.0)/xml/features
at org.apache.karaf.features.internal.service.RepositoryImpl.load(RepositoryImpl.java:91) [9:org.apache.karaf.features.core:4.1.2]
at org.apache.karaf.features.internal.service.RepositoryImpl.load(RepositoryImpl.java:80) [9:org.apache.karaf.features.core:4.1.2]
at org.apache.karaf.features.internal.service.FeaturesServiceImpl.getFeatures(FeaturesServiceImpl.java:760) [9:org.apache.karaf.features.core:4.1.2]
at org.apache.karaf.features.internal.service.FeaturesServiceImpl.installFeatures(FeaturesServiceImpl.java:963) [9:org.apache.karaf.features.core:4.1.2]
at org.apache.karaf.features.internal.service.FeaturesServiceImpl.installFeatures(FeaturesServiceImpl.java:900) [9:org.apache.karaf.features.core:4.1.2]
at org.apache.karaf.features.internal.service.BootFeaturesInstaller.installBootFeatures(BootFeaturesInstaller.java:107) [9:org.apache.karaf.features.core:4.1.2]
at org.apache.karaf.features.internal.service.BootFeaturesInstaller.start(BootFeaturesInstaller.java:87) [9:org.apache.karaf.features.core:4.1.2]
at org.apache.karaf.features.internal.osgi.Activator.doStart(Activator.java:269) [9:org.apache.karaf.features.core:4.1.2]
at org.apache.karaf.util.tracker.BaseActivator.run(BaseActivator.java:242) [9:org.apache.karaf.features.core:4.1.2]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [?:?]
at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:?]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [?:?]


I've put pax url logger in DEBUG and saw that it tries to resolve it from my local mvn repository (which is emptry BTW)

I have the feeling that the ranges versions cannot be resolved from the internal system repository, is it possible ?

Thanks!
Nicolas