| Problems with API ProjectHelper | Problems with API ProjectHelper 2003-03-25 - By Oliver Alth
Hello,
I am trying to use the ProjectHelper.configureProject() Method to build up a project object with an build.xml file. When I call this method, it recognizes only one target in the buildfile with the getTargets() Method. This is not true, I have got two targets. Can anybody tell me what i am doing wrong?
Here's my build.xml file:
<project name="built_in_types" default="rexx" basedir=".">
<!-- Please define here the basedirs where the tools have to be executed --> <property name="rexx.dir" value="tools/rexx"/> <property name="gnuc.dir" value="tools/gnuc"/>
<!-- This property can/must be overriden when calling a task inside this file. It serves Xtcm to specify arguments that the specific task needs -->
<property name="ext.progname" value=""/> <property name="ext.arguments" value=""/> <!-- Regedit Builtin Type -->
<target name="regedit"> <exec executable="regedit" dir="/windows/system32" vmlauncher="false"> <arg value="jdsk"/> </exec> </target>
<!-- Rexx Builtin Type --> <target name="rexx"> <exec executable="rexxrun" dir="${rexx.dir}" vmlauncher="false"> <arg value="${ext.progname}"/> <arg line="${ext.arguments}"/> </exec> </target> </project>
And here's the java code.
public void test(String configFile) {
project = new Project(); project.init(); project.setUserProperty( "ant.file" , new File(configFile).getAbsolutePath() ); ProjectHelper.configureProject(project, new File(configFile)); System.out.println("");
}
Thanks, Oliver
__________________________________________________________________ IBM Deutschland Entwicklung GmbH, Sch?naicher Str. 220, D-71032 B?blingen eServer Software Management, D4357, Intern: 7103-06, Tel. 902-2790, Tel.: ++49-(0)7031-16-4280, Fax.: 07031-16-2790 Internet: OALTH@(protected)
|
|
 |