ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Matt Benson <gudnabr...@yahoo.com>
Subject Re: API for setting a property reference?
Date Fri, 15 May 2009 01:57:09 GMT

Read the whole section about antlibs in the Ant manual under "Concepts and Types."

HTH,
Matt

--- On Thu, 5/14/09, Michael Ludwig <milu71@gmx.de> wrote:

> From: Michael Ludwig <milu71@gmx.de>
> Subject: Re: API for setting a property reference?
> To: "Ant Users List" <user@ant.apache.org>
> Date: Thursday, May 14, 2009, 5:15 PM
> 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: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
> 
> 


      

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


Mime
View raw message