ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Matt Benson <gudnabr...@gmail.com>
Subject Re: Need cross platform way of assigning users name to a property
Date Tue, 22 Jun 2010 16:06:36 GMT

On Jun 22, 2010, at 11:03 AM, Michael Ludwig wrote:

> Dean Schulze schrieb am 22.06.2010 um 08:25 (-0700):
> 
>> <property environment="env"/>
>> <property name="user.username.dir" value="user/${env.USERNAME}"/>
>> <import file="${user.username.dir}/build.local.xml" optional="true"/>
> 
>> I need a cross-platform way to assign a user.name property in Ant.  
> 
>> Is there some way that I can read the username from the environment in
>> a cross-platform way given that it has to happen at the top of the
>> script?
> 
> I'm probably missing something, but what's wrong with the following,
> which is provided by Ant out of the box:
> 

Provided by Java out of the box, if I'm not mistaken.  :)

-Matt

> <project>
>  <echo level="info" message="${user.name}"/>
> </project>
> 
> -- 
> Michael Ludwig
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message