I appreciate the two responses, but no one seems to be grasping what
I'm talking about.
Erase from your mind anything about %dos_env_vars% or $unix_env_vars.
My question has exactly 0 to do with env vars.
My question is about maven properties. In a pom file I can set a
property to the value of another property by writing
<prop1>${prop2}<prop1>, or if I want to set it to the literal value
"${prop2}" I can write <prop1>$${prop2}<prop1>. The extra $ escapes
it and keeps it from getting interpolated.
However, on the command-line, I cannot find any way to accomplish the
same thing. If I write mvn blah -Dprop1=${prop2} Maven sets prop1 to
null. If I write mvn blah -Dprop1=$${prop2} it sets prop1 to $null.
The only way I have found to keep it from interpolating is by
appending text.
Is this by design or a bug? I'd say it is a bug because if it's going
to interpolate at all it ought to be consistent and should work the
same way as when inside a pom file.
Phillip
On Thu, Apr 21, 2011 at 6:16 PM, Sony Antony <[email protected]> wrote:
> I think %myvar2% will result in windows shell doing teh substitution
> I dont think maven will use system variables set using -D as pom variables (
> maybe I m wrong )
> --sony
> On Thu, Apr 21, 2011 at 7:24 PM, Phillip Hellewell <[email protected]> wrote:
>
>> This is on Windows from a command prompt, not Linux.
>>
>> Phillip
>>
>> On Thu, Apr 21, 2011 at 12:21 PM, Jörg Schaible <[email protected]>
>> wrote:
>> > Phillip Hellewell wrote:
>> >
>> >> Oh, I just thought of something shorter that will work:
>> >>
>> >> -Dmyvar1=c:\test\${myvar2}\.
>> >>
>> >> Still seems kinda crazy though. Anyone want to shed some light on why
>> >> it works this way? This is with Maven 3.0.1.
>> >
>> > Maybe you should have a look into the bash manual instead ?
>> >
>> > - Jörg
>> >
>> >
>> > ---------------------------------------------------------------------
>> > To unsubscribe, e-mail: [email protected]
>> > For additional commands, e-mail: [email protected]
>> >
>> >
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [email protected]
>> For additional commands, e-mail: [email protected]
>>
>>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]