ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael Ludwig <>
Subject Re: API for setting a property reference?
Date Thu, 14 May 2009 22:15:12 GMT
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: -->

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:
For additional commands, e-mail:

View raw message