You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Roberto Castro <ro...@cetip.com.br> on 2004/07/30 16:09:08 UTC
How to define a default value for a Maven argument?
Hi, all. I pass an argument to Maven(maven -Darg=xyz ....), but sometimes I'd like not to pass the argument and use a default value, so, I defined the default value in "project.properties" file, like this:
arg=defaultValue
Well, in "maven.xml" when I echoed the argument "arg", it shows me the correct value, i.e., "defaultValue", but when I performed an "if" comand to check if the argument was passed in CLI or not, it's always different from the value I defined in "project.properties".
Is there a work around for this situation?
Thanks in advance.
Roberto de Castro
Analista de Suporte
Cetip - Desus Rio de Janeiro
+55 21 2276-7439
mailto:robertoc@cetip.com.br
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
RE: How to define a default value for a Maven argument?
Posted by Carlos Sanchez <ap...@carlos.cousas.net>.
Hi,
That should work, you probably have an error in your maven.xml
Regards
Carlos Sanchez
A Coruña, Spain
Oness Project
http://oness.sourceforge.net
> -----Original Message-----
> From: Roberto Castro [mailto:robertoc@cetip.com.br]
> Sent: Friday, July 30, 2004 4:09 PM
> To: users@maven.apache.org
> Subject: How to define a default value for a Maven argument?
>
> Hi, all. I pass an argument to Maven(maven -Darg=xyz ....),
> but sometimes I'd like not to pass the argument and use a
> default value, so, I defined the default value in
> "project.properties" file, like this:
> arg=defaultValue
>
> Well, in "maven.xml" when I echoed the argument "arg", it
> shows me the correct value, i.e., "defaultValue", but when I
> performed an "if" comand to check if the argument was passed
> in CLI or not, it's always different from the value I defined
> in "project.properties".
> Is there a work around for this situation?
> Thanks in advance.
>
> Roberto de Castro
> Analista de Suporte
> Cetip - Desus Rio de Janeiro
> +55 21 2276-7439
> mailto:robertoc@cetip.com.br
>
>
>
>
> ---------------------------------------------------------------------
> 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