Is there a tutorial on how to run Ant from Java? I got some code from here: Setting JAVA_HOME when running Ant from Java
But haven\'t been able to make it work. I\'v
Is there a tutorial on how to run Ant from Java?
Part of my answer to this question might help:
See this article and this article:
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());