Bug 22428 - PATCH - option to run tasks inside a loop
Summary: PATCH - option to run tasks inside a loop
Status: NEW
Alias: None
Product: Ant
Classification: Unclassified
Component: Core (show other bugs)
Version: 1.5.4
Hardware: All All
: P3 enhancement with 1 vote (vote)
Target Milestone: ---
Assignee: Ant Notifications List
URL:
Keywords: PatchAvailable
Depends on:
Blocks:
 
Reported: 2003-08-14 15:52 UTC by Felipe Leme
Modified: 2009-07-31 03:21 UTC (History)
0 users



Attachments
Path for ant-1.5.4 (latest stable release) (1.98 KB, patch)
2003-08-14 15:52 UTC, Felipe Leme
Details | Diff
Path for main branch on CVS (not tested, as build is broken) (2.06 KB, patch)
2003-08-14 15:53 UTC, Felipe Leme
Details | Diff
Zip file with new patch and classes (4.36 KB, application/octet-stream)
2003-08-16 03:07 UTC, Felipe Leme
Details

Note You need to log in before you can comment on or make changes to this bug.
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...