ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ylan Segal" <>
Subject RE: How do you version jar files?
Date Fri, 16 Nov 2001 18:58:27 GMT
I thought it would be a good idea to add some stuff to the manifest file so
that later it could help me debug, so I did:

	<jar jarfile="${dist.home}/dcs.jar">
		<fileset dir="${}">
			<include name="**/dcs/**/*.class"/>
			<include name="**/db/*.class"/>
			<include name="**/util/*.class"/>
			<attribute name="Date of Build" value="${}"/>
			<attribute name="Build OS" value="${} version ${os.version} on
			<attribute name="Java Version" value="${}"/>
			<attribute name="Build Compiler" value="${build.compiler}"/>

The problem is that after I do this, the manifest file is created as
expected, but the jar doesn't work anymore. For some reason I get Class not
found errors when trying to access classes on the jar. If I remove the
<mainfest> from the <jar> task, then the generated jar works again.
What gives? What can I put there? I read the Jar Manifest section in the Jar
File Specificationand it says:
"In all cases for all sections, attributes which are not understood are
that is why I thought I could just use my own attributes.

Any ideas? I guess that the other thing I could do is generate a properties
file and included in the jar...


> build.xml
>  <jar jarfile="${dest1}/lib/app.jar"
> basedir="${dest}">
>  <manifest>
>          <attribute name="JarVersion" value="1.1"/>
>  </manifest>
>  </jar>
> manulay edit every build
> Manifest-Version: 1.0
> JarVersion: 1.1
> Created-By: Ant 1.4.1
> __________________________________________________
> Do You Yahoo!?
> Find the one for you at Yahoo! Personals
> --
> To unsubscribe, e-mail:   <>
> For additional commands, e-mail: <>

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

View raw message