ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Yyy Xxx <>
Subject AW: Have you ever tried Jython with ANT?
Date Mon, 02 Sep 2002 15:18:36 GMT
Jython 2.1 works with ANT out of the box if you use

&lt;script language=&#34;jpython&#34; .../&gt;

i.e. Use &#34;jypthon&#34; as the language instead of
&#34;jython&#34; or &#34;python&#34;.

To answer a previous note, some advantages to using
&lt;script&gt; instead of &lt;java&gt; or &lt;exec&gt;
are that

(1) &lt;script&gt; can read and manipulate your ant
environment.  For example, jython can populate ant
datatypes such as FileSets and FileLists.  Somebody
asked about FTP and mappers recently.  A jython script
might be useful there.

(2) (I haven't verified this, please correct me if I'm
mistaken) &lt;exec&gt; and &lt;java&gt; reload the
jython classes at each invocation.  &lt;script&gt;
loads the jython library into the JVM.  Subsequent
&lt;script&gt;s do not require a reload.

Has anyone created ANT tasks or datatypes using
I would like to take my jython &lt;script&gt;s and
make them into tasks.  This would help greatly with
parameter passing and reuse.  I'd also like to define
&#34;user&#34; tasks that would be inherited in
&lt;ant&gt; and &lt;antcall&gt;s.

On 09/02/2002 05:54 AM &#34;Koegel, Michael&#34;
&lt;; wrote

I use Jython 2.1 with BSF 2.2 and it works fine.

Here's an article explaining how to do it:
You can get a allready patched version here:


-----Ursprüngliche Nachricht-----
Von: Alexey Solofnenko []
Gesendet am: Freitag, 30. August 2002 22:10
An: 'Ant Users List'
Betreff: Have you ever tried Jython with ANT?

BSF says it does support neither jython nor python.
What BSF should I use?


- Alexey.

Do You Yahoo!?
Yahoo! Finance - Get real-time stock quotes

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

View raw message