You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by "Ballard, Ken" <Ke...@ACS-INC.com> on 2005/11/18 17:14:19 UTC

[M2] & [M1] Multiproject dependencies question

This is a question for Maven 1 & 2, although I know that the answers will be
different.

Let's say that I have a multiproject with subprojects. Some build jars, one
builds a war, a couple that build an ejb jar and an ejb client jar, and one
builds an ear. Now let's say that I need the Spring jar in a jar subproject
or two, the war subproject, an ejb subproject, and the ear subproject. When
I upgrade to Spring 1.2.6, I need to go upgrade all the project.xml (M1) or
pom.xml (M2) files. There's a good chance for missing something there. In
M1, I could define custom property in the project.properties file like
spring.jar.version. But would this be the best practice, or is there a
better way? And what about M2, which doesn't use a project.properties file?

Thanks,
Ken

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


Re: [M2] & [M1] Multiproject dependencies question

Posted by Henry Isidro <hi...@exist.com>.
Ballard, Ken wrote:

>This is a question for Maven 1 & 2, although I know that the answers will be
>different.
>
>Let's say that I have a multiproject with subprojects. Some build jars, one
>builds a war, a couple that build an ejb jar and an ejb client jar, and one
>builds an ear. Now let's say that I need the Spring jar in a jar subproject
>or two, the war subproject, an ejb subproject, and the ear subproject. When
>I upgrade to Spring 1.2.6, I need to go upgrade all the project.xml (M1) or
>pom.xml (M2) files. There's a good chance for missing something there. In
>M1, I could define custom property in the project.properties file like
>spring.jar.version. But would this be the best practice, or is there a
>better way? And what about M2, which doesn't use a project.properties file?
>
>Thanks,
>Ken
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>For additional commands, e-mail: users-help@maven.apache.org
>
>  
>
Hi Ken,

In M1, you have to go the property route. M2 handles it more gracefully. 
List your dependencies under the dependencyManagement tag in your parent 
pom and any child poms will inherit those versions automatically.

Regards,
Henry

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


Re: [M2] & [M1] Multiproject dependencies question

Posted by Arik Kfir <ar...@gmail.com>.
in m2 you can define the version once - in the parent POM via a
<dependencyManagement> section. All child POMs just state the group &
artifact IDs, without the version (they inherit the version from the
parent).

as for m1, I think it can only be done via a property...

On 11/18/05, Ballard, Ken <Ke...@acs-inc.com> wrote:
> This is a question for Maven 1 & 2, although I know that the answers will be
> different.
>
> Let's say that I have a multiproject with subprojects. Some build jars, one
> builds a war, a couple that build an ejb jar and an ejb client jar, and one
> builds an ear. Now let's say that I need the Spring jar in a jar subproject
> or two, the war subproject, an ejb subproject, and the ear subproject. When
> I upgrade to Spring 1.2.6, I need to go upgrade all the project.xml (M1) or
> pom.xml (M2) files. There's a good chance for missing something there. In
> M1, I could define custom property in the project.properties file like
> spring.jar.version. But would this be the best practice, or is there a
> better way? And what about M2, which doesn't use a project.properties file?
>
> Thanks,
> Ken
>
> ---------------------------------------------------------------------
> 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