Exactly, the resolver considers it's the same bundle ;) Regards JB
On 01/29/2018 08:49 PM, Seth Leger wrote: > Hi Jean-Baptiste, > > The bundles are basically the same: they do have the same version, > SymbolicName, etc. That might be the problem... maybe I need to make the > SymbolicName unique. > > What I'm basically trying to do is make a conditional where: > > <feature ...> > <conditional> > <condition>aries-blueprint</condition> > <bundle>mvn:hello/world/1.0</bundle> > </conditional> > <conditional> > <condition>gemini-blueprint</condition> > <bundle>mvn:hello/world/1.0/jar/gemini</bundle> > </conditional> > </feature> > > and either aries-blueprint or gemini-blueprint is installed in the > container. The bundle with the 'gemini' classifier has a couple of extra > Spring files to allow it to run under gemini-blueprint. > > However, this is not working because if aries-blueprint is not installed > (making its condition false), the feature resolver seems to prevent > mvn:hello/world/1.0/*/* from being installed so > mvn:hello/world/1.0/jar/gemini isn't installed. > > Let me try updating the SymbolicName and see if that fixes it. In other > words, I'll try: > > mvn:hello/world/1.0 -> hello.world > mvn:hello/world/1.0/jar/gemini -> hello.world.gemini > > Seth Leger > The OpenNMS Group > > > On 1/29/18 2:27 PM, Jean-Baptiste Onofré wrote: >> By the way, the bundles are different (in term of name, export, etc) ? >> >> On 01/29/2018 08:15 PM, Seth Leger wrote: >>> On 1/29/18 12:49 PM, Jean-Baptiste Onofré wrote: >>>> If you try to install the bundle by hand using: >>>> >>>> bundle:install -s mvn:hello/world/1.0/jar/special >>>> >>>> does it work ? >>> >>> Yes. And if I put the bundle in the feature like this (without the other >>> artifact with the same groupId/artifactId/version): >>> >>> <feature name="hello" version="1.0"> >>> <bundle>mvn:hello/world/1.0/jar/special</bundle> >>> </feature> >>> >>> that works as expected as well. >>> >>>> I'm surprised as we use such kind of URL in features, like in Camel for >>>> instance. >>> >>> I don't see any other features in Karaf's standard features, Karaf's >>> Spring features, or Camel's features that have two bundles with >>> identical groupId/artifactId/version inside the same feature. The >>> closest is the 'camel-kubernetes' which has several bundles with >>> classifiers but they all have unique artifactIds: >>> >>> https://github.com/apache/camel/blob/camel-2.20.2/platforms/karaf/features/src/main/resources/features.xml#L1306 >>> >>> That's why I think it's a feature resolver issue and not an Aether issue. >>> >>> Seth Leger >>> The OpenNMS Group >>> >> > -- Jean-Baptiste Onofré [email protected] http://blog.nanthrax.net Talend - http://www.talend.com
