ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Scott Moore" <scott.mo...@netdecide.com>
Subject Re: How do you version jar files?
Date Fri, 16 Nov 2001 19:22:26 GMT
I have no idea if this is the reason you are experiencing errors, but try
getting rid of the spaces in the names (e.g., instead of "Date of Build",
try "DateOfBuild").

Scott

----- Original Message -----
From: "Ylan Segal" <ylan@digiworks.tv>
To: "Ant Users List" <ant-user@jakarta.apache.org>
Sent: Friday, November 16, 2001 1:58 PM
Subject: RE: How do you version jar files?


> 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="${compile.to}">
> <include name="**/dcs/**/*.class"/>
> <include name="**/db/*.class"/>
> <include name="**/util/*.class"/>
> </fileset>
> <manifest>
> <attribute name="Date of Build" value="${formated.date}"/>
> <attribute name="Build OS" value="${os.name} version ${os.version} on
> ${os.arch}"/>
> <attribute name="Java Version" value="${ant.java.version}"/>
> <attribute name="Build Compiler" value="${build.compiler}"/>
> </manifest>
> </jar>
>
> 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
> ignored."
> 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...
>
> Thanks.
>
> >
> > 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
> > http://personals.yahoo.com
> >
> > --
> > To unsubscribe, e-mail:
<mailto:ant-user-unsubscribe@jakarta.apache.org>
> > For additional commands, e-mail:
<mailto:ant-user-help@jakarta.apache.org>
> >
> >
>
>
> --
> To unsubscribe, e-mail:   <mailto:ant-user-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail: <mailto:ant-user-help@jakarta.apache.org>
>


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


Mime
View raw message