ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jeroen Breedveld" <jero...@x-hive.com>
Subject Problem with typedefs
Date Wed, 04 Dec 2002 16:36:54 GMT
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:   <mailto:ant-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-user-help@jakarta.apache.org>


Mime
View raw message