ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Steve Loughran <ste...@apache.org>
Subject Re: declare tasks without taskdefs?
Date Thu, 02 Mar 2006 16:00:47 GMT
chuanjiang lo wrote:
> sorry this is with reference to this thread...
> 
> http://marc.theaimsgroup.com/?l=ant-user&m=110936710309732&w=2
> 
> correct me if im wrong
> 
> 1) Edit org.apache.tools.ant.taskdefs.defaults.properties in ant.jar to add
> in my custom task

very brittle. Avoid.

> 
> 2) Adding XML namespace into the <project> task.

or any other element, such as <target>

>    The jar file that im using would be in ant/lib

or any directory specified with -lib on the command line, added to ants 
classpath in the IDE, etc.

>    Do i need antlib.xml in the package too? if so, what should is antlib.xml

its in the docs, "antlib"  . You need it in the package declared with 
antlib, eg. antlib:org.example.mystuff

> ?
> 
> Is there any other ways?
> 

nope. But if you have a .properties file in a package, you can <taskdef> 
a set of tasks in one go.

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


Mime
View raw message