You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@karaf.apache.org by Romain Gilles <ro...@gmail.com> on 2012/05/29 16:07:29 UTC

Karaf should provide a maven BOM

Hi all,
I think it could be interesting to provide a bom as explained in maven
documentation:
http://maven.apache.org/guides/introduction/introduction-to-dependency-mechanism.html
I'm looking to use dependency management with import scope that point on
karaf and It will help me if you are providing a bom with only karaf
projects in the dependency management and in a separate pom all the third
parties.

I use to specify my maven configuration like this and it's works fine and
save me time.

Regards,

Romain.

Re: Karaf should provide a maven BOM

Posted by Andreas Pieber <an...@gmail.com>.
Hey,

On Tue, May 29, 2012 at 6:03 PM, Romain Gilles <ro...@gmail.com> wrote:
> In fact when you use the scope import it automatically substitute the
> current import statement by all the dependencyManagement block of the
> pointed dependency (here karaf).

This also works straight ahead if you use the type pom instead of bom.

> Therefore as in your super pom you mix child dependency definitions and
> your third party dependencies then it is more hard to me to specify my
> dependencies on third parties because I have to take care of yours as they
> are imported there is an ordering issue...
> So if you provide a bom I will get only your child projects in my
> dependency management and do my dependency management for my third parties
> without take care of karaf's third parties.

I'm almost sure that this should still work using the pom.

>
> The may issue raise when you try to import 2 project that (i.e. karaf and
> another one) that does not have the same dependencies... (I mee in term of
> versions).
>
> Do you see what I mean?

Not quite sure if I do :-) Nevertheless, feel free to provide a patch!
Please also provide examples using this new pom to make the advantages
clear to all of us. If there are any plain advantages I/we've missed
by now be assured that I'm the first one applying the patch :-)

Kind regards,
Andreas

>
> Romain.
>
> Le mardi 29 mai 2012, Andreas Pieber a écrit :
>
>> Well, basically we provide a "regular super pom" [1] which specifies
>> most of our parent projects. I'm not quite sure which will be the
>> advantage of using the type bom over pom?
>>
>> Kind regards,
>> Andreas
>>
>> [1] https://github.com/apache/karaf/blob/trunk/pom.xml
>>
>> On Tue, May 29, 2012 at 4:07 PM, Romain Gilles <romain.gilles@gmail.com<javascript:;>>
>> wrote:
>> > Hi all,
>> > I think it could be interesting to provide a bom as explained in maven
>> > documentation:
>> >
>> http://maven.apache.org/guides/introduction/introduction-to-dependency-mechanism.html
>> > I'm looking to use dependency management with import scope that point on
>> > karaf and It will help me if you are providing a bom with only karaf
>> > projects in the dependency management and in a separate pom all the third
>> > parties.
>> >
>> > I use to specify my maven configuration like this and it's works fine and
>> > save me time.
>> >
>> > Regards,
>> >
>> > Romain.
>>

Re: Karaf should provide a maven BOM

Posted by Romain Gilles <ro...@gmail.com>.
Ok,
I may need some help for Jira but I will let you know.

Romain.

Le mardi 29 mai 2012, Achim Nierbeck a écrit :

> Hi Romain,
>
> since I didn't see anything similar yet I'm quite interested in how
> this would benefit.
> So please go ahead and open an issue in jira and attach your patch.
>
> Thanx and regards, Achim
>
> 2012/5/29 Romain Gilles <romain.gilles@gmail.com <javascript:;>>:
> > If you want I can do it for you and send you a patch?
> >
> > Then you will tell me if you like or not :)
> >
> > Romain.
> >
> >
> > Le mardi 29 mai 2012, Romain Gilles a écrit :
> >
> >> In fact when you use the scope import it automatically substitute the
> >> current import statement by all the dependencyManagement block of the
> >> pointed dependency (here karaf).
> >> Therefore as in your super pom you mix child dependency definitions and
> >> your third party dependencies then it is more hard to me to specify my
> >> dependencies on third parties because I have to take care of yours as
> they
> >> are imported there is an ordering issue...
> >> So if you provide a bom I will get only your child projects in my
> >> dependency management and do my dependency management for my third
> parties
> >> without take care of karaf's third parties.
> >>
> >> The may issue raise when you try to import 2 project that (i.e. karaf
> and
> >> another one) that does not have the same dependencies... (I mee in term
> of
> >> versions).
> >>
> >> Do you see what I mean?
> >>
> >> Romain.
> >>
> >> Le mardi 29 mai 2012, Andreas Pieber a écrit :
> >>
> >>> Well, basically we provide a "regular super pom" [1] which specifies
> >>> most of our parent projects. I'm not quite sure which will be the
> >>> advantage of using the type bom over pom?
> >>>
> >>> Kind regards,
> >>> Andreas
> >>>
> >>> [1] https://github.com/apache/karaf/blob/trunk/pom.xml
> >>>
> >>> On Tue, May 29, 2012 at 4:07 PM, Romain Gilles <
> romain.gilles@gmail.com <javascript:;>>
> >>> wrote:
> >>> > Hi all,
> >>> > I think it could be interesting to provide a bom as explained in
> maven
> >>> > documentation:
> >>> >
> >>>
> http://maven.apache.org/guides/introduction/introduction-to-dependency-mechanism.html
> >>> > I'm looking to use dependency management with import scope that
> point on
> >>> > karaf and It will help me if you are providing a bom with only karaf
> >>> > projects in the dependency management and in a separate pom all the
> >>> third
> >>> > parties.
> >>> >
> >>> > I use to specify my maven configuration like this and it's works fine
> >>> and
> >>> > save me time.
> >>> >
> >>> > Regards,
> >>> >
> >>> > Romain.
> >>>
> >>
>
>
>
> --
>
> Apache Karaf <http://karaf.apache.org/> Committer & PMC
> OPS4J Pax Web <http://wiki.ops4j.org/display/paxweb/Pax+Web/>
> Committer & Project Lead
> OPS4J Pax for Vaadin
> <http://team.ops4j.org/wiki/display/PAXVAADIN/Home> Commiter & Project
> Lead
> blog <http://notizblog.nierbeck.de/>
>

Re: Karaf should provide a maven BOM

Posted by Achim Nierbeck <bc...@googlemail.com>.
Hi Romain,

since I didn't see anything similar yet I'm quite interested in how
this would benefit.
So please go ahead and open an issue in jira and attach your patch.

Thanx and regards, Achim

2012/5/29 Romain Gilles <ro...@gmail.com>:
> If you want I can do it for you and send you a patch?
>
> Then you will tell me if you like or not :)
>
> Romain.
>
>
> Le mardi 29 mai 2012, Romain Gilles a écrit :
>
>> In fact when you use the scope import it automatically substitute the
>> current import statement by all the dependencyManagement block of the
>> pointed dependency (here karaf).
>> Therefore as in your super pom you mix child dependency definitions and
>> your third party dependencies then it is more hard to me to specify my
>> dependencies on third parties because I have to take care of yours as they
>> are imported there is an ordering issue...
>> So if you provide a bom I will get only your child projects in my
>> dependency management and do my dependency management for my third parties
>> without take care of karaf's third parties.
>>
>> The may issue raise when you try to import 2 project that (i.e. karaf and
>> another one) that does not have the same dependencies... (I mee in term of
>> versions).
>>
>> Do you see what I mean?
>>
>> Romain.
>>
>> Le mardi 29 mai 2012, Andreas Pieber a écrit :
>>
>>> Well, basically we provide a "regular super pom" [1] which specifies
>>> most of our parent projects. I'm not quite sure which will be the
>>> advantage of using the type bom over pom?
>>>
>>> Kind regards,
>>> Andreas
>>>
>>> [1] https://github.com/apache/karaf/blob/trunk/pom.xml
>>>
>>> On Tue, May 29, 2012 at 4:07 PM, Romain Gilles <ro...@gmail.com>
>>> wrote:
>>> > Hi all,
>>> > I think it could be interesting to provide a bom as explained in maven
>>> > documentation:
>>> >
>>> http://maven.apache.org/guides/introduction/introduction-to-dependency-mechanism.html
>>> > I'm looking to use dependency management with import scope that point on
>>> > karaf and It will help me if you are providing a bom with only karaf
>>> > projects in the dependency management and in a separate pom all the
>>> third
>>> > parties.
>>> >
>>> > I use to specify my maven configuration like this and it's works fine
>>> and
>>> > save me time.
>>> >
>>> > Regards,
>>> >
>>> > Romain.
>>>
>>



-- 

Apache Karaf <http://karaf.apache.org/> Committer & PMC
OPS4J Pax Web <http://wiki.ops4j.org/display/paxweb/Pax+Web/>
Committer & Project Lead
OPS4J Pax for Vaadin
<http://team.ops4j.org/wiki/display/PAXVAADIN/Home> Commiter & Project
Lead
blog <http://notizblog.nierbeck.de/>

Re: Karaf should provide a maven BOM

Posted by Romain Gilles <ro...@gmail.com>.
If you want I can do it for you and send you a patch?

Then you will tell me if you like or not :)

Romain.


Le mardi 29 mai 2012, Romain Gilles a écrit :

> In fact when you use the scope import it automatically substitute the
> current import statement by all the dependencyManagement block of the
> pointed dependency (here karaf).
> Therefore as in your super pom you mix child dependency definitions and
> your third party dependencies then it is more hard to me to specify my
> dependencies on third parties because I have to take care of yours as they
> are imported there is an ordering issue...
> So if you provide a bom I will get only your child projects in my
> dependency management and do my dependency management for my third parties
> without take care of karaf's third parties.
>
> The may issue raise when you try to import 2 project that (i.e. karaf and
> another one) that does not have the same dependencies... (I mee in term of
> versions).
>
> Do you see what I mean?
>
> Romain.
>
> Le mardi 29 mai 2012, Andreas Pieber a écrit :
>
>> Well, basically we provide a "regular super pom" [1] which specifies
>> most of our parent projects. I'm not quite sure which will be the
>> advantage of using the type bom over pom?
>>
>> Kind regards,
>> Andreas
>>
>> [1] https://github.com/apache/karaf/blob/trunk/pom.xml
>>
>> On Tue, May 29, 2012 at 4:07 PM, Romain Gilles <ro...@gmail.com>
>> wrote:
>> > Hi all,
>> > I think it could be interesting to provide a bom as explained in maven
>> > documentation:
>> >
>> http://maven.apache.org/guides/introduction/introduction-to-dependency-mechanism.html
>> > I'm looking to use dependency management with import scope that point on
>> > karaf and It will help me if you are providing a bom with only karaf
>> > projects in the dependency management and in a separate pom all the
>> third
>> > parties.
>> >
>> > I use to specify my maven configuration like this and it's works fine
>> and
>> > save me time.
>> >
>> > Regards,
>> >
>> > Romain.
>>
>

Re: Karaf should provide a maven BOM

Posted by Romain Gilles <ro...@gmail.com>.
Hi Gert,
Yes it is exactly what I did to implements commands and other stuffs like
re-branding...
To avoid to import and define versions of each karaf dependencies one by
one I follow the same solution than you.
But I have other dependencies which have different dependency versions than
the karaf ones.

Therefore that why I'm asking for a bom in karaf.

Romain

Le mercredi 30 mai 2012, Gert Vanthienen a écrit :

> Romain,
>
>
> In Apache ServiceMix, we are already using the current parent pom.xml
> for Karaf in this way, cfr.
>
> http://svn.apache.org/repos/asf/servicemix/smx4/features/trunk/parent/pom.xml
> - for all the Karaf stuff, we only have this one managed dependency
> with 'import' scope and so far there have been no problems with that:
>
>      <dependency>
>          <groupId>org.apache.karaf</groupId>
>          <artifactId>karaf</artifactId>
>          <version>${karaf.version}</version>
>          <type>pom</type>
>          <scope>import</scope>
>      </dependency>
>
> However, we might be a bit of a special case, because we directly
> build on top of Karaf so we should not be using any other versions for
> dependencies than the one that Karaf provides anyway.  What
> dependencies are you experiencing problems with?
>
>
> Regards,
>
> Gert Vanthienen
> ------------------------
> FuseSource
> Web: http://fusesource.com
> Blog: http://gertvanthienen.blogspot.com/
>
>
> On Tue, May 29, 2012 at 6:03 PM, Romain Gilles <romain.gilles@gmail.com<javascript:;>>
> wrote:
> >
> > In fact when you use the scope import it automatically substitute the
> > current import statement by all the dependencyManagement block of the
> > pointed dependency (here karaf).
> > Therefore as in your super pom you mix child dependency definitions and
> > your third party dependencies then it is more hard to me to specify my
> > dependencies on third parties because I have to take care of yours as
> they
> > are imported there is an ordering issue...
> > So if you provide a bom I will get only your child projects in my
> > dependency management and do my dependency management for my third
> parties
> > without take care of karaf's third parties.
> >
> > The may issue raise when you try to import 2 project that (i.e. karaf and
> > another one) that does not have the same dependencies... (I mee in term
> of
> > versions).
> >
> > Do you see what I mean?
> >
> > Romain.
> >
> > Le mardi 29 mai 2012, Andreas Pieber a écrit :
> >
> > > Well, basically we provide a "regular super pom" [1] which specifies
> > > most of our parent projects. I'm not quite sure which will be the
> > > advantage of using the type bom over pom?
> > >
> > > Kind regards,
> > > Andreas
> > >
> > > [1] https://github.com/apache/karaf/blob/trunk/pom.xml
> > >
> > > On Tue, May 29, 2012 at 4:07 PM, Romain Gilles <
> romain.gilles@gmail.com <javascript:;><javascript:;>>
> > > wrote:
> > > > Hi all,
> > > > I think it could be interesting to provide a bom as explained in
> maven
> > > > documentation:
> > > >
> > >
> http://maven.apache.org/guides/introduction/introduction-to-dependency-mechanism.html
> > > > I'm looking to use dependency management with import scope that
> point on
> > > > karaf and It will help me if you are providing a bom with only karaf
> > > > projects in the dependency management and in a separate pom all the
> third
> > > > parties.
> > > >
> > > > I use to specify my maven configuration like this and it's works
> fine and
> > > > save me time.
> > > >
> > > > Regards,
> > > >
> > > > Romain.
> > >
>

Re: Karaf should provide a maven BOM

Posted by Gert Vanthienen <ge...@gmail.com>.
Romain,


In Apache ServiceMix, we are already using the current parent pom.xml
for Karaf in this way, cfr.
http://svn.apache.org/repos/asf/servicemix/smx4/features/trunk/parent/pom.xml
- for all the Karaf stuff, we only have this one managed dependency
with 'import' scope and so far there have been no problems with that:

      <dependency>
          <groupId>org.apache.karaf</groupId>
          <artifactId>karaf</artifactId>
          <version>${karaf.version}</version>
          <type>pom</type>
          <scope>import</scope>
      </dependency>

However, we might be a bit of a special case, because we directly
build on top of Karaf so we should not be using any other versions for
dependencies than the one that Karaf provides anyway.  What
dependencies are you experiencing problems with?


Regards,

Gert Vanthienen
------------------------
FuseSource
Web: http://fusesource.com
Blog: http://gertvanthienen.blogspot.com/


On Tue, May 29, 2012 at 6:03 PM, Romain Gilles <ro...@gmail.com> wrote:
>
> In fact when you use the scope import it automatically substitute the
> current import statement by all the dependencyManagement block of the
> pointed dependency (here karaf).
> Therefore as in your super pom you mix child dependency definitions and
> your third party dependencies then it is more hard to me to specify my
> dependencies on third parties because I have to take care of yours as they
> are imported there is an ordering issue...
> So if you provide a bom I will get only your child projects in my
> dependency management and do my dependency management for my third parties
> without take care of karaf's third parties.
>
> The may issue raise when you try to import 2 project that (i.e. karaf and
> another one) that does not have the same dependencies... (I mee in term of
> versions).
>
> Do you see what I mean?
>
> Romain.
>
> Le mardi 29 mai 2012, Andreas Pieber a écrit :
>
> > Well, basically we provide a "regular super pom" [1] which specifies
> > most of our parent projects. I'm not quite sure which will be the
> > advantage of using the type bom over pom?
> >
> > Kind regards,
> > Andreas
> >
> > [1] https://github.com/apache/karaf/blob/trunk/pom.xml
> >
> > On Tue, May 29, 2012 at 4:07 PM, Romain Gilles <romain.gilles@gmail.com<javascript:;>>
> > wrote:
> > > Hi all,
> > > I think it could be interesting to provide a bom as explained in maven
> > > documentation:
> > >
> > http://maven.apache.org/guides/introduction/introduction-to-dependency-mechanism.html
> > > I'm looking to use dependency management with import scope that point on
> > > karaf and It will help me if you are providing a bom with only karaf
> > > projects in the dependency management and in a separate pom all the third
> > > parties.
> > >
> > > I use to specify my maven configuration like this and it's works fine and
> > > save me time.
> > >
> > > Regards,
> > >
> > > Romain.
> >

Re: Karaf should provide a maven BOM

Posted by Romain Gilles <ro...@gmail.com>.
In fact when you use the scope import it automatically substitute the
current import statement by all the dependencyManagement block of the
pointed dependency (here karaf).
Therefore as in your super pom you mix child dependency definitions and
your third party dependencies then it is more hard to me to specify my
dependencies on third parties because I have to take care of yours as they
are imported there is an ordering issue...
So if you provide a bom I will get only your child projects in my
dependency management and do my dependency management for my third parties
without take care of karaf's third parties.

The may issue raise when you try to import 2 project that (i.e. karaf and
another one) that does not have the same dependencies... (I mee in term of
versions).

Do you see what I mean?

Romain.

Le mardi 29 mai 2012, Andreas Pieber a écrit :

> Well, basically we provide a "regular super pom" [1] which specifies
> most of our parent projects. I'm not quite sure which will be the
> advantage of using the type bom over pom?
>
> Kind regards,
> Andreas
>
> [1] https://github.com/apache/karaf/blob/trunk/pom.xml
>
> On Tue, May 29, 2012 at 4:07 PM, Romain Gilles <romain.gilles@gmail.com<javascript:;>>
> wrote:
> > Hi all,
> > I think it could be interesting to provide a bom as explained in maven
> > documentation:
> >
> http://maven.apache.org/guides/introduction/introduction-to-dependency-mechanism.html
> > I'm looking to use dependency management with import scope that point on
> > karaf and It will help me if you are providing a bom with only karaf
> > projects in the dependency management and in a separate pom all the third
> > parties.
> >
> > I use to specify my maven configuration like this and it's works fine and
> > save me time.
> >
> > Regards,
> >
> > Romain.
>

Re: Karaf should provide a maven BOM

Posted by Andreas Pieber <an...@gmail.com>.
Well, basically we provide a "regular super pom" [1] which specifies
most of our parent projects. I'm not quite sure which will be the
advantage of using the type bom over pom?

Kind regards,
Andreas

[1] https://github.com/apache/karaf/blob/trunk/pom.xml

On Tue, May 29, 2012 at 4:07 PM, Romain Gilles <ro...@gmail.com> wrote:
> Hi all,
> I think it could be interesting to provide a bom as explained in maven
> documentation:
> http://maven.apache.org/guides/introduction/introduction-to-dependency-mechanism.html
> I'm looking to use dependency management with import scope that point on
> karaf and It will help me if you are providing a bom with only karaf
> projects in the dependency management and in a separate pom all the third
> parties.
>
> I use to specify my maven configuration like this and it's works fine and
> save me time.
>
> Regards,
>
> Romain.