I use ant, svn, and ivy to handle this issue as well as for a generalized 
dependency mechanism.  Originally, my ant launcher script didn't do much more 
than configure a few env variables and launch ant.  But just like you, I needed 
a way to provide my users with updates.  I chose to use svn.  My entire ant 
installation with all of my custom build scripts are stored in svn.  A new user 
of the build system would first need to checkout a sandbox of that ant build 
system.  Then from then on, they can choose to update the sandbox whenever they 
want to receive my updates.  Or, their other option is to let the my enhanced 
ant launcher scripts perform the auto-update for them on every invocation.  The 
enhanced launcher scripts will perform an svn update of their build system 
sandbox (while still within the batch scripts) BEFORE ant starts so you don't 
have to worry about locked files on windows.  I use the java svn command line 
client (so that it works on all platforms) that is also checked into the ant 
build system sandbox.  To allow the user a choice of when to allow build system 
updates, he can set a special environment variable SYSTEM_UPDATE which 
determines whether the ant launcher scripts perform the auto-update on every 
invocation or not.  It not, it is up to the user to update it by manually 
running an svn update.

ivy is then used for all other kind of dependencies for the actual building of 
source code.

---
Shawn Castrianni

-----Original Message-----
From: Dominique Devienne [mailto:[email protected]] 
Sent: Thursday, July 29, 2010 8:42 AM
To: Ant Users List
Subject: Re: Bootstrap script, fetch prerequisites

On Thu, Jul 29, 2010 at 3:18 AM, Ludwig, Michael
<[email protected]> 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. 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. 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.

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

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

----------------------------------------------------------------------
This e-mail, including any attached files, may contain confidential and 
privileged information for the sole use of the intended recipient.  Any review, 
use, distribution, or disclosure by others is strictly prohibited.  If you are 
not the intended recipient (or authorized to receive information for the 
intended recipient), please contact the sender by reply e-mail and delete all 
copies of this message.

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to