Return-Path: Delivered-To: apmail-ant-user-archive@www.apache.org Received: (qmail 65785 invoked from network); 17 Jan 2004 00:30:24 -0000 Received: from daedalus.apache.org (HELO mail.apache.org) (208.185.179.12) by minotaur-2.apache.org with SMTP; 17 Jan 2004 00:30:24 -0000 Received: (qmail 7701 invoked by uid 500); 17 Jan 2004 00:29:59 -0000 Delivered-To: apmail-ant-user-archive@ant.apache.org Received: (qmail 7673 invoked by uid 500); 17 Jan 2004 00:29:59 -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 7659 invoked from network); 17 Jan 2004 00:29:59 -0000 Received: from unknown (HELO ca-exch01.actional.com) (63.101.113.162) by daedalus.apache.org with SMTP; 17 Jan 2004 00:29:59 -0000 X-MimeOLE: Produced By Microsoft Exchange V6.0.6249.0 content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Subject: RE: is it possible to create targets dynamically? - Found Solution Date: Fri, 16 Jan 2004 16:30:06 -0800 Message-ID: X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: is it possible to create targets dynamically? Thread-Index: AcPceQ0ZyLGHkYlYRRWY0EcBSoOBsgAFoAsA From: "Michael Sunde" To: "Ant Users List" 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 Hi, It took a little while, but I found a way of creating targets = dynamically using javascript. Benefits of this approach: - can call the dynamic ant target from the command line like a standard = target. No need to set an extra property. - the target dependencies seems to work. A static target can depend on a = dynamically created target. scriptdef is impressive :> Thanks, Michael =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D build.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =09 @{name} target executed. =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D Output of Calling: ant =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D Buildfile: build.xml dynamic1: [echo] dynamic1 target executed. dynamic2: [echo] dynamic2 target executed. all: BUILD SUCCESSFUL Total time: 2 seconds =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D Output of Calling: ant dynamic3 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D Buildfile: build.xml dynamic3: [echo] dynamic3 target executed. BUILD SUCCESSFUL Total time: 2 seconds --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscribe@ant.apache.org For additional commands, e-mail: user-help@ant.apache.org