ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bojan Smojver <>
Subject [PATCH + NEW FEATURE] AntCmd
Date Sun, 29 Apr 2001 12:07:35 GMT
Not sure if this exists somewhere other then Antidote, but I sometimes
(actually all the time) have the need to repeat small builds frequently
from the command line. Invoking a JVM every time is really slow and
makes Ant a bit painful at times.

So, I came up with a new class (, goes into
src/main/org/apache/tools/ant directory) which works together with (its runBuild() was changed from private to protected). It
basically waits for the input from the command line and then runs the
targets based on what you typed in. If nothing was typed (ie. you just
press <ENTER>) it executes the default target. Once you type '\q', it
exits (this might be a problem for people that have targets named '\q',
not many I would like to believe).

In practice, this brings repeated build times from say 11 - 12 seconds
to 0 - 4 seconds (AMD K6-2 350MHz, RedHat Linux 7, Sun's JDK 1.3.0_02),
especially after you've done it a few times, plus there is no delay in
starting the JVM, which is another few seconds.

The attached files:

  - the actual work class, replaces main() from
  - the runBuild() method has to be protected, not private
    in order for to work (not sure if I broke
    anything with this)
- antcmd and antcmd.bat:
  - scripts to start this new class (a changed copy of
    ant and ant.bat)
- build.xml.patch:
  - build file patch in order to make antcmd executable on Unix


PS. Have a feeling that 1.4alpha works faster then 1.3 for XSLT. Kudos
to all people that contributed to that...
View raw message