ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Steve Loughran <ste...@apache.org>
Subject Re: Doing Ant builds
Date Fri, 12 Jun 2009 10:49:48 GMT
Michael Ludwig wrote:
> Ina, Antoine schrieb am 11.06.2009 um 19:58:37 (+0200):
>> I am posing a general question about Ant vs Make vs Batch:
>> 1- What is advantage of Ant script over regular Batch script that
>> calls up the solution files for all the projects in your system tree
>> of projects(for Windows platform)
> 
> Now what's a "regular Windows batch script"? I like cmd.exe, but come
> on, you don't want to program in that language, using GOTO and all that
> stuff.
> 
> So you'd use WSH with VB, Perl, or whatever.
> 
> But then, WSH is no more cross-platform than CMD/BAT files.



> For Java, you really want and need a cross-platform solution. The other
> day on this list, I wondered why back then, they didn't simply choose
> Perl or Python, which were and still are very good cross-platform tools.
> 
> Well, why not? :-)
> 
> First, Java was Java and couldn't possibly reuse, of all things, Perl.

I will point out that my first contrib to this project was a perl script.

> (Although it would have worked very, very well for general purpose OS
> and network and mail and whatnot stuff.)

Actually its pretty tricky to write to x-platform perl, ruby or python, 
just as it is to do it well in java too.

> 
> Then, bootstrapping Java by Java certainly has advantages.

Ant is a language primarily for Java projects. Basing it on Java is not 
just an ideological purity game, but the only way to get at those 
internal bits of the JDK in the same process. all the original JDK 
library tasks: javac, javadoc, rmic, etc do this: we go in and use the 
underlying code.

> 
> But why the clunky XML syntax? When Ant was conceived, XML was a hot
> new thing, the final solution to almost everything, so doing XML was en
> vogue.

I know its easy to dismiss it now, but it does have strengths
-any XML editor can work with it
-easy to use with XSLT operations

The XML editing meant that before IDEs had explicit support for the 
semantics of Ant (properties, target dependencies), they could let you 
edit it in a structured manner.


> 
> Language design and syntax coherence probably weren't top priorities.

agreed.  However, we do strive to be more declarative than fully 
procedural languages, we don't have loops and so lack full 
turing-equivalence. There are also limits to what you can do in java

Notice how Ant deliberately leaves out all fault handing too. Not a full 
workflow language based on something formal like Milner's Pi-calculus, 
obviously.

> 
> Somehow, Ant was adopted. How did it happen, and why? Does anyone know?

ant was written by James Duncan Davidson while sun was opening up 
Tomcat, moving it from a sun project which used make to something for 
anyone to use. Ant was a solution to a tooling problem.

1. There was no open source IDE at that time, open source projects 
couldnt mandate a single IDE the way in-house java teams could.

2. there was no way open source projects could mandate a single platform 
for the same reason. Today, I'd say "linux 1st, other unixes second, 
ignore windows" -this is effectively what Hadoop does.

3. It turned out to offer a profound advantage over IDEs. The lack of an 
IDE meant no debugger. All we had left was testing, and as JUnit came 
out at the same time, the <junit> task got written, and the world became 
a better place. Before then testing wasn't that mainstream, you sat in 
front of the IDE and debugged. Now you add tests and wait for email from 
the CI tool.

> 
> Today, you could also consider shifting off programming work (if you
> have to do any) from Ant to Python or JRuby scripts, as there are Java
> implementations of these languages. (Still no Perl.)
> 

There is a bit of perl in Ant, still works.

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


Mime
View raw message