ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Oliver Schalch <oliver.scha...@wyona.com>
Subject Calling ant targets from Java
Date Mon, 03 Apr 2006 10:30:05 GMT
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


Mime
View raw message