You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by "Rahamim, Zvi (Zvi)" <zr...@avaya.com> on 2006/11/06 09:32:12 UTC

ZQ: Overide project and dependency versions using command line attribute

Hi,
I have a project my-app that depends on my-app-2.
The version that is specified in that file is version 1.0.0 for my-app
and 2.0.0 for my-app2.
I want, without modifying the pom.xml file, to build deploy my-app but
with version 1.0.1 that uses my-app2's version 2.0.1
Can you tell me how to do it using command line property parameters?
Thanks!

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


RE: ZQ: Overide project and dependency versions using command line attribute

Posted by franz see <fr...@gmail.com>.
Good day to you, Rahamim,

If my assumption before that dependencies are resolved first before
filtering, then using MavenEmbedder won't be any different.

MavenEmbedder is the generic entry point to Maven. From there, it can be
extended to be an IDE Plugin, or to be integrated in another system, or via
its default usage, the commandline (MavenCLI).

Cheers,
Franz


Rahamim, Zvi (Zvi) wrote:
> 
> Thank you both,
> Suppose I use the Maven using a java code (MavenEmbedder~).
> How can I leverage this in order to change the parameter values (my-app
> and my-app2 versions)?
> Thanks 
> 
> -----Original Message-----
> From: Arnaud Bailly [mailto:abailly@oqube.com] 
> Sent: Monday, November 06, 2006 11:39 AM
> To: Maven Users List
> Subject: Re: ZQ: Overide project and dependency versions using command
> line attribute
> 
> franz see <fr...@gmail.com> writes:
> 
>> Good day to you, Rahamim,
>>
>> I don't think that is possible. IIRC, Dependencies are resolved before 
>> any filtering can take place :-)
>>
> 
> +1
> 
>>> 
>>> Hi,
>>> I have a project my-app that depends on my-app-2.
>>> The version that is specified in that file is version 1.0.0 for 
>>> my-app and 2.0.0 for my-app2.
>>> I want, without modifying the pom.xml file, to build deploy my-app 
>>> but with version 1.0.1 that uses my-app2's version 2.0.1 Can you tell 
>>> me how to do it using command line property parameters?
>>> Thanks!
>>> 
> 
> But may be this objective can be reached using profiles and
> dependencyManagement. Set one profile with 1.0.0 dependency and another
> with 2.0.0 and choose which profile to run on command line with -P
> <profilename>. Note that these profiles must be defined in the POM, not
> settings.xml.
> 
> HTH
> regards
> 
> 
> --
> OQube < software engineering \ génie logiciel > Arnaud Bailly, Dr.
> \web> http://www.oqube.com
> 
> 
> ---------------------------------------------------------------------
> 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
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/ZQ%3A-Overide-project-and-dependency-versions-using-command-line-attribute-tf2581062s177.html#a7277512
Sent from the Maven - Users mailing list archive at Nabble.com.


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


Re: ZQ: Overide project and dependency versions using command line attribute

Posted by Arnaud Bailly <ab...@oqube.com>.
franz see <fr...@gmail.com> writes:

> Good day to you, Rahamim,
>
> I don't think that is possible. IIRC, Dependencies are resolved before any
> filtering can take place :-)
>

+1

>> 
>> Hi,
>> I have a project my-app that depends on my-app-2.
>> The version that is specified in that file is version 1.0.0 for my-app
>> and 2.0.0 for my-app2.
>> I want, without modifying the pom.xml file, to build deploy my-app but
>> with version 1.0.1 that uses my-app2's version 2.0.1
>> Can you tell me how to do it using command line property parameters?
>> Thanks!
>> 

But may be this objective can be reached using profiles and
dependencyManagement. Set one profile with 1.0.0 dependency and
another with 2.0.0 and choose which profile to run on command line
with -P <profilename>. Note that these profiles must be defined in the
POM, not settings.xml.

HTH
regards


-- 
OQube < software engineering \ génie logiciel >
Arnaud Bailly, Dr.
\web> http://www.oqube.com


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


Re: ZQ: Overide project and dependency versions using command line attribute

Posted by franz see <fr...@gmail.com>.
Good day to you, Rahamim,

I don't think that is possible. IIRC, Dependencies are resolved before any
filtering can take place :-)

Cheers,
Franz


Rahamim, Zvi (Zvi) wrote:
> 
> Hi,
> I have a project my-app that depends on my-app-2.
> The version that is specified in that file is version 1.0.0 for my-app
> and 2.0.0 for my-app2.
> I want, without modifying the pom.xml file, to build deploy my-app but
> with version 1.0.1 that uses my-app2's version 2.0.1
> Can you tell me how to do it using command line property parameters?
> Thanks!
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/ZQ%3A-Overide-project-and-dependency-versions-using-command-line-attribute-tf2581062s177.html#a7195719
Sent from the Maven - Users mailing list archive at Nabble.com.


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