ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jacob Kjome <>
Subject Re: Article: Use Jython to Write Ant Tasks
Date Sat, 24 Apr 2004 05:10:26 GMT
At 09:26 PM 4/23/2004 -0600, you wrote:
>I've written a guide to writing Ant tasks using Jython:  how to add 
>scripted behaviour
>to ant builds. It details the steps to write a custom Ant task in jython, 
>it and install it into ant so it can be used as any other task in an ant 
>The article also takes a quick look at an alternate implementation using 
>And ... here is the url: .
>Ed Taekema
>Toronto, Canada

My first reaction is, why would one use a scripting language when you are 
going to compile it?   The reasons given are, one, so that there is no 
dependence on Jython, Groovy, or any other scripting language that the task 
was written in and, two, to avoid using <script> (ever heard of <scriptdef> 
and <macrodef>)?.  But then why wouldn't you write it in Java?  What 
advantage does this give you?  I must be really missing something.  You'd 
get the same functionality if you had written it in Java and none of this 
solves any of the downsides of Ant described in the abstract, which makes 
it odd to have even mentioned that stuff in the abstract.

Plenty of people extend Ant using scripting in Javascript, Jython, Groovy, 
etc... in order to provide make-like scripting capabilities, and the beauty 
of this is that the script itself can be modified without 
compilation.  Throw the scripting jars in ${user.home}/.ant/lib and forget 
about it.  Plus, with <scriptdef> and <macrodef>, execution of these 
scripts in the build looks no different than a normal ant task.

Basically, I wouldn't have commented if you had left out the comments about 
Ant not being an ideal build tool since it has little if anything to do 
with your core theme.  Beyond that, it is informative in showing people how 
to write/compile Java classes using Jython and Groovy.  You should have 
left it at that.


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

View raw message