ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jonathan gold <>
Subject programmatically creating and marshalling antfiles
Date Sat, 06 Aug 2005 22:03:56 GMT
are there libraries i've somehow missed in the ant api that allow me to 
take a Project object i've built programmatically and write it as an 
antfile to some OutputStream?

to give some context: as part of our buildsystem, i'm pulling packages 
and setting up directories and workspaces (using ivy and the like), and 
want to generate antfiles to do the builds. these antfiles need to 
contain (or import) the <path> objects inferred from the ivy pull. at 
the moment, i'm just building the antfile as a org.w3c.dom.Document, but 
would prefer to just do something like:

     Project proj = new Project();
     Path classPath = createClassPath( ... );
     ProjectWriter pw = new ProjectWriter();
     pw.writeProject( proj, someOutputStream );

but i don't see an easy way in the ant api to do this right now. if it's 
not there, and i'm missing it, is there interest in having me start some 
work on it?

incidentally, i tried searching for an answer to this question on some 
search engines, but the search terms make it a bit difficult, since 
searches for things like 'antfile writer', 'ant file writer', 'ant 
project marshaller' and 'ant project serializer' give results more about 
writing ant tasks (ie, 'joe the "ant" task "writer" ... ) and xml 
processing in general. anyway, i apologize if this has already been 
discussed, and would be happy to have a pointer to that previous 
discussion if such exists...


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

View raw message