Return-Path: Delivered-To: apmail-jakarta-ant-user-archive@apache.org Received: (qmail 21544 invoked from network); 5 Dec 2001 15:10:21 -0000 Received: from unknown (HELO nagoya.betaversion.org) (192.18.49.131) by daedalus.apache.org with SMTP; 5 Dec 2001 15:10:21 -0000 Received: (qmail 25931 invoked by uid 97); 5 Dec 2001 15:09:34 -0000 Delivered-To: qmlist-jakarta-archive-ant-user@jakarta.apache.org Received: (qmail 25860 invoked by uid 97); 5 Dec 2001 15:09:33 -0000 Mailing-List: contact ant-user-help@jakarta.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 ant-user@jakarta.apache.org Received: (qmail 25803 invoked from network); 5 Dec 2001 15:09:33 -0000 X-Authentication-Warning: bodewig.bost.de: bodewig set sender to bodewig@apache.org using -f To: ant-user@jakarta.apache.org Subject: Re: nested arguments References: <20011205145100.52024.qmail@web21206.mail.yahoo.com> From: Stefan Bodewig Date: 05 Dec 2001 16:02:46 +0100 In-Reply-To: Melroy Rodrigues's message of "Wed, 5 Dec 2001 06:51:00 -0800 (PST)" Message-ID: Lines: 81 User-Agent: Gnus/5.0807 (Gnus v5.8.7) XEmacs/21.4 (Civil Service) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N On Wed, 5 Dec 2001, Melroy Rodrigues wrote: > can I use a variable > ${appserver.${appserver.target}.home} in the build.xml > file No - no recursive property expansion in Ant. > and if not what is the equivalent. I'm not sure what you are trying to do here, I assume you want to define things like and use the above construct. I also assume that you want to use more than one property, otherwise and its nested element are your friend. The cleanest solution probably is something like and have property files for your different targets that define things like appserver.home. So you'd have two property files containing weblogic51.properties: ====================== appserver.home=foo and weblogic60.properties: ====================== appserver.home=bar Another option involves a property setting target for each value appserver.target can take: ... A pre-Ant 1.4 solution that works along the same line but doesn't need a condition task (but is a lot more hacky IMHO) would replace the check target with I prefer the property file version, it may scatter your properties into several files and it may be more difficult to keep them in sync when you add new properties (as you have to remember to change all files), but it makes the build file a lot easier to read. All IMHO, of course. Stefan -- To unsubscribe, e-mail: For additional commands, e-mail: