Return-Path: Mailing-List: contact user-help@ant.apache.org; run by ezmlm Delivered-To: mailing list user@ant.apache.org Received: (qmail 81361 invoked from network); 9 Apr 2003 07:05:58 -0000 Received: from bodewig.bost.de (195.227.98.11) by daedalus.apache.org with SMTP; 9 Apr 2003 07:05:58 -0000 Received: (from bodewig@localhost) by bodewig.bost.de (8.11.6/8.11.6) id h3976AQ04241; Wed, 9 Apr 2003 09:06:10 +0200 X-Authentication-Warning: bodewig.bost.de: bodewig set sender to bodewig@apache.org using -f To: user@ant.apache.org Subject: Re: Conditional logic in ANT build scripts References: <36824C00FE20D511B80B00D0B747527C027B17E9@mail.hothouse.com.au> From: Stefan Bodewig Date: 09 Apr 2003 09:06:09 +0200 In-Reply-To: <36824C00FE20D511B80B00D0B747527C027B17E9@mail.hothouse.com.au> Message-ID: Lines: 29 User-Agent: Gnus/5.0808 (Gnus v5.8.8) XEmacs/21.4 (Military Intelligence) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N On Wed, 9 Apr 2003, Andrew Zeon wrote: > I have targets which should only be run for specific > environments... how can I do this? The way I do it: at the top of the build file. I'll most likely need different values for a whole bunch of properties depending on the environment as well. In life.properties I'd have a line is-live=true and I'd not define the same property in the other environments (but similar properties with different names). The conditional targets then would look like = 1.5) I'd drop the environment property and the above task completely and invoke Ant as ant -propertyfile life.properties Stefan