ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andy Kriger <andy.kri...@gmail.com>
Subject Re: How can I execute Ant targets from within a Java program?
Date Sun, 23 Jan 2005 18:38:36 GMT
I added in p.init() and now I get during the parse

java.lang.NullPointerException
at org.apache.tools.ant.Task.perform(Task.java:373)
at org.apache.tools.ant.Target.execute(Target.java:341)
at org.apache.tools.ant.helper.ProjectHelper2.parse(ProjectHelper2.java:133)


On Sun, 23 Jan 2005 18:58:40 +0100, Maik Dobryn <maik@dobryn.de> wrote:
> 
> 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.println(p.getBaseDir());
> >   System.out.println(p.getDefaultTarget());
> >  }
> >
> 
> Regards,
> 
> Maik
> 
> --
> 
>   Maik  D o b r y n
> ____________________________________________
> 
>   Email : maik@dobryn.de 
> ____________________________________________
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org 
> For additional commands, e-mail: user-help@ant.apache.org 
> 
>

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


Mime
View raw message