>>>>> Ryan Moquin <fragility...@gmail.com>:

> Hi Steinar,
> There are a couple ways.

> 1. You can use <scope>runtime</scope> to prevent a jar from being added,
> but that has other ramifications when building (such as I think unit test
> code won't see the dependency)
> 2. You can use <scope>provided</scope> to only include that dependency but
> not of it's transitive dependencies in the feature.xml

Yup, but I didn't want to touch their dependencies if I could avoid it.

> 3. The karaf maven plugin has an option to excludeArtifactId (look in the
> docs of the karaf site)

Right.  Something like this is what I looking for, but unable to find
(it was late at night and my googling skills may not have been at the
top of their game...:-) )

> 4. If you really have to, you can blacklist a bundle using the karaf maven
> plugin, but that would be a last resort IMHO.

Hm... this sounds like the kind of thing that made OSGi messy before I
discovered karaf and features in 2016.  So I agree.

> I would use one of the first 2 options primarily.  Also, you can use the
> maven exclude to prevent certain transitives from being added to the
> feature xml.

I run with
   <includeTransitiveDependency>false</includeTransitiveDependency>
by default.

Thanks for your help so far! :-)

Reply via email to