You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@karaf.apache.org by Benson Margulies <be...@basistech.com> on 2016/08/05 12:03:58 UTC
transitive dependencies of feature descriptors
Folks, I wonder if someone else has found a way out of this.
Consider a project that builds an OSGi bundle by aggregating some non-OSGi
jar Maven dependencies. Those dependencies are in the dependency tree of
the resulting bundle.
Now, consider what happens if you generate a feature to contain that
bundle. You can carefully exclude artifactIds to ensure that these embedded
jars do not show up in the feature.xml as 'wrap' bundles.
However, there are still in the dependency graph of the feature itself.
So, when you write a dependency _on the feature_ to incorporate that
feature in a larger system, now the non-OSGi bundles are back in the
picture. You then have to write Maven <exclusions> for them all over again.
If I wrote a patch to the karaf-maven-plugin to exclude non-feature
dependencies of features, would some committer commit it?
Re: transitive dependencies of feature descriptors
Posted by Daniel McGreal <d....@gmail.com>.
I also tend just to let Karaf’s wrap deployer sort out the non-OSGi ones. Works 95% of the time for me. Where the 5% is mostly split packages or where somehow the bundle creator thought it would be a good idea to have an inexplicit dependency, grrrh.
Dan.
> On 5 Aug 2016, at 13:51, Benson Margulies <be...@basistech.com> wrote:
>
>
>
> On Fri, Aug 5, 2016 at 8:41 AM, Daniel McGreal <d.j.mcgreal@gmail.com <ma...@gmail.com>> wrote:
> Hi,
> I tend to prefer setting scope of the dependencies to ‘provided’, either in the 'aggregator’ or by using dependencyManagement in features. This means you can stack the features files without having to re-exclude the transitives you’re not interested in.
> Best, Dan.
>
> I'm experimenting with this. it can get a little messy when someone else has done a bad job on the same task.
>
> If some OSGi bundle has a mixture of OSGi and non-OSGi dependencies (and I've seen this in servicemix), and I mark it provided, I have to then redeclare the OSGi dependences at scope compile. It may be the least messy solution.
>
> thanks.
>
>
>
>
>> On 5 Aug 2016, at 13:33, Benson Margulies <benson@basistech.com <ma...@basistech.com>> wrote:
>>
>>
>>
>> On Fri, Aug 5, 2016 at 8:32 AM, Jean-Baptiste Onofré <jb@nanthrax.net <ma...@nanthrax.net>> wrote:
>> You mean that you use the karaf-maven-plugin to generate the features.xml ?
>>
>> JB,
>>
>> Yes, I always use the plugin.
>> Regards, benson
>>
>>
>>
>> Regards
>> JB
>>
>> On 08/05/2016 02:28 PM, Benson Margulies wrote:
>> JB,
>>
>> The jar files incorporated in the uber jar show up in the dependency
>> graph and thus reappear in as 'wrap:' bundles in features.
>>
>> If project X declares a dependency on feature F, then the dependencies
>> of feature F are considered as bundles in project X's feature, because
>> they are part of project X's overall dependency graph. the
>> karaf-maven-plugin does not filter them out, even though F is accounted
>> for as an aggregated feature.
>>
>> Regards,
>> benson
>>
>>
>> On Fri, Aug 5, 2016 at 8:09 AM, Jean-Baptiste Onofré <jb@nanthrax.net <ma...@nanthrax.net>
>> <mailto:jb@nanthrax.net <ma...@nanthrax.net>>> wrote:
>>
>> Hi Benson,
>>
>> honestly, I don't understand your point ;)
>>
>> You have an "uber" bundle containing packages, and this bundle is in
>> a feature.
>>
>> This feature can be used as an inner feature.
>>
>> So what's the point ?
>>
>> Regards
>> JB
>>
>>
>> On 08/05/2016 02:03 PM, Benson Margulies wrote:
>>
>> Folks, I wonder if someone else has found a way out of this.
>>
>> Consider a project that builds an OSGi bundle by aggregating some
>> non-OSGi jar Maven dependencies. Those dependencies are in the
>> dependency tree of the resulting bundle.
>>
>> Now, consider what happens if you generate a feature to contain that
>> bundle. You can carefully exclude artifactIds to ensure that these
>> embedded jars do not show up in the feature.xml as 'wrap' bundles.
>>
>> However, there are still in the dependency graph of the feature
>> itself.
>>
>> So, when you write a dependency _on the feature_ to incorporate that
>> feature in a larger system, now the non-OSGi bundles are back in the
>> picture. You then have to write Maven <exclusions> for them all
>> over again.
>>
>> If I wrote a patch to the karaf-maven-plugin to exclude non-feature
>> dependencies of features, would some committer commit it?
>>
>>
>> --
>> Jean-Baptiste Onofré
>> jbonofre@apache.org <ma...@apache.org> <mailto:jbonofre@apache.org <ma...@apache.org>>
>> http://blog.nanthrax.net <http://blog.nanthrax.net/>
>> Talend - http://www.talend.com <http://www.talend.com/>
>>
>>
>>
>> --
>> Jean-Baptiste Onofré
>> jbonofre@apache.org <ma...@apache.org>
>> http://blog.nanthrax.net <http://blog.nanthrax.net/>
>> Talend - http://www.talend.com <http://www.talend.com/>
>>
>
>
Re: transitive dependencies of feature descriptors
Posted by Benson Margulies <be...@basistech.com>.
On Fri, Aug 5, 2016 at 8:41 AM, Daniel McGreal <d....@gmail.com>
wrote:
> Hi,
> I tend to prefer setting scope of the dependencies to ‘provided’, either
> in the 'aggregator’ or by using dependencyManagement in features. This
> means you can stack the features files without having to re-exclude the
> transitives you’re not interested in.
> Best, Dan.
>
I'm experimenting with this. it can get a little messy when someone else
has done a bad job on the same task.
If some OSGi bundle has a mixture of OSGi and non-OSGi dependencies (and
I've seen this in servicemix), and I mark it provided, I have to then
redeclare the OSGi dependences at scope compile. It may be the least messy
solution.
thanks.
>
> On 5 Aug 2016, at 13:33, Benson Margulies <be...@basistech.com> wrote:
>
>
>
> On Fri, Aug 5, 2016 at 8:32 AM, Jean-Baptiste Onofré <jb...@nanthrax.net>
> wrote:
>
>> You mean that you use the karaf-maven-plugin to generate the features.xml
>> ?
>>
>
> JB,
>
> Yes, I always use the plugin.
> Regards, benson
>
>
>
>>
>> Regards
>> JB
>>
>> On 08/05/2016 02:28 PM, Benson Margulies wrote:
>>
>>> JB,
>>>
>>> The jar files incorporated in the uber jar show up in the dependency
>>> graph and thus reappear in as 'wrap:' bundles in features.
>>>
>>> If project X declares a dependency on feature F, then the dependencies
>>> of feature F are considered as bundles in project X's feature, because
>>> they are part of project X's overall dependency graph. the
>>> karaf-maven-plugin does not filter them out, even though F is accounted
>>> for as an aggregated feature.
>>>
>>> Regards,
>>> benson
>>>
>>>
>>> On Fri, Aug 5, 2016 at 8:09 AM, Jean-Baptiste Onofré <jb@nanthrax.net
>>> <ma...@nanthrax.net>> wrote:
>>>
>>> Hi Benson,
>>>
>>> honestly, I don't understand your point ;)
>>>
>>> You have an "uber" bundle containing packages, and this bundle is in
>>> a feature.
>>>
>>> This feature can be used as an inner feature.
>>>
>>> So what's the point ?
>>>
>>> Regards
>>> JB
>>>
>>>
>>> On 08/05/2016 02:03 PM, Benson Margulies wrote:
>>>
>>> Folks, I wonder if someone else has found a way out of this.
>>>
>>> Consider a project that builds an OSGi bundle by aggregating some
>>> non-OSGi jar Maven dependencies. Those dependencies are in the
>>> dependency tree of the resulting bundle.
>>>
>>> Now, consider what happens if you generate a feature to contain
>>> that
>>> bundle. You can carefully exclude artifactIds to ensure that
>>> these
>>> embedded jars do not show up in the feature.xml as 'wrap'
>>> bundles.
>>>
>>> However, there are still in the dependency graph of the feature
>>> itself.
>>>
>>> So, when you write a dependency _on the feature_ to incorporate
>>> that
>>> feature in a larger system, now the non-OSGi bundles are back in
>>> the
>>> picture. You then have to write Maven <exclusions> for them all
>>> over again.
>>>
>>> If I wrote a patch to the karaf-maven-plugin to exclude
>>> non-feature
>>> dependencies of features, would some committer commit it?
>>>
>>>
>>> --
>>> Jean-Baptiste Onofré
>>> jbonofre@apache.org <ma...@apache.org>
>>> http://blog.nanthrax.net
>>> Talend - http://www.talend.com
>>>
>>>
>>>
>> --
>> Jean-Baptiste Onofré
>> jbonofre@apache.org
>> http://blog.nanthrax.net
>> Talend - http://www.talend.com
>>
>
>
>
Re: transitive dependencies of feature descriptors
Posted by Daniel McGreal <d....@gmail.com>.
Hi,
I tend to prefer setting scope of the dependencies to ‘provided’, either in the 'aggregator’ or by using dependencyManagement in features. This means you can stack the features files without having to re-exclude the transitives you’re not interested in.
Best, Dan.
> On 5 Aug 2016, at 13:33, Benson Margulies <be...@basistech.com> wrote:
>
>
>
> On Fri, Aug 5, 2016 at 8:32 AM, Jean-Baptiste Onofré <jb@nanthrax.net <ma...@nanthrax.net>> wrote:
> You mean that you use the karaf-maven-plugin to generate the features.xml ?
>
> JB,
>
> Yes, I always use the plugin.
> Regards, benson
>
>
>
> Regards
> JB
>
> On 08/05/2016 02:28 PM, Benson Margulies wrote:
> JB,
>
> The jar files incorporated in the uber jar show up in the dependency
> graph and thus reappear in as 'wrap:' bundles in features.
>
> If project X declares a dependency on feature F, then the dependencies
> of feature F are considered as bundles in project X's feature, because
> they are part of project X's overall dependency graph. the
> karaf-maven-plugin does not filter them out, even though F is accounted
> for as an aggregated feature.
>
> Regards,
> benson
>
>
> On Fri, Aug 5, 2016 at 8:09 AM, Jean-Baptiste Onofré <jb@nanthrax.net <ma...@nanthrax.net>
> <mailto:jb@nanthrax.net <ma...@nanthrax.net>>> wrote:
>
> Hi Benson,
>
> honestly, I don't understand your point ;)
>
> You have an "uber" bundle containing packages, and this bundle is in
> a feature.
>
> This feature can be used as an inner feature.
>
> So what's the point ?
>
> Regards
> JB
>
>
> On 08/05/2016 02:03 PM, Benson Margulies wrote:
>
> Folks, I wonder if someone else has found a way out of this.
>
> Consider a project that builds an OSGi bundle by aggregating some
> non-OSGi jar Maven dependencies. Those dependencies are in the
> dependency tree of the resulting bundle.
>
> Now, consider what happens if you generate a feature to contain that
> bundle. You can carefully exclude artifactIds to ensure that these
> embedded jars do not show up in the feature.xml as 'wrap' bundles.
>
> However, there are still in the dependency graph of the feature
> itself.
>
> So, when you write a dependency _on the feature_ to incorporate that
> feature in a larger system, now the non-OSGi bundles are back in the
> picture. You then have to write Maven <exclusions> for them all
> over again.
>
> If I wrote a patch to the karaf-maven-plugin to exclude non-feature
> dependencies of features, would some committer commit it?
>
>
> --
> Jean-Baptiste Onofré
> jbonofre@apache.org <ma...@apache.org> <mailto:jbonofre@apache.org <ma...@apache.org>>
> http://blog.nanthrax.net <http://blog.nanthrax.net/>
> Talend - http://www.talend.com <http://www.talend.com/>
>
>
>
> --
> Jean-Baptiste Onofré
> jbonofre@apache.org <ma...@apache.org>
> http://blog.nanthrax.net <http://blog.nanthrax.net/>
> Talend - http://www.talend.com <http://www.talend.com/>
>
Re: transitive dependencies of feature descriptors
Posted by Benson Margulies <be...@basistech.com>.
I want to use make the _non_-OSGi dependences 'provided', so that I can use
<ignoreScopeProvided>true</ignoreScopeProvided> to the plugin to avoid
having them show up again as wrap:. So I have to keep the OSGi dependencies
as 'compile'. Then, when Guice or Servicemix or Antlr has a non-OSGi
dependency, I am now re-declaring it at top-level as provided, to keep it
out of the mixture. The pom is quite lengthy.
Then I have one last oddity: think of the above as project 'A'. Then, when
project 'B' declares a dependency on the feature descriptor of project 'A',
and aggregates its feature, the OSGi dependencies of B wind up in the
feature.xml twice: once in A and once in B. THis is harmless but annoying.
On Fri, Aug 5, 2016 at 8:58 AM, Jean-Baptiste Onofré <jb...@nanthrax.net>
wrote:
> OK I understand better now. What about changing the scope of the bundle
> dependency ?
>
> Regards
> JB
> On Fri, Aug 05, 2016 at 2:34 PM, Benson Margulies <be...@basistech.com>
> wrote:
>
>
>
> On Fri, Aug 5, 2016 at 8:32 AM, Jean-Baptiste Onofré <jb...@nanthrax.net>
> wrote:
>
>> You mean that you use the karaf-maven-plugin to generate the features.xml
>> ?
>>
>
> JB,
>
> Yes, I always use the plugin.
> Regards, benson
>
>
>> Regards
>> JB
>>
>> On 08/05/2016 02:28 PM, Benson Margulies wrote:
>>
>>> JB,
>>>
>>> The jar files incorporated in the uber jar show up in the dependency
>>> graph and thus reappear in as 'wrap:' bundles in features.
>>>
>>> If project X declares a dependency on feature F, then the dependencies
>>> of feature F are considered as bundles in project X's feature, because
>>> they are part of project X's overall dependency graph. the
>>> karaf-maven-plugin does not filter them out, even though F is accounted
>>> for as an aggregated feature.
>>>
>>> Regards,
>>> benson
>>>
>>>
>>> On Fri, Aug 5, 2016 at 8:09 AM, Jean-Baptiste Onofré <jb@nanthrax.net
>>> <ma...@nanthrax.net>> wrote:
>>>
>>> Hi Benson,
>>>
>>> honestly, I don't understand your point ;)
>>>
>>> You have an "uber" bundle containing packages, and this bundle is in
>>> a feature.
>>>
>>> This feature can be used as an inner feature.
>>>
>>> So what's the point ?
>>>
>>> Regards
>>> JB
>>>
>>>
>>> On 08/05/2016 02:03 PM, Benson Margulies wrote:
>>>
>>> Folks, I wonder if someone else has found a way out of this.
>>>
>>> Consider a project that builds an OSGi bundle by aggregating some
>>> non-OSGi jar Maven dependencies. Those dependencies are in the
>>> dependency tree of the resulting bundle.
>>>
>>> Now, consider what happens if you generate a feature to contain that
>>> bundle. You can carefully exclude artifactIds to ensure that these
>>> embedded jars do not show up in the feature.xml as 'wrap' bundles.
>>>
>>> However, there are still in the dependency graph of the feature
>>> itself.
>>>
>>> So, when you write a dependency _on the feature_ to incorporate that
>>> feature in a larger system, now the non-OSGi bundles are back in the
>>> picture. You then have to write Maven <exclusions> for them all
>>> over again.
>>>
>>> If I wrote a patch to the karaf-maven-plugin to exclude non-feature
>>> dependencies of features, would some committer commit it?
>>>
>>>
>>> --
>>> Jean-Baptiste Onofré
>>> jbonofre@apache.org <ma...@apache.org>
>>> http://blog.nanthrax.net
>>> Talend - http://www.talend.com
>>>
>>>
>>>
>> --
>> Jean-Baptiste Onofré
>> jbonofre@apache.org
>> http://blog.nanthrax.net
>> Talend - http://www.talend.com
>>
>
>
Re: transitive dependencies of feature descriptors
Posted by Jean-Baptiste Onofré <jb...@nanthrax.net>.
OK I understand better now. What about changing the scope of the bundle dependency ?
Regards
JB
On Fri, Aug 05, 2016 at 2:34 PM, Benson Margulies < benson@basistech.com [benson@basistech.com] > wrote:
On Fri, Aug 5, 2016 at 8:32 AM, Jean-Baptiste Onofré < jb@nanthrax.net [jb@nanthrax.net] > wrote:
You mean that you use the karaf-maven-plugin to generate the features.xml ?
JB,
Yes, I always use the plugin. Regards, benson
Regards
JB
On 08/05/2016 02:28 PM, Benson Margulies wrote:
JB,
The jar files incorporated in the uber jar show up in the dependency
graph and thus reappear in as 'wrap:' bundles in features.
If project X declares a dependency on feature F, then the dependencies
of feature F are considered as bundles in project X's feature, because
they are part of project X's overall dependency graph. the
karaf-maven-plugin does not filter them out, even though F is accounted
for as an aggregated feature.
Regards,
benson
On Fri, Aug 5, 2016 at 8:09 AM, Jean-Baptiste Onofré < jb@nanthrax.net [jb@nanthrax.net]
<mailto: jb@nanthrax.net [jb@nanthrax.net] >> wrote:
Hi Benson,
honestly, I don't understand your point ;)
You have an "uber" bundle containing packages, and this bundle is in
a feature.
This feature can be used as an inner feature.
So what's the point ?
Regards
JB
On 08/05/2016 02:03 PM, Benson Margulies wrote:
Folks, I wonder if someone else has found a way out of this.
Consider a project that builds an OSGi bundle by aggregating some
non-OSGi jar Maven dependencies. Those dependencies are in the
dependency tree of the resulting bundle.
Now, consider what happens if you generate a feature to contain that
bundle. You can carefully exclude artifactIds to ensure that these
embedded jars do not show up in the feature.xml as 'wrap' bundles.
However, there are still in the dependency graph of the feature
itself.
So, when you write a dependency _on the feature_ to incorporate that
feature in a larger system, now the non-OSGi bundles are back in the
picture. You then have to write Maven <exclusions> for them all
over again.
If I wrote a patch to the karaf-maven-plugin to exclude non-feature
dependencies of features, would some committer commit it?
--
Jean-Baptiste Onofré
jbonofre@apache.org [jbonofre@apache.org] <mailto: jbonofre@apache.org [jbonofre@apache.org] >
http://blog.nanthrax.net [http://blog.nanthrax.net]
Talend - http://www.talend.com [http://www.talend.com]
--
Jean-Baptiste Onofré
jbonofre@apache.org [jbonofre@apache.org]
http://blog.nanthrax.net [http://blog.nanthrax.net]
Talend - http://www.talend.com [http://www.talend.com]
Re: transitive dependencies of feature descriptors
Posted by Benson Margulies <be...@basistech.com>.
On Fri, Aug 5, 2016 at 8:32 AM, Jean-Baptiste Onofré <jb...@nanthrax.net>
wrote:
> You mean that you use the karaf-maven-plugin to generate the features.xml ?
>
JB,
Yes, I always use the plugin.
Regards, benson
>
> Regards
> JB
>
> On 08/05/2016 02:28 PM, Benson Margulies wrote:
>
>> JB,
>>
>> The jar files incorporated in the uber jar show up in the dependency
>> graph and thus reappear in as 'wrap:' bundles in features.
>>
>> If project X declares a dependency on feature F, then the dependencies
>> of feature F are considered as bundles in project X's feature, because
>> they are part of project X's overall dependency graph. the
>> karaf-maven-plugin does not filter them out, even though F is accounted
>> for as an aggregated feature.
>>
>> Regards,
>> benson
>>
>>
>> On Fri, Aug 5, 2016 at 8:09 AM, Jean-Baptiste Onofré <jb@nanthrax.net
>> <ma...@nanthrax.net>> wrote:
>>
>> Hi Benson,
>>
>> honestly, I don't understand your point ;)
>>
>> You have an "uber" bundle containing packages, and this bundle is in
>> a feature.
>>
>> This feature can be used as an inner feature.
>>
>> So what's the point ?
>>
>> Regards
>> JB
>>
>>
>> On 08/05/2016 02:03 PM, Benson Margulies wrote:
>>
>> Folks, I wonder if someone else has found a way out of this.
>>
>> Consider a project that builds an OSGi bundle by aggregating some
>> non-OSGi jar Maven dependencies. Those dependencies are in the
>> dependency tree of the resulting bundle.
>>
>> Now, consider what happens if you generate a feature to contain
>> that
>> bundle. You can carefully exclude artifactIds to ensure that these
>> embedded jars do not show up in the feature.xml as 'wrap' bundles.
>>
>> However, there are still in the dependency graph of the feature
>> itself.
>>
>> So, when you write a dependency _on the feature_ to incorporate
>> that
>> feature in a larger system, now the non-OSGi bundles are back in
>> the
>> picture. You then have to write Maven <exclusions> for them all
>> over again.
>>
>> If I wrote a patch to the karaf-maven-plugin to exclude
>> non-feature
>> dependencies of features, would some committer commit it?
>>
>>
>> --
>> Jean-Baptiste Onofré
>> jbonofre@apache.org <ma...@apache.org>
>> http://blog.nanthrax.net
>> Talend - http://www.talend.com
>>
>>
>>
> --
> Jean-Baptiste Onofré
> jbonofre@apache.org
> http://blog.nanthrax.net
> Talend - http://www.talend.com
>
Re: transitive dependencies of feature descriptors
Posted by Jean-Baptiste Onofré <jb...@nanthrax.net>.
You mean that you use the karaf-maven-plugin to generate the features.xml ?
Regards
JB
On 08/05/2016 02:28 PM, Benson Margulies wrote:
> JB,
>
> The jar files incorporated in the uber jar show up in the dependency
> graph and thus reappear in as 'wrap:' bundles in features.
>
> If project X declares a dependency on feature F, then the dependencies
> of feature F are considered as bundles in project X's feature, because
> they are part of project X's overall dependency graph. the
> karaf-maven-plugin does not filter them out, even though F is accounted
> for as an aggregated feature.
>
> Regards,
> benson
>
>
> On Fri, Aug 5, 2016 at 8:09 AM, Jean-Baptiste Onofr� <jb@nanthrax.net
> <ma...@nanthrax.net>> wrote:
>
> Hi Benson,
>
> honestly, I don't understand your point ;)
>
> You have an "uber" bundle containing packages, and this bundle is in
> a feature.
>
> This feature can be used as an inner feature.
>
> So what's the point ?
>
> Regards
> JB
>
>
> On 08/05/2016 02:03 PM, Benson Margulies wrote:
>
> Folks, I wonder if someone else has found a way out of this.
>
> Consider a project that builds an OSGi bundle by aggregating some
> non-OSGi jar Maven dependencies. Those dependencies are in the
> dependency tree of the resulting bundle.
>
> Now, consider what happens if you generate a feature to contain that
> bundle. You can carefully exclude artifactIds to ensure that these
> embedded jars do not show up in the feature.xml as 'wrap' bundles.
>
> However, there are still in the dependency graph of the feature
> itself.
>
> So, when you write a dependency _on the feature_ to incorporate that
> feature in a larger system, now the non-OSGi bundles are back in the
> picture. You then have to write Maven <exclusions> for them all
> over again.
>
> If I wrote a patch to the karaf-maven-plugin to exclude non-feature
> dependencies of features, would some committer commit it?
>
>
> --
> Jean-Baptiste Onofr�
> jbonofre@apache.org <ma...@apache.org>
> http://blog.nanthrax.net
> Talend - http://www.talend.com
>
>
--
Jean-Baptiste Onofr�
jbonofre@apache.org
http://blog.nanthrax.net
Talend - http://www.talend.com
Re: transitive dependencies of feature descriptors
Posted by Benson Margulies <be...@basistech.com>.
JB,
The jar files incorporated in the uber jar show up in the dependency graph
and thus reappear in as 'wrap:' bundles in features.
If project X declares a dependency on feature F, then the dependencies of
feature F are considered as bundles in project X's feature, because they
are part of project X's overall dependency graph. the karaf-maven-plugin
does not filter them out, even though F is accounted for as an aggregated
feature.
Regards,
benson
On Fri, Aug 5, 2016 at 8:09 AM, Jean-Baptiste Onofré <jb...@nanthrax.net>
wrote:
> Hi Benson,
>
> honestly, I don't understand your point ;)
>
> You have an "uber" bundle containing packages, and this bundle is in a
> feature.
>
> This feature can be used as an inner feature.
>
> So what's the point ?
>
> Regards
> JB
>
>
> On 08/05/2016 02:03 PM, Benson Margulies wrote:
>
>> Folks, I wonder if someone else has found a way out of this.
>>
>> Consider a project that builds an OSGi bundle by aggregating some
>> non-OSGi jar Maven dependencies. Those dependencies are in the
>> dependency tree of the resulting bundle.
>>
>> Now, consider what happens if you generate a feature to contain that
>> bundle. You can carefully exclude artifactIds to ensure that these
>> embedded jars do not show up in the feature.xml as 'wrap' bundles.
>>
>> However, there are still in the dependency graph of the feature itself.
>>
>> So, when you write a dependency _on the feature_ to incorporate that
>> feature in a larger system, now the non-OSGi bundles are back in the
>> picture. You then have to write Maven <exclusions> for them all over
>> again.
>>
>> If I wrote a patch to the karaf-maven-plugin to exclude non-feature
>> dependencies of features, would some committer commit it?
>>
>>
> --
> Jean-Baptiste Onofré
> jbonofre@apache.org
> http://blog.nanthrax.net
> Talend - http://www.talend.com
>
Re: transitive dependencies of feature descriptors
Posted by Jean-Baptiste Onofré <jb...@nanthrax.net>.
Hi Benson,
honestly, I don't understand your point ;)
You have an "uber" bundle containing packages, and this bundle is in a
feature.
This feature can be used as an inner feature.
So what's the point ?
Regards
JB
On 08/05/2016 02:03 PM, Benson Margulies wrote:
> Folks, I wonder if someone else has found a way out of this.
>
> Consider a project that builds an OSGi bundle by aggregating some
> non-OSGi jar Maven dependencies. Those dependencies are in the
> dependency tree of the resulting bundle.
>
> Now, consider what happens if you generate a feature to contain that
> bundle. You can carefully exclude artifactIds to ensure that these
> embedded jars do not show up in the feature.xml as 'wrap' bundles.
>
> However, there are still in the dependency graph of the feature itself.
>
> So, when you write a dependency _on the feature_ to incorporate that
> feature in a larger system, now the non-OSGi bundles are back in the
> picture. You then have to write Maven <exclusions> for them all over again.
>
> If I wrote a patch to the karaf-maven-plugin to exclude non-feature
> dependencies of features, would some committer commit it?
>
--
Jean-Baptiste Onofr�
jbonofre@apache.org
http://blog.nanthrax.net
Talend - http://www.talend.com