ant-user mailing list archives

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

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()
project.init()
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 
suceeds

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?

Thanks!

-steve
-- 


Stephen Nesbitt
Senior Configuration Management Engineer
The Cobalt Group
snesbitt@cobaltgroup.com
x8271

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


Mime
View raw message