Return-Path: Delivered-To: apmail-ant-user-archive@www.apache.org Received: (qmail 20091 invoked from network); 1 Sep 2004 06:29:03 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 1 Sep 2004 06:29:03 -0000 Received: (qmail 94739 invoked by uid 500); 1 Sep 2004 06:28:51 -0000 Delivered-To: apmail-ant-user-archive@ant.apache.org Received: (qmail 94695 invoked by uid 500); 1 Sep 2004 06:28:50 -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 94680 invoked by uid 99); 1 Sep 2004 06:28:50 -0000 X-ASF-Spam-Status: No, hits=0.1 required=10.0 tests=HTML_60_70,HTML_MESSAGE,NO_REAL_NAME X-Spam-Check-By: apache.org Received-SPF: pass (hermes.apache.org: local policy) Received: from [193.109.238.66] (HELO dnsinet.rzf-nrw.de) (193.109.238.66) by apache.org (qpsmtpd/0.28) with ESMTP; Tue, 31 Aug 2004 23:28:50 -0700 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 i816SivR001588 for ; Wed, 1 Sep 2004 08:28:44 +0200 Received: by z011104.bk.fin.local with Internet Mail Service (5.5.2657.72) id ; Wed, 1 Sep 2004 08:28:45 +0200 Message-ID: <879A5AD5DD0ED511891F0003473A9B560E23F551@Z011004> From: Jan.Materne@rzf.fin-nrw.de To: user@ant.apache.org Subject: AW: Overriding a property and subsequently derived properties Date: Wed, 1 Sep 2004 08:28:44 +0200 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2657.72) Content-Type: multipart/alternative; boundary="----_=_NextPart_001_01C48FEC.EE52E3C0" X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N ------_=_NextPart_001_01C48FEC.EE52E3C0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable The manual to sais: Parameters inheritAll=20 If true, pass all properties to the new Ant project. Defaults to = true.=20 You should try it with setting to false. Otherwise ${Y} is set and cant = be changed because props are immutable. Jan > -----Urspr=FCngliche Nachricht----- > Von: Richard Grey [mailto:richard@haamdhani.com] > Gesendet am: Dienstag, 31. August 2004 19:19 > An: user@ant.apache.org > Betreff: Overriding a property and subsequently derived properties >=20 > I have two targets A and B in a single build.xml file. Both targets=20 > utilise a single property X which is set differently (via an=20 > environment > variable). > =20 > Normally, I would use a command line to set the environment=20 > variable and > call target A, then reset the environment variable and then=20 > call target > B. > =20 > All well and good, but I wish to automate this manual process. I've=20 > tried using a batch file with the above, but the batch file finishes=20 > completely after the first target completes. > =20 > So I thought I'd get Ant to do it for me from another target C. I've=20 > tried using and overriding property X, but my=20 > problem is that=20 > despite property Y being derived from X, property Y never=20 > changes when=20 > property X is overridden. > =20 > Follow ?! Is this expected ? Can anybody please help, or=20 > suggest what I=20 > could/should do to achieve what I want, ie property Y also changing ? > =20 > Obviously, this is a simplified test case, and just overrding=20 > property Y > isn't ideal. In the real world, I have a multitude of other=20 > properties=20 > derived from the "changing" original. > =20 > Thanks > =20 > -- > =20 > > =20 > > =20 > > =20 > > > =20 > > > > > =20 > > > > > =20 > =20 > > > > > > > > > =20 > > =20 > -- > =20 > > set MY_VARIABLE=3DZ > > ant -f temp.xml C > Buildfile: temp.xml > =20 > C: > =20 > A: > [echo] X is A > [echo] Y is Z/Y > =20 > B: > [echo] X is B > [echo] Y is Z/Y > =20 > BUILD SUCCESSFUL >=20 > Total time: 0 seconds >=20 >=20 ------_=_NextPart_001_01C48FEC.EE52E3C0--