Bug 22428

Summary: PATCH - option to run tasks inside a loop
Product: Ant Reporter: Felipe Leme <t5jtjj502>
Component: CoreAssignee: Ant Notifications List <notifications>
Status: NEW ---    
Severity: enhancement Keywords: PatchAvailable
Priority: P3    
Version: 1.5.4   
Target Milestone: ---   
Hardware: All   
OS: All   
Attachments: Path for ant-1.5.4 (latest stable release)
Path for main branch on CVS (not tested, as build is broken)
Zip file with new patch and classes

Description Felipe Leme 2003-08-14 15:52:11 UTC
Hi,

I'm submitting a quick patch that enable ant to run in a loop mode (through the
parameter -loop). 

In this mode, once the tasks are finished, ant will wait for the user to press
Enter to run the tasks again or q to quit.

This is pretty useful in situations where a task must be performed many times in
a short period of time - like redeploying modified JSP pages to a web container.
Usually the task itself is almost instantaneous, but it takes about 5-6 seconds
using the regular ant - this overhead is caused mostly by the JVM invocation.
With this patch, the new tasks are executed pretty fast, asshown below:



ant -loop copy_web_oc4j
Buildfile: build.xml

copy_web_oc4j:
     [copy] Copying 1 file to /home/felipeal/eInquiry/build/deploy/oc4j/CSNAPP

BUILD SUCCESSFUL
Total time: 2 seconds // first evocation, took 2 seconds

Press Enter to continue or q + Enter to quit


copy_web_oc4j:
     [copy] Copying 1 file to /home/felipeal/eInquiry/build/deploy/oc4j/CSNAPP

BUILD SUCCESSFUL
Total time: 0 seconds // sub-sequent iterations: 0 seconds

Press Enter to continue or q + Enter to quit


I'm submitting 2 patches: 1 for ant 1.5.4 and other for the main branch, but I
couldn't test the 2nd one - my guess is that the main build is broken at the
moment...

Felipe
Comment 1 Felipe Leme 2003-08-14 15:52:50 UTC
Created attachment 7822 [details]
Path for ant-1.5.4 (latest stable release)
Comment 2 Felipe Leme 2003-08-14 15:53:18 UTC
Created attachment 7823 [details]
Path for main branch on CVS (not tested, as build is broken)
Comment 3 Felipe Leme 2003-08-14 15:54:53 UTC
(changed description)
Comment 4 Felipe Leme 2003-08-16 03:07:37 UTC
Created attachment 7842 [details]
Zip file with new patch and classes
Comment 5 Felipe Leme 2003-10-08 00:31:25 UTC
test
Comment 6 Felipe Leme 2003-10-08 00:34:50 UTC
testing my email agains spam - please disconsider...