Jython 2.1 works with ANT out of the box if you use
<script language="jpython" .../>
i.e. Use "jypthon" as the language instead of
"jython" or "python".
To answer a previous note, some advantages to using
<script> instead of <java> or <exec>
are that
(1) <script> 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) <exec> and <java> reload the
jython classes at each invocation. <script>
loads the jython library into the JVM. Subsequent
<script>s do not require a reload.
Has anyone created ANT tasks or datatypes using
jython?
I would like to take my jython <script>s and
make them into tasks. This would help greatly with
parameter passing and reuse. I'd also like to define
"user" tasks that would be inherited in
<ant> and <antcall>s.
On 09/02/2002 05:54 AM "Koegel, Michael"
<Michael.Koegel@partner.commerzbank.com> wrote
----------------------------------
I use Jython 2.1 with BSF 2.2 and it works fine.
Here's an article explaining how to do it:
http://www.lonsteins.com/articles/jython-bsf.html
You can get a allready patched version here:
http://www.digisprings.com/jython/BSF.html
--MK
-----Ursprüngliche Nachricht-----
Von: Alexey Solofnenko [mailto:A.Solofnenko@mdl.com]
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
http://finance.yahoo.com
--
To unsubscribe, e-mail: <mailto:ant-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-user-help@jakarta.apache.org>
|