ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stephen Nesbitt <>
Subject Calling Ant from Java program - Help with ProjectHelper class!
Date Wed, 07 Sep 2005 02:24:49 GMT

I am trying to invoke an Ant build from within a java program. The build 
system itself includes both:
- a namespace declarations (<project xmlns:ivy="antlib:fr.jayasoft.ivy.ant") - 
- an <import task.

From what I can gather, the basic sequence for invoking ant is the following:
project = new Project()
helper = ProjectHelperxxx()
helper.parse( ant, File(<buildfile>))

The API docs reference 2 helpers - ProjectHelper2 and ProjectHelperImpl. I 
can't get either to work. 

If I use ProjectHelperImpl the parse fails with an "Unexpected attribute 
"xmlns:ivy" error. If I remove the remove the namespace declaration the parse 

If I use ProjectHelper2 then I avoid the namespace error, but the import fails 
with a null pointer exception and an unknown element error.

Anybody have any clues/hints on what I am missing?



Stephen Nesbitt
Senior Configuration Management Engineer
The Cobalt Group

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message