ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dominique Devienne <ddevie...@gmail.com>
Subject Re: Programatic ANT: Export Build.xml
Date Fri, 17 Jun 2011 15:13:26 GMT
On Thu, Jun 16, 2011 at 11:31 PM, Dark Before Dawn
<dark.before.dawn@gmail.com> wrote:
> I would like to use apache-ant-1.8.2 in JavaSE, to generate build.xml Files
> dynamically. Is there a way to export a Project Object as xml File via
> Writer/Stream?

Nope. And I don't think it's possible (or easy) to do either, at least
in the generic case.

IMHO you're better off building an in-memory DOM tree for the
build.xml and serializing that instead.

Ant has no real concept of an AST that'd represent the full build file
"info set" like typical compilers, from which it would be easy to
"printy print" back to a text file.

Thanks, --DD

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message