Maybe it is better not to write the project at all, but construct it
on a fly and execute it right a way. Of cause, if project creation is
slow, you might want to cache the result. In that case, maybe you can
log all actions in your own format and do not create ANT XML.

- Alexey.


On 8/6/05, jonathan gold <[EMAIL PROTECTED]> wrote:
> 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...
> 
> 
> jon
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 


-- 
Alexey N. Solofnenko trelony at gmail.com
home: http://trelony.cjb.net/
Pleasant Hill, CA (GMT-8 hours usually)

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to