ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mirko Raner <>
Subject Using Ant API to create build scripts
Date Tue, 08 Jul 2003 01:56:45 GMT
Hi all,

I am currently working on an IDE plug-in that also requires automatic 
generation of Ant build scripts.
I had a look at the Ant API and noticed that there are classes for 
Projects, Targets, Tasks, etc. which are essentially created and 
populated by the ProjectHelper/ProjectHelper2 classes with the help of 
the underlying XML parser. The API allows easy creation of a Project 
object from a build script, but there is no way to create a build script 
from a Project object that is held in memory - or is there?
As Ant is mainly a build tool, the current API design makes sense, but 
for my purpose, I need to go the other way round. Unfortunately, I 
noticed that the existing Project/Target/Task classes are not very 
helpful for me as they do not offer methods to produce XML output and 
don't expose the underlying DOM objects (and they sometimes do not even 
offer getter methods for all the information that would be required to 
create the corresponding XML element).
My questions are now:

(a) Is there something I am missing in the Ant API that would allow me 
to create a build.xml file from an initialized Project object?
(b) If not, does anybody think that such functionality would be useful 
and should be added to the Ant API?
(c) And if so, does anybody have suggestions how that should be 
integrated with the existing API? (for example, expose DOM objects in 
Project/Target/Task, or create a separate build script creator API)

Thanks a lot,


Mirko Raner
Software Engineer
San Diego, CA

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

View raw message