<property env="..."/> should work on all platforms; just pick a common environment variable to use.
You may need to use a wrapper script around Ant to set this common variable. -- Jeffrey E. Care ([EMAIL PROTECTED]) WebSphere v7 Release Engineer WebSphere Build Tooling Lead (Project Mantis) "Rakesh Patel" <[EMAIL PROTECTED]> wrote on 10/07/2005 11:16:22 AM: > Hi Jan, > > That looks promising. Is there a way to make it work on both windows > and unix? I develop on windows and deploy to solaris. > > Thanks > > Rakesh > > -----Original Message----- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] > Sent: 07 October 2005 15:52 > To: user@ant.apache.org > Subject: AW: Help with choosing build property file > > > <!-- set property 'computername' --> > <propery file="${computername}.properties"/> > <propery file="default.properties"/> > > 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}"/> > > > Jan > > > > >-----Ursprüngliche Nachricht----- > >Von: Rakesh Patel [mailto:[EMAIL PROTECTED] > >Gesendet: Freitag, 7. Oktober 2005 16:40 > >An: user@ant.apache.org > >Betreff: Help with choosing build property file > > > >Hi, > > > >I would like to enhance my current Ant setup and was looking > >for advice. > > > >At the moment, Ant picks up the build.properties file in the > >root directory and uses that: > > > ><property file="build.properties" /> > > > >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. > > > >Thanks > > > >Rakesh > > > > > >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 > >www.fsa.gov.uk/register/) 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: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > > 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 www.fsa.gov.uk/register/) 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: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] >