You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Ir...@t-systems.com on 2008/05/27 11:49:17 UTC

Ant tasks

Hi All,

 

How to decide what are the different task definitions are required for
specific project and what classnames are required to implement these
tasks.

 

For example : <taskdef name="myjavadoc"
classname="com.mydomain.JavadocTask"/>

 

I really don't understand the meaning of above example.

 

Please help

 

Regards

Irfan.

 


AW: Ant tasks

Posted by Ja...@rzf.fin-nrw.de.
You already have. The built-in task are part of the distribution. Therefore
the name "built-in". They are described in the manual.

Jan 

> -----Ursprüngliche Nachricht-----
> Von: Irfan.Sayed@t-systems.com [mailto:Irfan.Sayed@t-systems.com] 
> Gesendet: Dienstag, 27. Mai 2008 12:09
> An: user@ant.apache.org
> Betreff: RE: Ant tasks
> 
> Thanks jan.
> 
> From where I can get the in-built tasks??
> 
> Regards
> Irfan.
> 
> 
> -----Original Message-----
> From: Jan.Materne@rzf.fin-nrw.de [mailto:Jan.Materne@rzf.fin-nrw.de] 
> Sent: Tuesday, May 27, 2008 3:32 PM
> To: user@ant.apache.org
> Subject: AW: Ant tasks
> 
> Usually you use the built-in tasks as <echo> <copy> <javac> etc.
> The mapping from these tasknames to their implementing 
> classes is done inside of Ant
> 	echo=org.apache.tools.ant.taskdefs.EchoTask
> 	...
> 
> If you need additional functionality you can use <macrodef> 
> and others for scripting
> them.
> 	<macrodef name="mytask"> ... </macrodef>
> 	<mytask/>
> 
> Another approach is using external libraries. Using -lib 
> option you extend Ants own
> classpath. The 2nd step is extending the taskname=classname 
> mapping. One possibility
> is using <taskdef>
> 	<taskdef name="mytask" classname="com.acme.MyTask"/>
> 	<taskdef name="other"  classname="com.acme.MyOtherTask"/>
> 	<mytask/>
> 	<other/>
> Having these mapping in a properties file (as Ant does) you 
> can also do a
> 	<taskdef file="anttasks.properties"/>
> 	<mytask/>
> 	<other/>
> Since Ant 1.6 you can also have "AntLibs". They provide an 
> antlib.xml which contains
> that mapping (and maybe more). AntLibs could be loaded using 
> antlib: protocoll handler and
> XML namespaces
> 	<my:mytask xmlns:my="antlib:com.acme"/>
> 	--> having a com/acme/antlib.xml on classpath
> 
> 
> Which tasks you really needs depends only on your personal 
> requirements.
> 
> 
> 
> Jan
>  
> 
> > -----Ursprüngliche Nachricht-----
> > Von: Irfan.Sayed@t-systems.com [mailto:Irfan.Sayed@t-systems.com] 
> > Gesendet: Dienstag, 27. Mai 2008 11:49
> > An: user@ant.apache.org
> > Betreff: Ant tasks
> > 
> > Hi All,
> > 
> >  
> > 
> > How to decide what are the different task definitions are 
> required for
> > specific project and what classnames are required to implement these
> > tasks.
> > 
> >  
> > 
> > For example : <taskdef name="myjavadoc"
> > classname="com.mydomain.JavadocTask"/>
> > 
> >  
> > 
> > I really don't understand the meaning of above example.
> > 
> >  
> > 
> > Please help
> > 
> >  
> > 
> > Regards
> > 
> > Irfan.
> > 
> >  
> > 
> > 
> 
> ---------------------------------------------------------------------
> 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
> 
> 

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


RE: Ant tasks

Posted by Ir...@t-systems.com.
Thanks jan.

>From where I can get the in-built tasks??

Regards
Irfan.


-----Original Message-----
From: Jan.Materne@rzf.fin-nrw.de [mailto:Jan.Materne@rzf.fin-nrw.de] 
Sent: Tuesday, May 27, 2008 3:32 PM
To: user@ant.apache.org
Subject: AW: Ant tasks

Usually you use the built-in tasks as <echo> <copy> <javac> etc.
The mapping from these tasknames to their implementing classes is done inside of Ant
	echo=org.apache.tools.ant.taskdefs.EchoTask
	...

If you need additional functionality you can use <macrodef> and others for scripting
them.
	<macrodef name="mytask"> ... </macrodef>
	<mytask/>

Another approach is using external libraries. Using -lib option you extend Ants own
classpath. The 2nd step is extending the taskname=classname mapping. One possibility
is using <taskdef>
	<taskdef name="mytask" classname="com.acme.MyTask"/>
	<taskdef name="other"  classname="com.acme.MyOtherTask"/>
	<mytask/>
	<other/>
Having these mapping in a properties file (as Ant does) you can also do a
	<taskdef file="anttasks.properties"/>
	<mytask/>
	<other/>
Since Ant 1.6 you can also have "AntLibs". They provide an antlib.xml which contains
that mapping (and maybe more). AntLibs could be loaded using antlib: protocoll handler and
XML namespaces
	<my:mytask xmlns:my="antlib:com.acme"/>
	--> having a com/acme/antlib.xml on classpath


Which tasks you really needs depends only on your personal requirements.



Jan
 

> -----Ursprüngliche Nachricht-----
> Von: Irfan.Sayed@t-systems.com [mailto:Irfan.Sayed@t-systems.com] 
> Gesendet: Dienstag, 27. Mai 2008 11:49
> An: user@ant.apache.org
> Betreff: Ant tasks
> 
> Hi All,
> 
>  
> 
> How to decide what are the different task definitions are required for
> specific project and what classnames are required to implement these
> tasks.
> 
>  
> 
> For example : <taskdef name="myjavadoc"
> classname="com.mydomain.JavadocTask"/>
> 
>  
> 
> I really don't understand the meaning of above example.
> 
>  
> 
> Please help
> 
>  
> 
> Regards
> 
> Irfan.
> 
>  
> 
> 

---------------------------------------------------------------------
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


AW: Ant tasks

Posted by Ja...@rzf.fin-nrw.de.
Usually you use the built-in tasks as <echo> <copy> <javac> etc.
The mapping from these tasknames to their implementing classes is done inside of Ant
	echo=org.apache.tools.ant.taskdefs.EchoTask
	...

If you need additional functionality you can use <macrodef> and others for scripting
them.
	<macrodef name="mytask"> ... </macrodef>
	<mytask/>

Another approach is using external libraries. Using -lib option you extend Ants own
classpath. The 2nd step is extending the taskname=classname mapping. One possibility
is using <taskdef>
	<taskdef name="mytask" classname="com.acme.MyTask"/>
	<taskdef name="other"  classname="com.acme.MyOtherTask"/>
	<mytask/>
	<other/>
Having these mapping in a properties file (as Ant does) you can also do a
	<taskdef file="anttasks.properties"/>
	<mytask/>
	<other/>
Since Ant 1.6 you can also have "AntLibs". They provide an antlib.xml which contains
that mapping (and maybe more). AntLibs could be loaded using antlib: protocoll handler and
XML namespaces
	<my:mytask xmlns:my="antlib:com.acme"/>
	--> having a com/acme/antlib.xml on classpath


Which tasks you really needs depends only on your personal requirements.



Jan
 

> -----Ursprüngliche Nachricht-----
> Von: Irfan.Sayed@t-systems.com [mailto:Irfan.Sayed@t-systems.com] 
> Gesendet: Dienstag, 27. Mai 2008 11:49
> An: user@ant.apache.org
> Betreff: Ant tasks
> 
> Hi All,
> 
>  
> 
> How to decide what are the different task definitions are required for
> specific project and what classnames are required to implement these
> tasks.
> 
>  
> 
> For example : <taskdef name="myjavadoc"
> classname="com.mydomain.JavadocTask"/>
> 
>  
> 
> I really don't understand the meaning of above example.
> 
>  
> 
> Please help
> 
>  
> 
> Regards
> 
> Irfan.
> 
>  
> 
> 

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