You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Jan Bartel <ba...@yahoo.de> on 2009/03/06 19:57:19 UTC
Invoking Ant programmatically by an String
Hi everybody,
I try to invoke ant programmatically.
At the moment I use the following code to invoke ant from a build.xml:
File buildFile = new File("build.xml");
Project p = new Project();
p.setUserProperty("ant.file", buildFile.getAbsolutePath());
p.init();
ProjectHelper helper = ProjectHelper.getProjectHelper();
p.addReference("ant.projectHelper", helper);
helper.parse(p, buildFile);
p.executeTarget(p.getDefaultTarget());
Is there any possibility to invoke ant by an Java-String without using a
real build.xml ???
Thank you for your suggestions
CU
Jan
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org