Re: How can I execute Ant targets from within a Java program?

2005-01-23 Thread Maik Dobryn
Andy, what if You try to keep the buildfile as simple as possible? Then, step by step You add more complexity like imports etc. Maik On Sunday 23 January 2005 20:51, Andy Kriger wrote: > > ... > > > The project does have an import element . But the code does not even > seem to be reaching th

Re: How can I execute Ant targets from within a Java program?

2005-01-23 Thread Maik Dobryn
Andy, are You sure about the presence of both, the base directory and the default target definition in Your build.xml file? For example: Maik On Sunday 23 January 2005 19:38, Andy Kriger wrote: > I added in p.init() and now I get during the parse > > java.lang.NullPointerException > at org

Re: How can I execute Ant targets from within a Java program?

2005-01-23 Thread Maik Dobryn
Hi Andy, On Sunday 23 January 2005 15:37, Andy Kriger wrote: > >public static void main(String[] args) { > ProjectHelper ph = ProjectHelper.getProjectHelper(); > Project p = new Project(); try: p.init(); > ph.parse(p, new java.io.File("build.xml")); > System.out.printl

Re: how to invoke ant via java

2005-01-19 Thread Maik Dobryn
Hi vivek, have a look at the following class. Best regards, Maik import java.io.File; import org.apache.tools.ant.*; public class AntExecuterImpl { private String buildFileName; private String executeTarget; private String buildDir = ""; private String property = ""; public