ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeremy Crosbie <>
Subject Using existing taskdefs in custom tasks
Date Wed, 27 Jun 2001 18:04:26 GMT
I am fairly new to Ant so I apologize in advance if this has been brought up

I created my own task that uses the SQLExec task already provided as a sub
element. I have the following method in my class:

public SQLExec createSql()
    this.sql = new SQLExec();
    return this.sql;

It appears that the 'project' member of the SQLExec instance is not being
set causing a NullPointerException when the class is trying to make calls to
the logging facility. I get the same behavior when using "addSql(SQLExec

Am I doing something wrong? From looking at other classes it looks like it
is difficult to incorporate existing taskdefs as subelements for your own
tasks since there is no way to set the project, unless you subclass the
taskdef (e.g. subclass SQLExec) to include a constructor or method allowing
you to do so. 

Jeremy Michael Crosbie
Senior Software Engineer
go2Address: US.CA.IRV.GO2

View raw message