Return-Path: Delivered-To: apmail-jakarta-ant-dev-archive@jakarta.apache.org Received: (qmail 35955 invoked by uid 500); 17 Jun 2001 01:56:34 -0000 Mailing-List: contact ant-dev-help@jakarta.apache.org; run by ezmlm Precedence: bulk Reply-To: ant-dev@jakarta.apache.org list-help: list-unsubscribe: list-post: Delivered-To: mailing list ant-dev@jakarta.apache.org Received: (qmail 35946 invoked from network); 17 Jun 2001 01:56:33 -0000 Content-Type: text/plain; charset="iso-8859-1" From: Peter Donald To: ant-dev@jakarta.apache.org Subject: Re: Uses of Antcall? Date: Sun, 17 Jun 2001 11:50:40 +1000 X-Mailer: KMail [version 1.2] References: In-Reply-To: MIME-Version: 1.0 Message-Id: <01061711504007.00787@helm.realityforge.org> Content-Transfer-Encoding: 8bit X-Spam-Rating: h31.sny.collab.net 1.6.2 0/1000/N On Sun, 17 Jun 2001 11:16, Sam Ruby wrote: > jakarta-commons/cactus makes an "interesting" use of antcall. Here's an > example usage of an ant task that they provide: > > startTarget="start_tomcat_32" > stopTarget="stop_tomcat_32" > testTarget="tests"/> > > The key logic for this task is: > > public void execute() throws BuildException > { > try { > callStart(); > callTests(); > } finally { > // Make sure we stop the server > callStop(); > } > } > > The implementation of the various callXXX methods essentially works out to > be an antcall on the value specified by XXXtarget. okay. Thats the same way that it is used in the the other "flow" tasks like "case". Essentially each target is translated into a programming block and called by another task. *hopefully* these will be avoided via use of container tasks or the like. Cheers, Pete *-----------------------------------------------------* | "Faced with the choice between changing one's mind, | | and proving that there is no need to do so - almost | | everyone gets busy on the proof." | | - John Kenneth Galbraith | *-----------------------------------------------------*