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 27660 invoked from network); 6 Feb 2003 15:37:45 -0000 Received: from junior.lgc.com (134.132.72.99) by daedalus.apache.org with SMTP; 6 Feb 2003 15:37:45 -0000 Received: from lgchvw01.lgc.com (lgchvw01.lgc.com [134.132.93.107]) by junior.lgc.com (8.11.3/8.11.3) with SMTP id h16FagB07696 for ; Thu, 6 Feb 2003 09:36:42 -0600 (CST) Received: from 134.132.93.152 by lgchvw01.lgc.com (InterScan E-Mail VirusWall NT); Thu, 06 Feb 2003 09:37:47 -0600 Received: by lgchexchbh.ad.lgc.com with Internet Mail Service (5.5.2653.19) id <1C7N7D4G>; Thu, 6 Feb 2003 09:37:47 -0600 Message-ID: From: Dominique Devienne To: "'Ant Users List'" Subject: RE: Date: Thu, 6 Feb 2003 09:37:45 -0600 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2653.19) Content-Type: text/plain X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N I'll take that back. is also affected by cycles, leading to an infinite loop between aTarget and bTarget (ends up in a StackOverflowError). But then, the principal goal of is to be able to override some properties, so the target ant-called can do something else than it did the first time. By using , you cannot overwrite properties, so cannot parameterize the called target. I think I'm missing something here. --DD -----Original Message----- From: Dominique Devienne [mailto:DDevienne@lgc.com] Sent: Thursday, February 06, 2003 8:54 AM To: 'Ant Users List' Subject: RE: Yes, Centipede as one I believe. The reason it's not in Ant is that it throws off the checks for circular dependencies between targets. Simply consider: Your or Centipede do make build faster, but not safer. The right approach would be to make lean and mean, by for example not reparsing the build file, and Costin's made some progress in that regard. Also not having the copy too much state from the parent Project to the child Project would be good (by having additional/overridden state in the child take priority over the Parent state). So in short, it's all up to you to decide what is important to you! Every situation is different of course; by the more I learn about Ant, the less I need to rely on for my own builds... Does this help? --DD -----Original Message----- From: didge [mailto:didge@foundrylogic.com] Sent: Wednesday, February 05, 2003 6:57 PM To: Ant Users List Subject: Has anyone written a Task that would be to CallTarget as exec is to fork in unix? That is, unlike CallTarget which essentially re-inits the project, 'ExecTarget' would simply execute the named target. I can't find anything like it in the ant 1.5.1 source or in my internet searching. For example: ... In my projects, I have some deeply nested s and I was shocked at how much faster my build ran when I used this ExecTarget implementation instead: import org.apache.tools.ant.*; /** * Exec another target in the same project. * *
 *    <target name="foo">
 *      <antexec target="bar" />
 *    </target>
 *
 *    <target name="bar" depends="init">
 *      ...
 *    </target>
 * 
* * * @author didge * * @ant.task name="antexec" category="control" */ public class ExecTarget extends Task { private String target; public String getTarget() { return target; } public void setTarget(String target) { this.target = target; } public void execute() throws BuildException { project.executeTarget(target); } } Are there any reasons why I wouldn't want to do this, assuming that I want to be able to side affect my project and I don't want the overhead of re-init'ing? Dave Masser-Frye didge@foundrylogic.com --------------------------------------------------------------------- To unsubscribe, e-mail: ant-user-unsubscribe@jakarta.apache.org For additional commands, e-mail: ant-user-help@jakarta.apache.org