ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dark Before Dawn <dark.before.d...@gmail.com>
Subject Programatic ANT: Export Build.xml
Date Fri, 17 Jun 2011 04:31:46 GMT
Hi there,
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?

CodeSnippet:

         Project p = new Project();
         p.setName("test");
         p.setDefault("test");

         Target t = new Target();
         t.setName("test");

         Echo e = new Echo();
         e.setMessage("huhu");

         t.addTask(e);

         p.addTarget(t);

         // export to C:\build.xml

Cheers
Darky

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


Mime
View raw message