|
RE: [Jython-users] jython scripting from Ant
From: Updike, Clark <Clark.Updike@jh...> - 2004-01-29 07:53
|
Apologies for taking this off on a tangent, but: I used Ant a while back, but after discovering jython, I've always suspected that jython would be a superior alternative (with or without any framework) to do the kinds of things that Ant does. And then I stumbled on this article: <http://today.java.net/pub/a/today/2003/06/10/jython.html> I'm curious if anyone has considered moving off of Ant or has actually moved off of Ant to jython, and if so, how have things played out? The only thing I saw in comment section was that you'd lose Ant's built-in target dependencies, but I'd imagine it would be relatively easy to replicate that (possibly just using imports). TIA, Clark -----Original Message----- From: Todd Moyer Sent: Thursday, January 22, 2004 10:54 AM To: jython-users@... Subject: [Jython-users] jython scripting from Ant I'm trying to run some jython scripting from within Ant like: <script language="jpython"> <![CDATA[ print "AAA" import sys from java.io import File from common.java.com.foo.jython.Rpt import Rpt bundle = project.getProperty ('bundle.name') fileset = project.createDataType ('fileset') format = project.getProperty ('srt.format') fileset.setDir (File(bundle)) fileset.setIncludes ('**/*.rpt') ... ]]> </script> It seems to be partially working, except for the "import Rpt". I don't seem to be able to import any of my code. It does seem to be walking the path correctly though, because misnaming one of the branches does produce an error telling you it can't find the misnamed branch. Any suggestions for what's going wrong or how to correct it. Cheers, Todd Moyer |
| Thread | Author | Date |
|---|---|---|
| RE: [Jython-users] jython scripting from Ant | Updike, Clark <Clark.Updike@jh...> |