You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Oliver Schalch <ol...@wyona.com> on 2006/04/03 12:30:05 UTC
Calling ant targets from Java
Hi List,
I'm trying to bring up my Java app to call targets from *different*
build files.
I noticed somehow that I need a project.init() call, to initialize all
needed stuff, but that will set my projectsfile to build.xml and I need
2 different files.
Project project = new Project();
project.init();
ProjectHelper phelper = ProjectHelper.getProjectHelper();
/*phelper.parse(project, new File(buildxml));
project.executeTarget("init");
*/
phelper.parse(project, new File(buildgeneratedxml));
project.executeTarget(prepareAntTargets());
What I want is first calling from build.xml the init targets, thats
all, then after that is done, I need to call targets from the
buildgenerated.xml.
I'm not quite sure how I would do this, any hints and tipps are
apprentiaced...
Thanks,
Oliver
--
Oliver Schalch oliver.schalch@wyona.com
Wyona Inc. - Open Source Content Management - Apache Lenya
http://www.wyona.com http://lenya.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org