ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stuart Roebuck>
Subject RE: [suggestion] re: Bootstrapping Ant
Date Tue, 08 Aug 2000 13:59:32 GMT
On Tuesday, August 8, 2000, at 12:13 AM, Conor MacNeill wrote:

> Stuart,
> > -----Original Message-----
> > From: Stuart Roebuck []
> >
> >
> > I've probably got this wrong - It wouldn't be the first time!
> >
> > As far as I understand it, if you download the Ant source you have to
> > build it the first time using a two stage build process
> If you download a clean image from CVS, you can just type build. The build 
> scripts will recognize that lib/ant.jar is not present and perform the
> bootstrap automatically. The idea is to be like the other Jakarta projects. 
> The bulk of these seem to use build.bat/ to build the project.

Yes, but why create a wonderful cross platform tool like Ant with  
processor non-specific binaries and then use totally processor specific  
shell scripts to bootstrap the build.  It seem to me to be like saying,  
here's a new build tool to replace make, we suggest you use it for your  
projects, but we don't use it for ours.

Yes, the bootstrapping process builds and then utilises ant, but shouldn't  
we be aiming towards being able to avoid the build script altogether so we  
can run this thing on our Palm Pilot, or MacOS or whatever we happen to  
develop on whenever and wherever we happen to do it.

> > using two
> > different
> > shell scripts which are currently maintained to run under Windows and
> > Unix.  These scripts rely on the pre-existence of Java and the java
> > compiler.
> >
> I think ant itself, and not just the build scripts rely on the pre-existence 
> of Java and the java compiler. Not much we can do there :-)

I was clearly a bit brief on this point - you're not the only person to  
misunderstand me!

What I mean is, Ant assumes that we have Java in our machine - without it  
Ant is useless.  So why are we also relying on the existence of particular  
shell script interpreters as well?  If we use Java for the bootstrap we are  
cutting out a dependency that we may not need to have and making things  
more platform independent.

> > Why on earth are we using highly platform specific shell scripts
> > to build
> > a package that was created to allow cross platform builds to be platform 
> > non-specific?
> >
> If you look at the build script, you will see that it is mostly a front-end 
> to the ant scripts. They are not that complex. The ant scripts (ant.bat and 
> ant) are also platform specific but a highly convenient way to run ant. I 
> doubt you are suggesting we remove these platform specific scripts, are you? 

Yes - if at all possible.

I would hope that we could have ant working so that there is a binary  
distribution of ant as a jar containing all the required XML DOM/SAX/etc.  
libraries, that will launch with "java -jar ant.jar" (under Java 1.2+) or  
by an equivalent action under whatever GUI - Windows, X-Windows, MacOS X,  
Palm Application Menu, whatever;  and will build using some default (e.g.  
"build.xml") file located in the same place as the binary, or in the  
working directory.

I would hope that shell scripts would only be necessary to simplify  
launching, and as a flexible mechanism for setting preferences / properties  
differently from the working defaults. It would provide the wrappers to  
make it launch under pre: 1.2 Java VMs etc.

> > Why don't we insist that the CVS source includes a sufficiently
> > up to date
> > ant.jar (and required libraries) to be able to build itself using
> > itself.
> There are situations where an existing ant.jar will not be able to build a 
> new version of ant. Where a new feature is added to ant and also used in 
> ant's build.xml, it will always be necessary to bootstrap ant. This happens 
> rarely, but it does happen.

Okay, but in most cases a previous Ant should be able to build itself -  
and indeed making that happen is a fairly justifiable target.  However,  
even when it can't it should be possible to distribute an up-do-date binary  
that will.  Perhaps there is an argument here for an optional version tag  
on the build.xml file that would allow older versions of Ant to cleanly  
recognise that they're not up to the job, rather than outputing error  

> > This may make the source distribution larger but it seems to make a lot 
> > more sense to me at least!
> >
> > Any thoughts?
> >
> Having the ant.jar in CVS is unnecessary, so why bother? It is not that
> difficult to build ant purely from source.

The same could be said for the existence of Ant at all given that we  
already have makefile.

I think we should bother because tools like Ant provide the building  
blocks which enable as wide a developer community as possible to be  
involved in contributing to open source projects.  Why make it necessary  
for someone who doesn't live in a DOS window or on a Unix command-line to  
start trying to fathom the idiosyncrasies of csh or batch files when it  
just takes a little more effort on Ant to make that understanding  

Ant should, in my opinion, be no different from any other Jakarta project,  
and I think they should all rely as little as possible on shell scripts  
and as much as possible on Ant.


View raw message