ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dominique Devienne <ddevie...@gmail.com>
Subject Re: run script after ant finished
Date Thu, 02 Jul 2009 14:50:52 GMT
On Wed, Jun 24, 2009 at 11:17 AM, Shawn
Castrianni<Shawn.Castrianni@halliburton.com> wrote:
> Correct, I need something after the ANT VM has exited.

Weiji's solution of running Ant twice from the outside script is the
easiest, provided it can be used, which may not be the case when it's
an IDE that runs the Ant script for example. There may be a possible
solution involving the Ant launcher and class loading. Ant has a very
small executable jar containing the launcher class and which can (and
does) manipulate the classpath Ant "proper" will be using. You could
code the update boostrap step directly into the launcher,
independently of the build itself, although that does hide it since
would now live in code. The advantage of this approach is that you can
do the update before Ant has really started and any jars are locked by
the VM on Windows. If you really want to run two builds, but in the
same VM, you could even try to play tricks with classloaders,
downloading the new jars under a different name, routing to these jar
using a custom class loader on the second run, and next time trying to
rename them. But this is getting into the weeds, and may not play well
with IDE integration again. I just wanted to point out that there's
good opportunity for customization in Ant's launcher, like when I
added support for -- arg0 arg1 arg2 ... --DD

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message