Return-Path: Mailing-List: contact user-help@ant.apache.org; run by ezmlm Delivered-To: mailing list user@ant.apache.org Received: (qmail 61511 invoked from network); 9 Apr 2003 06:52:19 -0000 Received: from dnsinet.rzf-nrw.de (193.109.238.66) by daedalus.apache.org with SMTP; 9 Apr 2003 06:52:19 -0000 Received: from z011104.bk.fin.local (z011104.bk.fin.local [193.109.238.140]) by dnsinet.rzf-nrw.de (8.12.9/8.12.9) with ESMTP id h396qSZ7010140 for ; Wed, 9 Apr 2003 08:52:28 +0200 Received: by z011104.bk.fin.local with Internet Mail Service (5.5.2653.19) id ; Wed, 9 Apr 2003 08:52:29 +0200 Message-ID: <879A5AD5DD0ED511891F0003473A9B5608FF67CE@Z011004> From: Jan.Materne@rzf.fin-nrw.de To: user@ant.apache.org Subject: AW: Conditional logic in ANT build scripts Date: Wed, 9 Apr 2003 08:52:28 +0200 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2653.19) Content-Type: multipart/alternative; boundary="----_=_NextPart_001_01C2FE64.96199980" X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N ------_=_NextPart_001_01C2FE64.96199980 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable DEV-Environment =20 Jan Mat=E8rne > -----Urspr=FCngliche Nachricht----- > Von: Andrew Zeon [mailto:AndrewZ@hothouse.com.au] > Gesendet am: Mittwoch, 9. April 2003 08:55 > An: Ant Mailing List (E-mail) > Betreff: Conditional logic in ANT build scripts >=20 > Hi,=20 >=20 > I know that the 'if' attribute in the 'target' task can be=20 > used to determine > whether or not a target should be executed. However, it is my=20 > understanding > that the 'if' attribute does not take into consideration the=20 > value of the > property... it merely checks its presence. Is there a way I=20 > can dynamically > determine whether or not a target is to be executed according=20 > to the actual > value of a property? >=20 > The reason why I ask is I have a build script, but that build = script's > behaviour has to be different for different environments.=20 > This is how I > invoke my script: >=20 > "ant -Denvironment=3Ddev dist" >=20 > for the development environment >=20 > "ant -Denvironment=3Dstaging dist " >=20 > for the staging environment >=20 > ant -D environment=3Dlive dist >=20 > for the live environment >=20 >=20 > I have targets which should only be run for specific=20 > environments... how can > I do this? >=20 > Thanks. >=20 > --------------------------------------------------------------------- > To unsubscribe, e-mail: user-unsubscribe@ant.apache.org > For additional commands, e-mail: user-help@ant.apache.org >=20 ------_=_NextPart_001_01C2FE64.96199980--