ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Bodewig <bode...@apache.org>
Subject Re: No public execute() in class org.apache.tools.ant.taskdefs.optional.junit.JUnitTest
Date Wed, 09 Jul 2003 06:38:03 GMT
On Tue, 8 Jul 2003, Mich F. <michf000@yahoo.com> wrote:

> I've been using Ant 1.4 for my project, and have this in my
> build.xml:
>  
>  <taskdef name="test"
>  classname="org.apache.tools.ant.taskdefs.optional.junit.JUnitTest"
>  />
>  
> this worked fine

unless you ever tried to use the task named <test>, right?

> until I tried to upgrade to Ant 1.5.3, I got the error:
>  
> Trying to override old definition of task test

Means that Ant already knows a task named test and will now use your
definition instead of the built-in one.

> No public execute() in class
> org.apache.tools.ant.taskdefs.optional.junit.JUnitTest

Means just that.

<taskdef> defines a task and tasks must have a public execute()
method.  The class you've named doesn't have one, it is no task at
all.  Ant 1.5 has become a little pickier and checks the task when you
define it, as opposed to when you run it.

The JUnit task is implemented by the class JUnitTask in the same
package, BTW.

Stefan

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message