ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael Ludwig <>
Subject Re: Bootstrap script, fetch prerequisites
Date Thu, 29 Jul 2010 21:03:15 GMT
Dominique Devienne schrieb am 29.07.2010 um 08:42 (-0500):
> On Thu, Jul 29, 2010 at 3:18 AM, Ludwig, Michael
> <> wrote:
> > What's the best way to bootstrap an Ant script installation? [...]
> > (One thing I personally dislike is checking JARs into your version
> > control system, [...]
> Well, Ant has no built-in bootstrap mechanism.
> Build scripts are typically under version control, but they might use
> support files (typically imported) from other modules of the VCS, and
> they might use JARs downloaded from somewhere or under VCS themselves.

Exactly. My Ant script will be under version control along with the
project it helps build. I'm just a little recuctant to put external
JARs under version control as well.

> If you run checks to verify for new versions of files/JARs implicitly
> on every build, you run the risk of slowing down all builds, and
> surprising your users for changes they didn't want, so I find it nicer
> to have an explicit target(s) to do the checking and updating
> explicitly.

Same thinking here. The idea is:

          (o o)
ant new-fangled-target
# horrible callstack shows up
# notice at the end to PLEASE RUN *ant self-update*
ant self-update
# fetches dependencies not under VCS, does whatever is needed
# give it another try
ant new-fangled-target
# now working

> But even that can fail, especially on Windows, since you can't update
> JARs ANT is currently using, and you can't easily force ANT to use a
> new version of a JAR that was just updated.

Well, it wouldn't have to be in one and the same run. First update, then
use new JARs the next time around.

> I believe that bootstrapping is possible, but I think it would require
> changes in Ant to possibly restart a new VM using new JARs for
> example, or at least rerun itself into a completely different class
> loader (and a way to update JARs already in use on Windows). Didn't do
> it myself. --DD

If it turns out to be too complicated, I'll include a Perl or VBS
script, that'll do the job!

Thanks for your thoughts!
Michael Ludwig

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message