Return-Path: Mailing-List: contact ant-user-help@jakarta.apache.org; run by ezmlm Delivered-To: mailing list ant-user@jakarta.apache.org Received: (qmail 63135 invoked from network); 8 Aug 2000 21:36:12 -0000 Received: from e32.co.us.ibm.com (HELO e32.bld.us.ibm.com) (32.97.110.130) by locus.apache.org with SMTP; 8 Aug 2000 21:36:12 -0000 Received: from westrelay02.boulder.ibm.com (westrelay02.boulder.ibm.com [9.99.132.205]) by e32.bld.us.ibm.com (8.9.3/8.9.3) with ESMTP id RAA42458 for ; Tue, 8 Aug 2000 17:33:54 -0400 From: glennm@ca.ibm.com Received: from d53mta05h.boulder.ibm.com (d53mta05h.boulder.ibm.com [9.99.142.5]) by westrelay02.boulder.ibm.com (8.8.8m3/NCO v4.92) with SMTP id PAA160546 for ; Tue, 8 Aug 2000 15:36:02 -0600 Received: by d53mta05h.boulder.ibm.com(Lotus SMTP MTA v4.6.5 (863.2 5-20-1999)) id 87256935.0076A395 ; Tue, 8 Aug 2000 15:35:51 -0600 X-Lotus-FromDomain: IBMCA@IBMUS To: ant-user@jakarta.apache.org Message-ID: <87256935.0076A1E2.00@d53mta05h.boulder.ibm.com> Date: Tue, 8 Aug 2000 17:35:45 -0400 Subject: RE: another request for help.... Mime-Version: 1.0 Content-type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-transfer-encoding: quoted-printable X-Spam-Rating: locus.apache.org 1.6.2 0/1000/N If you check the docs, you will see that the ant task supportes nested property elements. =A0So to accomplish what you want, you can use =A0 =A0 =A0 =A0 Just make sure you haven't defined properties "first" and "second" anyw= here in the build file. If unit.xml is small with a single target (say "doit"), you may want to= consider using the antcall task. =A0 =A0 =A0 The antcall task is really calling the current buildfile again, with th= e target attribute the default target. =A0The advantage to doing it this = way is that everything is in one file. =A0 The drawback is that it isn't docum= ented yet (at least as far as I could see). Glenn McAllister TID - Software Developer - VisualAge for Java IBM Toronto Lab, (416) 448-3805 "An approximate answer to the right question is better than the right answer to the wrong question." - John W. Tukey Please respond to ant-user@jakarta.apache.org To: =A0 =A0 =A0 =A0ant-user@jakarta.apache.org cc: Subject: =A0 =A0 =A0 =A0RE: another request for help.... Well, what you suggest is exactly what I want to do, but properties are= immutable (See results of your suggestion below). =A0Property !=3D vari= able (I learned this the hard way :-). =A0The XML files are parsed to completio= n before they are invoked in any way, thus it really isn't possible to have a "variable" in the traditional sense. Any ideas on how we can have "variables" in Ant buildfiles? =A0Otherwis= e, I'm gonna hafta go running back to gnumake for a while :-( > So your global build file would be like : > > > > > > > > > > Hope you got what I'm getting at. > Yeah, here's an example buildfile snippet: =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 And this is the result (had to turn "verbose" on to see it): +Target: common_subject =A0 +Task: property Setting project property: first -> foo =A0 +Task: property Setting project property: second -> bar =A0 +Task: ant =A0 +Task: property [property] Override ignored for first =A0 +Task: property [property] Override ignored for second =A0 +Task: ant =A0 +Task: property [property] Override ignored for first =A0 +Task: property [property] Override ignored for second =A0 +Task: ant __________________________________________________ Do You Yahoo!? Kick off your party with Yahoo! Invites. http://invites.yahoo.com/ =