Return-Path: Delivered-To: apmail-ant-user-archive@www.apache.org Received: (qmail 38980 invoked from network); 9 Dec 2003 07:59:43 -0000 Received: from daedalus.apache.org (HELO mail.apache.org) (208.185.179.12) by minotaur-2.apache.org with SMTP; 9 Dec 2003 07:59:43 -0000 Received: (qmail 28977 invoked by uid 500); 9 Dec 2003 07:59:12 -0000 Delivered-To: apmail-ant-user-archive@ant.apache.org Received: (qmail 28848 invoked by uid 500); 9 Dec 2003 07:59:11 -0000 Mailing-List: contact user-help@ant.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Ant Users List" Reply-To: "Ant Users List" Delivered-To: mailing list user@ant.apache.org Received: (qmail 28835 invoked from network); 9 Dec 2003 07:59:10 -0000 Received: from unknown (HELO dnsinet.rzf-nrw.de) (193.109.238.66) by daedalus.apache.org with SMTP; 9 Dec 2003 07:59:10 -0000 Received: from z011104.bk.fin.local (z011104.bk.fin.local [193.109.238.140]) by dnsinet.rzf-nrw.de (8.12.10/8.12.10) with ESMTP id hB97xE9k021954 for ; Tue, 9 Dec 2003 08:59:14 +0100 Received: by z011104.bk.fin.local with Internet Mail Service (5.5.2657.72) id ; Tue, 9 Dec 2003 08:59:57 +0100 Message-ID: <879A5AD5DD0ED511891F0003473A9B5608FF73E4@Z011004> From: Jan.Materne@rzf.fin-nrw.de To: user@ant.apache.org Subject: RE: antcall and immutable properties ... Normal ? Date: Tue, 9 Dec 2003 08:59:13 +0100 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2657.72) Content-Type: multipart/alternative; boundary="----_=_NextPart_001_01C3BE2A.55A8B710" X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N ------_=_NextPart_001_01C3BE2A.55A8B710 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable opens a new scope for properties. Properties which are set in the called target are not available in the calling target. Therefore this should work: filename ${filename} exist That should work without any external task library and with Ant 1.5. For easier scripting AntContrib [1] could be something for you: And with Ant 1.6 [2] maybe the *def family [3,4,5] would help. Jan [1] http://sourceforge.net/projects/ant-contrib/ [2] http://cvs.apache.org/dist/ant/v1.6beta3/ [3] http://ant.apache.org/manual-1.6beta/CoreTasks/macrodef.html [4] http://ant.apache.org/manual-1.6beta/OptionalTasks/scriptdef.html [5] http://ant.apache.org/manual-1.6beta/CoreTasks/presetdef.html > -----Original Message----- > From: Noel Sebastien (BIL) [mailto:Sebastien.Noel@dexia-bil.com] > Sent: Monday, December 08, 2003 3:38 PM > To: user@ant.apache.org > Subject: antcall and immutable properties ... Normal ? >=20 >=20 > Hi everyone, >=20 > I am using Ant 1.5. I need a functionality to start a task=20 > (via antcall) only if a variable condition is true. > This task should be called multiple times and that is the=20 > problem because the "if" attribute of "antcall" only supports=20 > PROPERTIES (that are immutable !!!). >=20 > Here is an example where i would like to use a file=20 > (deletion, touch and so on) if it already exists and to do=20 > nothing if it does not exist : >=20 > > value=3D"file1"/> > value=3D"file2"/> > >=20 > > =20 > >=20 >=20 > Maybe there is another task (or another easier way) to do=20 > this, tell me it then... > Thank you in advance, >=20 > S=E9bastien NOEL=20 >=20 >=20 >=20 > --------------------- > An electronic message is not binding on its sender. =20 > Any message referring to a binding engagement must be=20 > confirmed in writing and duly signed. > --------------------- >=20 >=20 > --------------------------------------------------------------------- > To unsubscribe, e-mail: user-unsubscribe@ant.apache.org > For additional commands, e-mail: user-help@ant.apache.org >=20 ------_=_NextPart_001_01C3BE2A.55A8B710--