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.

Phillip

On Thu, Apr 21, 2011 at 11:51 AM, Phillip Hellewell <ssh...@gmail.com> wrote:
> Some more interesting examples:
>
> xyz${myvar2}  => xyznull
> ${myvar2}xyz   => ${myvar2}xyz
> xyz${myavr2}xyz => xyz${mvar2}xyz
>
> so as long as I add something after, I can get it to not interpolate like I 
> want
>
> So this is really ridiculous, but I've come up with something that works:
>
> -Dmyvar1=c:\test\${myvar2}\..\${myvar2}
>
> Phillip
>
> On Thu, Apr 21, 2011 at 11:39 AM, Phillip Hellewell <ssh...@gmail.com> wrote:
>> I'm having trouble running a plugin I wrote and setting a variable to
>> another variable that I want to interpolate later.
>>
>> I've had success inside pom files by escaping the $ as $$, but from
>> the command-line that is not working.
>>
>> What's weird is that it is inconsistent about when it will interpolate
>> it or not, e.g.:
>>
>> mvn myplugin:mygoal -Dmyvar1=${myvar2}   => this sets myvar1 to
>> literally "${myvar2}", without interpolation
>>
>> mvn myplugin:mygoal -Dmyvar1="c:\test\${myvar2}"  => this one
>> interpolates it so I get myvar1 set to "c:\test\null"
>>
>> How can I make the second one work?
>>
>> Phillip
>>
>

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

Reply via email to