ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sreejith.M.Janardhanan" <>
Subject RE: Updating in ant.jar for taskdefs
Date Wed, 17 Dec 2003 15:36:39 GMT

Hi Jan, 

That was great help!!

I did an <unjar>, <concat> and <jar update="true"> pointing to same directory
where the "" file was extracted. So, I didn't use <jar><zipfileset
prefix> for updating the jar. Hope I am on the right track. I thought I will share the
ant file for others too in the mailing list.

<target name="copy-ant-library" >
	<mkdir dir="${temp.dir}"/>
	<echo message="Extracting the files from ant.jar..."/>
	<unjar src="${ant.library}" dest="${temp.dir}/src" >
	        <include name="org/**/taskdefs/"/> 
	<concat destfile="${temp.dir}/src/org/apache/tools/ant/taskdefs/" append="true">
		<filelist dir="projects/anttasks" files="" />
	<copy file="${ant.library}" todir="${temp.dir}"></copy>
	<jar jarfile="${temp.dir}/ant.jar" basedir="${temp.dir}/src" update="true" />
	<echo message="Copying the updated ant library to plug-in project..."/>
	<copy file="${temp.dir}/ant.jar" todir="${plug-in-resource-sdk}" />
	<delete dir="${temp.dir}" />


-----Original Message-----
From: [] 
Sent: Wednesday, December 17, 2003 12:52 PM
Subject: RE: Updating in ant.jar for taskdefs

Why not 
   <taskdef file=""/>  ???

or with Ant 1.6 and namespaces

   <project xmlns:my="">

So you havenĀ“t to worry about to ensure that a modified Ant version is on
the machine.

I personally would reject modifying a tools only for lazyness :-)
But if you want that, then:
- extract the from the ant.jar (<unjar>)
- add your lines to that (<concat>, <echo append>)
- update the jar (<jar><zipfileset prefix>)

Maybe you will have problems with updating the jar using Ant because
Ant uses that jar for itself :-) 


> -----Original Message-----
> From: Sreejith.M.Janardhanan []
> Sent: Wednesday, December 17, 2003 8:13 AM
> To:
> Subject: Updating in ant.jar for taskdefs
> Hi,
> 	I want to append the following lines to end of file
> "" located in package 
> "org/apache/tools/ant/taskdefs"
> in "ant.jar" for avoiding writing taskdefs in all build files.
> # my custom tasks
> I don't want to build the ant project with new "". I
> am having ant.jar ready and just have to update 
> in it
> using a ant build file (probably from another properties file). Can
> anyone tell me how I can achieve this?
> Thanks in advance,
> Regards,
> ____________________________
> Sreejith M Janardhanan
> **********************************************************************
> The information in this message is confidential and may be legally
> privileged. It is intended solely for the addressee. Access 
> to this message
> by anyone else is unauthorized. If you are not the intended 
> recipient, any
> disclosure, copying, or distribution of the message, or any action or
> omission taken by you in reliance on it, is prohibited and 
> may be unlawful.
> Please immediately contact the sender if you have received 
> this message in
> error.
> **********************************************************************

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message