ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From <>
Subject AW: Help with choosing build property file
Date Fri, 07 Oct 2005 14:52:08 GMT
<!-- set property 'computername' -->
<propery file="${computername}.properties"/> 
<propery file=""/> 

Because properties are immutable the more specific values in the first file are prefered.
If that file does not exist (eg ${computername} is not set) it does not matter.

You have to set the property 'computername'. On WinXP you can use a env variable:
<property environment="env"/>
<property name="computername" value="${env.COMPUTERNAME}"/>


>-----Urspr√ľngliche Nachricht-----
>Von: Rakesh Patel [] 
>Gesendet: Freitag, 7. Oktober 2005 16:40
>Betreff: Help with choosing build property file
>I would like to enhance my current Ant setup and was looking 
>for advice.
>At the moment, Ant picks up the file in the 
>root directory and uses that:
><property file="" />
>However, what I would like to do is this:
>1. Ant gets the machine name/IP address of the machine it is 
>running on.
>2. Based on the answer to (1), a particular property file is 
>chosen and used.
>3. If no machine name/ip address match a default property file is used.
>Is this doable? I saw a configuration like this once but it 
>was done in Perl.
>American Express Investments and American Express Independent 
>Financial Advisers are marketing names for American Express 
>Financial Services Europe Limited, a separate corporation 
>within the American Express group of companies.  American 
>Express Financial Services Europe Limited is authorised and 
>regulated by, and is entered into the register (No. 190853 
> of, the Financial Services Authority 
>and a member of the London Stock Exchange. Registered in 
>England No. 3614902. Registered address: 230 Blackfriars Road, 
>London SE1 8NW. Vat No. 740 4143 68. 
>The information in this email and any attachments is 
>confidential and intended solely for the attention and use of 
>the named addressee(s). It may be subject to legal, 
>professional or other privilege and further distribution of it 
>is strictly prohibited without our authority.  If you are not 
>the intended recipient, you are not authorised to and must not 
>disclose, copy, distribute, or retain this message or any part 
>of it, and should notify us immediately.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message