You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Jeroen Breedveld <je...@x-hive.com> on 2002/12/04 17:36:54 UTC
Problem with typedefs
Hi all,
I created a custom type database and now I want to use the refid
attribute to reference a database I have declared in my init task.
However whenever I use it in a task I get a nullpointerexception because
for example the bootstrap parameter is null. What am I doing wrong? Do I
have to take special action for the refid attribute in my Database class
or does setRefid() from the superclass take care of all the action?
<target name="init">
<path id="basic.path">
<fileset dir="${xhive.dir}/build/lib">
<include name="xhive.jar"/>
<include name="dom3_intermediate.jar"/>
</fileset>
</path>
<taskdef loaderref="xhive"
resource="com/xhive/anttasks/tasks.properties"
classpathref="basic.path"/>
<typedef loaderref="xhive"
resource="com/xhive/anttasks/type.properties"
classpathref="basic.path"/>
<federation id="test.federation" bootstrap="${bootstrap}"
password="${superuserpassword}"/>
<database id="test.database" bootstrap="${bootstrap}"
name="${database}" user="${user}" password="${password}"/>
<database id="test.database2" bootstrap="${bootstrap}"
name="${database2}" user="${user}" password="${password}"/>
</target>
<target name="test-createlibrary" depends="init">
<createlibrary name="testLib">
<database refid="test.database"/>
</createlibrary>
</target>
Thanks,
Jeroen Breedveld
--
X-Hive Corporation
e-mail: jeroenb@x-hive.com
phone: +31 10 7108622
http://www.x-hive.com
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>