franz see wrote:
> 
> 
> 
> Gareth Tilley wrote:
>> 
>> I'm still having trouble getting this to work, and I'm loathe to have to
>> write some separate code to set the variable default using the
>> environment variable manually with in the plugin. It just doesn't seem
>> like the wy it should be done. Has anyone else tried something similar?
>> Or does anyone have a suggestion as to how it would be best to do what
>> I'm trying to do? Perhaps a call to some validation code within the maven
>> codebase?
>> 
>> 
>> Gareth Tilley wrote:
>>> 
>>> Hi All,
>>> 
>>> I'm trying to inject an environment variable as the default value for a
>>> plugin parameter:
>>> 
>>>     /**
>>>      * @parameter expression="${directory}"
>>> default-value="${env.DIRECTORY}"
>>>      * @required
>>>      */
>>>     private String directory;
>>> 
>>> I keep getting a null, even though DIRECTORY is set. Is it possible to
>>> do what I'm trying to do?
>>> 
>>> Regards
>>> Gareth
>>> 
>> 
>> 
> 
> Good day to you, Gareth,
> 
> How do you set the directory? 
> 
> Cheers, 
> Franz
> 
Hi Franz,

I'm using Linux, and I execute:
export DIRECTORY=/xxx/yyy

But when I run the plugin the string directory contains a null.

Regards
Gareth
-- 
View this message in context: 
http://www.nabble.com/Environment-variable-plugin-parameter-default-tf2070895.html#a5866481
Sent from the Maven - Users forum at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to