ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter.FL...@syntegra.com
Subject RE: Jar task
Date Fri, 20 Jul 2001 14:08:26 GMT
> Yup. I modified the Zip task (from which Jar inherits) to 
> allow updates.
> If you get hold of the latest sources for 1.4, I believe it 
> should be in
> there - you just need update="true" as a parameter along with 
> the normal
> manifest specification. I think that should be enough... let 
> me know if
> you have any trouble with it.

Hi Jon,

Thanks for the speedy reply!

I downloaded the 1.4alpha that was built last night, and used the
update="true" flag.  However, the problem is that I want to use jar with the
update but also with the M option.  The M does not create a manifest for the
entries.

My ANT task looks like the following:

<target name="patchManifest" depends="init, jar">
	<echo message=" Patching jar file with original manifest."/>
	<delete dir="${src}/META-INF"/> 
	<mkdir  dir="${src}/META-INF"/> 
	<copy file="${dist}/server.mf"
tofile="${src}/META-INF/MANIFEST.mf"/>
        	<jar jarfile="${dist}/server.jar" update="true"
compress="false" basedir="${src}">
            	<include name="META-INF/MANIFEST.mf"/>
	</jar>
	<delete dir="${src}/META-INF"/> 
</target>

Obviously, when this runs I get a warning:
[jar] Warning: selected jar files include a META-INF/MANIFEST.mf which will
be ignored (please use manifest attribute to jar task)

If I leave it blank, it jars everyhing from ${src} downwards.

Is the M option supported/going to be supported?  Or would it be better to
use the ZIP ant task for this?

Regards,
Peter


********************************************************************

This email may contain information which is privileged or confidential. If you are not the
intended recipient of this email, please notify the sender immediately and delete it without
reading, copying, storing, forwarding or disclosing its contents to any other person
Thank you

Check us out at http://www.syntegra.com

********************************************************************

Mime
View raw message