You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Philip Crotwell <cr...@seis.sc.edu> on 2003/10/08 22:59:09 UTC
shortDescription in Specification-Title in Manifest
We upgraded from beta10 to rc1 and now java is unable to load classes
out of the jar file that maven creates. After quite a bit of puzzling,
we figured out that the problem is related to the shortDescription from
the POM being put into the Specification-Title in the jar manifest.
Our shortDescription looked like this:
<shortDescription>
Global Earthquake Explorer, an education and outreach tool for
seismology.
</shortDescription>
When running maven, the jar:jar goal does output this error, but the
jar is still created. Given the BUILD SUCCESSFUL, I presume that jar is
not letting maven know that there was a (potentially) serious error.
jar:jar:
[jar] [ERROR] Manifest is invalid: Manifest line "Global Earthquake
Explorer, an education and ou" is not valid as it does not contain a
name and a value separated by ': '
[jar] error while reading original manifest: Invalid Manifest: null
[jar] Building jar:
/Users/crotwell/Development/gee/target/gee-2.0.1beta.jar
BUILD SUCCESSFUL
The manifest looks like this in the jar file:
Specification-Title:
Global Earthquake Explorer, an education and out^M
reach tool for seismology.
^M
Note it is on 4 lines.
So, the linefeeds in the pom are preserved in the manifest. But the
manifest expects everything to be on one line.
Strangely, java gives this not so helpful error when trying to run from
that jar:
java -cp gee-2.0.1beta.jar edu.sc.seis.vsnexplorer.Start
Exception in thread "main" java.lang.NoClassDefFoundError:
edu/sc/seis/vsnexplorer/Start
I suppose that NoClassDefFound is correct, but a "bad jar file" error
would be more helpful...sigh.
Changing our shortDescription to be all one line:
<shortDescription> Global Earthquake Explorer, an education and
outreach tool
for seismology. </shortDescription>
the manifest is now:
Specification-Title: Global Earthquake Explorer, an education and out^M
reach tool for seismology. ^M
Note that it is now on 2 lines!!! And seemingly broken at the 70 char
point.
Lastly, redoing the manifest by hand so that it is all on one line and
recreateing the jar manually works, so the 70 character thing is not a
limitation of the manifest file itself. So the maven generation of the
manifest file may be splitting lines at 70 characters???
A workaround is to simply shorten the shortDescription to much less
than 70 characters, allowing room for Specification-Title: and make
sure the start and end tags are on the same line.
thanks,
Philip
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org