From user-return-64955-apmail-ant-user-archive=ant.apache.org@ant.apache.org Wed May 28 22:27:25 2008 Return-Path: Delivered-To: apmail-ant-user-archive@www.apache.org Received: (qmail 60779 invoked from network); 28 May 2008 22:27:25 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 28 May 2008 22:27:25 -0000 Received: (qmail 55300 invoked by uid 500); 28 May 2008 22:27:23 -0000 Delivered-To: apmail-ant-user-archive@ant.apache.org Received: (qmail 54973 invoked by uid 500); 28 May 2008 22:27:22 -0000 Mailing-List: contact user-help@ant.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Ant Users List" Reply-To: "Ant Users List" Delivered-To: mailing list user@ant.apache.org Received: (qmail 54959 invoked by uid 99); 28 May 2008 22:27:22 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 28 May 2008 15:27:22 -0700 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of Cyril.Sagan@sas.com designates 149.173.6.152 as permitted sender) Received: from [149.173.6.152] (HELO mercav04.na.sas.com) (149.173.6.152) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 28 May 2008 22:26:35 +0000 Received: from merchub01.na.sas.com ([10.19.20.24]) by mercav04.na.sas.com with InterScan Message Security Suite; Wed, 28 May 2008 18:26:49 -0400 Received: from MERCMBX14.na.sas.com ([10.19.20.114]) by merchub01.na.sas.com ([10.19.20.24]) with mapi; Wed, 28 May 2008 18:26:49 -0400 From: Cyril Sagan To: Ant Users List Date: Wed, 28 May 2008 18:26:40 -0400 Subject: How can I "conditionall chooise" a target implementation? Thread-Topic: How can I "conditionall chooise" a target implementation? Thread-Index: AcjBEeYtspS60b8lTxa9G3mpPeiwsQ== Message-ID: <345520A34347BA49B798F70B218ACD13055570535A@MERCMBX14.na.sas.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: acceptlanguage: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Virus-Checked: Checked by ClamAV on apache.org PROBLEM: I'm trying to develop a general build framework. In so doing, I need some mechanism for to provide a "conditional implementatio= n" for a target. We cannot solve this problem using . Can anyone suggest an implementation? Here's a couple ways that I tried, that almost work,... but do not. All use this simple build.xml: Failing attempt #1: This almost works, but doesn't because cannot be embedded inside a target!! arg! common.xml: Failing attempt #2: This would work, if Ant supported property expansion in the targets's depends attribute. common.xml: Failing attempt #3: Almost works, except the depends targets always excute... common.xml: This gets us closest to what we want, and would suffice if we could tolerate the : ...but we can't use antcall because it re-reads the *entire* build file. There's some fairly complicated init (that we don't have control of) that doesn't tolerate being called multiple times. I'd appreciate any suggestions from the experts! Thanks. --Cyril --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscribe@ant.apache.org For additional commands, e-mail: user-help@ant.apache.org