ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Simeon H.K. Fitch" <>
Subject Re: Integrating Ant into JBuilder
Date Wed, 17 Jan 2001 04:23:20 GMT
"Preston L. Bannister" wrote:
> I was looking for a way to run Ant from JBuilder
> and ran across AntRunner:


> Looking to call Ant a bit more directly I took the source
> of main() and coded direct calls to the Main() constructor
> and runBuild() only to find these are not public...


> What I'd like to do is make Main() and runBuild() public,
> and hook the output streams to feed directly into the IDE
> message window.
> Am I heading down the wrong path with Ant??

It is well known that Ant is very unfriendly when it comes to embedding
it/using it as an API. On Antidote, I've basically deferred doing
anything "elegant" relative to calling Ant until the core data model is

However, for another approach to calling Ant from inside another
application, look at the class, which is in the Antidote
source directory in CVS (jakarta-ant/src/antidote/...). In there you
will find a method called build() which launches a thread to execute a
build via the Ant "API". 

The way that Antidote is able to feed the output to a console window is
by registering a BuildListener with the Ant core and displaying the
event contents as they are fired. You will find the code to do this also
in the ProjectManager class. The code for the console window is in the

Good luck,


Mustard Seed Software

View raw message