ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter Donald <dona...@apache.org>
Subject Re: Uses of Antcall?
Date Sun, 17 Jun 2001 01:50:40 GMT
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:
>
>     <runservertests testURL="http://localhost:8080/test"
>         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               |
*-----------------------------------------------------*

Mime
View raw message