ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Bodewig <bode...@apache.org>
Subject Re: Using existing taskdefs in custom tasks
Date Tue, 03 Jul 2001 07:04:21 GMT
Jeremy Crosbie <jeremy@go2.com> wrote:

> 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 sql)" instead.

Right, this is expected behavior.  You should use project.createTask
instead of instantiating SQLExec directly.

Stefan

Mime
View raw message