Attribute names can not have spaces in them. f they do the JVM will not load them. Remove the spaces and try again.
On Sat, 17 Nov 2001 05:58, Ylan Segal wrote: > 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:[EMAIL PROTECTED]> For additional commands, > > e-mail: <mailto:[EMAIL PROTECTED]> -- Cheers, Pete ------------------------------------------ I just hate 'yes' men, don't you Smithers? ------------------------------------------ -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>