You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Quintin Beukes <qu...@last.za.net> on 2009/10/10 18:29:20 UTC

Global dependency version property

Hey,

We have certain dependencies like OpenEJB, Geronimo and Hibernate
being used throughout our project. When we upgrade the version
(especially with minor revisions) it's merely a process of changing
all the <version> elements to the new version. Though, being many
projects this is a tedious process, and you sometimes miss one/two.

Isn't there a way to define some properties in the parent POM and have
them propagate to the children, to be referenced from there? Or to
maybe declare some dependency groups in the parent POM, and then
reference them by group in the child projects?

Quintin Beukes

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Global dependency version property

Posted by Anders Hammar <an...@hammar.net>.
Yes, you can.

/A

On Sat, Oct 10, 2009 at 21:41, Quintin Beukes <qu...@skywalk.co.za> wrote:

> And you override where necessary?
>
> Quintin Beukes
>
>
>
> On Sat, Oct 10, 2009 at 8:36 PM, Anders Hammar <an...@hammar.net> wrote:
> > Yes. You use the dependencyManagement to specify stuff like version and
> > scope. Each project where you have the dependency you still need to
> specify
> > it. However, you just state groupId and artifactId.
> >
> > /Anders
> >
> > On Sat, Oct 10, 2009 at 20:02, Quintin Beukes <qu...@skywalk.co.za>
> wrote:
> >
> >> Thanks, that looks good.
> >>
> >> Re. the   <dependencyManagement> element. When I include a set of
> >> dependencies in my parent POM, they won't be included in the child
> >> POMs unless I excplicitely list them there? Meaning it's effect is
> >> only when the dependency is listed in a child without a version?
> >>
> >> Quintin Beukes
> >>
> >>
> >>
> >> On Sat, Oct 10, 2009 at 7:44 PM, Jason van Zyl <ja...@sonatype.com>
> wrote:
> >> > You really need to read the book.
> >> >
> >> >
> >>
> http://www.sonatype.com/books/maven-book/reference/optimizing-sect-dependencies.html
> >> >
> >> > On 2009-10-10, at 9:29 AM, Quintin Beukes wrote:
> >> >
> >> >> Hey,
> >> >>
> >> >> We have certain dependencies like OpenEJB, Geronimo and Hibernate
> >> >> being used throughout our project. When we upgrade the version
> >> >> (especially with minor revisions) it's merely a process of changing
> >> >> all the <version> elements to the new version. Though, being many
> >> >> projects this is a tedious process, and you sometimes miss one/two.
> >> >>
> >> >> Isn't there a way to define some properties in the parent POM and
> have
> >> >> them propagate to the children, to be referenced from there? Or to
> >> >> maybe declare some dependency groups in the parent POM, and then
> >> >> reference them by group in the child projects?
> >> >>
> >> >> Quintin Beukes
> >> >>
> >> >> ---------------------------------------------------------------------
> >> >> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> >> >> For additional commands, e-mail: users-help@maven.apache.org
> >> >>
> >> >
> >> > Thanks,
> >> >
> >> > Jason
> >> >
> >> > ----------------------------------------------------------
> >> > Jason van Zyl
> >> > Founder,  Apache Maven
> >> > http://twitter.com/jvanzyl
> >> > ----------------------------------------------------------
> >> >
> >> >
> >> > ---------------------------------------------------------------------
> >> > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> >> > For additional commands, e-mail: users-help@maven.apache.org
> >> >
> >> >
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> >> For additional commands, e-mail: users-help@maven.apache.org
> >>
> >>
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

Re: Global dependency version property

Posted by Quintin Beukes <qu...@skywalk.co.za>.
And you override where necessary?

Quintin Beukes



On Sat, Oct 10, 2009 at 8:36 PM, Anders Hammar <an...@hammar.net> wrote:
> Yes. You use the dependencyManagement to specify stuff like version and
> scope. Each project where you have the dependency you still need to specify
> it. However, you just state groupId and artifactId.
>
> /Anders
>
> On Sat, Oct 10, 2009 at 20:02, Quintin Beukes <qu...@skywalk.co.za> wrote:
>
>> Thanks, that looks good.
>>
>> Re. the   <dependencyManagement> element. When I include a set of
>> dependencies in my parent POM, they won't be included in the child
>> POMs unless I excplicitely list them there? Meaning it's effect is
>> only when the dependency is listed in a child without a version?
>>
>> Quintin Beukes
>>
>>
>>
>> On Sat, Oct 10, 2009 at 7:44 PM, Jason van Zyl <ja...@sonatype.com> wrote:
>> > You really need to read the book.
>> >
>> >
>> http://www.sonatype.com/books/maven-book/reference/optimizing-sect-dependencies.html
>> >
>> > On 2009-10-10, at 9:29 AM, Quintin Beukes wrote:
>> >
>> >> Hey,
>> >>
>> >> We have certain dependencies like OpenEJB, Geronimo and Hibernate
>> >> being used throughout our project. When we upgrade the version
>> >> (especially with minor revisions) it's merely a process of changing
>> >> all the <version> elements to the new version. Though, being many
>> >> projects this is a tedious process, and you sometimes miss one/two.
>> >>
>> >> Isn't there a way to define some properties in the parent POM and have
>> >> them propagate to the children, to be referenced from there? Or to
>> >> maybe declare some dependency groups in the parent POM, and then
>> >> reference them by group in the child projects?
>> >>
>> >> Quintin Beukes
>> >>
>> >> ---------------------------------------------------------------------
>> >> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>> >> For additional commands, e-mail: users-help@maven.apache.org
>> >>
>> >
>> > Thanks,
>> >
>> > Jason
>> >
>> > ----------------------------------------------------------
>> > Jason van Zyl
>> > Founder,  Apache Maven
>> > http://twitter.com/jvanzyl
>> > ----------------------------------------------------------
>> >
>> >
>> > ---------------------------------------------------------------------
>> > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>> > For additional commands, e-mail: users-help@maven.apache.org
>> >
>> >
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>> For additional commands, e-mail: users-help@maven.apache.org
>>
>>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Global dependency version property

Posted by Anders Hammar <an...@hammar.net>.
Yes. You use the dependencyManagement to specify stuff like version and
scope. Each project where you have the dependency you still need to specify
it. However, you just state groupId and artifactId.

/Anders

On Sat, Oct 10, 2009 at 20:02, Quintin Beukes <qu...@skywalk.co.za> wrote:

> Thanks, that looks good.
>
> Re. the   <dependencyManagement> element. When I include a set of
> dependencies in my parent POM, they won't be included in the child
> POMs unless I excplicitely list them there? Meaning it's effect is
> only when the dependency is listed in a child without a version?
>
> Quintin Beukes
>
>
>
> On Sat, Oct 10, 2009 at 7:44 PM, Jason van Zyl <ja...@sonatype.com> wrote:
> > You really need to read the book.
> >
> >
> http://www.sonatype.com/books/maven-book/reference/optimizing-sect-dependencies.html
> >
> > On 2009-10-10, at 9:29 AM, Quintin Beukes wrote:
> >
> >> Hey,
> >>
> >> We have certain dependencies like OpenEJB, Geronimo and Hibernate
> >> being used throughout our project. When we upgrade the version
> >> (especially with minor revisions) it's merely a process of changing
> >> all the <version> elements to the new version. Though, being many
> >> projects this is a tedious process, and you sometimes miss one/two.
> >>
> >> Isn't there a way to define some properties in the parent POM and have
> >> them propagate to the children, to be referenced from there? Or to
> >> maybe declare some dependency groups in the parent POM, and then
> >> reference them by group in the child projects?
> >>
> >> Quintin Beukes
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> >> For additional commands, e-mail: users-help@maven.apache.org
> >>
> >
> > Thanks,
> >
> > Jason
> >
> > ----------------------------------------------------------
> > Jason van Zyl
> > Founder,  Apache Maven
> > http://twitter.com/jvanzyl
> > ----------------------------------------------------------
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > For additional commands, e-mail: users-help@maven.apache.org
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

Re: Global dependency version property

Posted by Quintin Beukes <qu...@skywalk.co.za>.
Thanks, that looks good.

Re. the   <dependencyManagement> element. When I include a set of
dependencies in my parent POM, they won't be included in the child
POMs unless I excplicitely list them there? Meaning it's effect is
only when the dependency is listed in a child without a version?

Quintin Beukes



On Sat, Oct 10, 2009 at 7:44 PM, Jason van Zyl <ja...@sonatype.com> wrote:
> You really need to read the book.
>
> http://www.sonatype.com/books/maven-book/reference/optimizing-sect-dependencies.html
>
> On 2009-10-10, at 9:29 AM, Quintin Beukes wrote:
>
>> Hey,
>>
>> We have certain dependencies like OpenEJB, Geronimo and Hibernate
>> being used throughout our project. When we upgrade the version
>> (especially with minor revisions) it's merely a process of changing
>> all the <version> elements to the new version. Though, being many
>> projects this is a tedious process, and you sometimes miss one/two.
>>
>> Isn't there a way to define some properties in the parent POM and have
>> them propagate to the children, to be referenced from there? Or to
>> maybe declare some dependency groups in the parent POM, and then
>> reference them by group in the child projects?
>>
>> Quintin Beukes
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>> For additional commands, e-mail: users-help@maven.apache.org
>>
>
> Thanks,
>
> Jason
>
> ----------------------------------------------------------
> Jason van Zyl
> Founder,  Apache Maven
> http://twitter.com/jvanzyl
> ----------------------------------------------------------
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Global dependency version property

Posted by Jason van Zyl <ja...@sonatype.com>.
You really need to read the book.

http://www.sonatype.com/books/maven-book/reference/optimizing-sect-dependencies.html

On 2009-10-10, at 9:29 AM, Quintin Beukes wrote:

> Hey,
>
> We have certain dependencies like OpenEJB, Geronimo and Hibernate
> being used throughout our project. When we upgrade the version
> (especially with minor revisions) it's merely a process of changing
> all the <version> elements to the new version. Though, being many
> projects this is a tedious process, and you sometimes miss one/two.
>
> Isn't there a way to define some properties in the parent POM and have
> them propagate to the children, to be referenced from there? Or to
> maybe declare some dependency groups in the parent POM, and then
> reference them by group in the child projects?
>
> Quintin Beukes
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>

Thanks,

Jason

----------------------------------------------------------
Jason van Zyl
Founder,  Apache Maven
http://twitter.com/jvanzyl
----------------------------------------------------------


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org