You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by ra...@jpmchase.com on 2006/03/24 16:34:12 UTC

Different version of build

Hi All

How do i change the build or dependecy  version at run time

I mean if i have more than one module on project like Module-A, Module-B, 
those module intern has some submodules, my Module-B dependes one of 
subModdule-A but different times i need to build Module-B againt different 
version of subModule-B. i know for sure we can achieve this thru changing 
dependency section of Module-B but instread of that i tried having 
something like <version>${subModule-A.version}</version> and then tried 
having properties <subModule-A.version>4.3</subModule-A.version> in my 
settings.xml Profile, and also tried by passing it has system property as 
-DsubModule-A.version=4.3, but both ways its throwing error. saying it 
couldn't resolve dependency for ${subModule-A.version} 

Is there way to make pom.xml to subsitute that ${subModule-A.version} 
value to take either from settings.xml or from system property

Its been driving crazy, Please if some one has done this can u share your 
solution for this??



Thanks,
Raghu 

Re: Different version of build

Posted by Wayne Fay <wa...@gmail.com>.
Pople generally use the <dependencyManagement> configuration for
situations like these.

You need to specify the version number in one place (in the depMgmt in
root project) and then omit the version in other <dep> references.

Wayne


On 3/24/06, raghurajan.x.gurunathan@jpmchase.com
<ra...@jpmchase.com> wrote:
> Hi All
>
> How do i change the build or dependecy  version at run time
>
> I mean if i have more than one module on project like Module-A, Module-B,
> those module intern has some submodules, my Module-B dependes one of
> subModdule-A but different times i need to build Module-B againt different
> version of subModule-B. i know for sure we can achieve this thru changing
> dependency section of Module-B but instread of that i tried having
> something like <version>${subModule-A.version}</version> and then tried
> having properties <subModule-A.version>4.3</subModule-A.version> in my
> settings.xml Profile, and also tried by passing it has system property as
> -DsubModule-A.version=4.3, but both ways its throwing error. saying it
> couldn't resolve dependency for ${subModule-A.version}
>
> Is there way to make pom.xml to subsitute that ${subModule-A.version}
> value to take either from settings.xml or from system property
>
> Its been driving crazy, Please if some one has done this can u share your
> solution for this??
>
>
>
> Thanks,
> Raghu
>
>