John Francis schrieb am 12.05.2009 um 17:24:44 (+0100):

>  given a build.xml ...
> 
> <project name="Test" default="test" basedir=".">
>       <target name="test">
>               <property name="param" value="123" />
>               <namespace.MyTask/>

> And  the java code for the task ...
> 
> package namespace;

> public class MyTask extends Task

I had to add a <taskdef> in order to get this to run:

  <taskdef name="namespace.MyTask" classname="namespace.MyTask"/>

It could also have been:

  <taskdef name="my-task" classname="namespace.MyTask"/>
  <!-- and then call it like this: -->
  <my-task/>

Is there some auto-lookup feature for classes that attempts dynamic
class loading for something like <namespace.MyTask/>, i.e. element name
corresponding to classname?

Or did you just omit the <taskdef> for brevity?

Michael Ludwig

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to