File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Jython/Python and the fly likes Jython and Ant Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Languages » Jython/Python
Bookmark "Jython and Ant" Watch "Jython and Ant" New topic

Jython and Ant

Mark Herschberg

Joined: Dec 04, 2000
Posts: 6037
Very often, I have a complex makefile system for my projects. These files are supplimented by perl scripts. It seems to me I could use Ant to replace make, and jython to replace the perl, and it would be better integrated. Has anyone tried antyhing like this? How has it worked?
Robert W Bill

Joined: Apr 08, 2002
Posts: 21
Oh yes. Some people are working on formalizing the best ways to plug Jython into ant. There's two parts to this- extending build scripts with Jython and adding ant tasks that will do the jythonc compilation of Jython scripts.
I expect all of this will be ready soon, and a great way to go for you.
Jim Yingst

Joined: Jan 30, 2000
Posts: 18671
My ant knowledge is quite shallow at the moment, so others can correct me as necessary - but it seems as though ant is powerful enough that there's a good chance you can replace a lot of your current build-related Perl scripts with... well... ant. Assuming that they're relatively simple tasks, but were beyond the capabilities of a makefile. You may well find you don't need to wait for a formal ant/Python integration to achieve your goals. Possibly worth looking into...

"I'm not back." - Bill Harding, Twister
Karthik Guru
Ranch Hand

Joined: Mar 06, 2001
Posts: 1209
I second your views. We did the build of the whole project using Ant. Am not sure as to how
complicated your project requirements are.
All of our code was in java. So it used to check out files from javac, ejbc and jar-ring and put in proper folders heirarchy under weblogic.
Thomas Paul
mister krabs
Ranch Hand

Joined: May 05, 2000
Posts: 13974
Ant is completely open so you can write all your own Ant tasks in Java.

Associate Instructor - Hofstra University
Amazon Top 750 reviewer - Blog - Unresolved References - Book Review Blog
Shad Gregory

Joined: Apr 16, 2002
Posts: 1
Do you know who is working on jython/ant integration?
Is there any code available yet? A taskdef for
jythonc would be sweet.
I agree. Here's the link:
subject: Jython and Ant
It's not a secret anymore!