Wendy Smoak wrote:
Jason just announced the release of maven-jar-plugin 2.1. (Thanks!)
Now I'm going to pick on the documentation. :)
Being the one who updated the docs during the plugin documentation drive
earlier, I'll answer this then :)
One of the major problems we had with the jar plugin was invalid
manifests. The plugin would use the <description> as-is for
Specification-Title, including line breaks, resulting in an invalid
manifest.
On this page
http://maven.apache.org/plugins/maven-jar-plugin/examples/manifest-customization.html
I read that "By default a manifest will contain something like the
following:
Manifest-Version: 1.0
Built-By: ${user.name}
Created-By: Apache Maven
Build-Jdk: ${java.version}
Extension-Name: ${project.artifactId}
Specification-Vendor: ${project.organization.name}
Implementation-Vendor: ${project.organization.name}
Implementation-Title: ${project.description}
Implementation-Version: ${project.version}
"
Great, we're using <name> for Specification-Title now. That should be
a single line, so no problem.
Then I build a jar file, and the manifest contains only:
Manifest-Version: 1.0
Archiver-Version: Plexus Archiver
Created-By: Apache Maven
Built-By: wsmoak
Build-Jdk: 1.5.0_05
Not quite what I expected. Using Emmanuel's suggestion of adding
<configuration> also does not work.
<configuration>
<manifest>
<addDefaultSpecificationEntries>true</addDefaultSpecificationEntries>
<addDefaultImplementationEntries>true</addDefaultImplementationEntries>
</manifest>
</configuration>
IIRC the stuff in the "manifest" part (which is inside "archive") of the
configuration does not come from the plugin, but from other code:
maven-archiver. After I had updated the docs the dependency on
maven-archiver was updated to a newer version, with altered behavior. So
the docs in the plugin are not in line with maven-archiver code anymore.
This is a nightmare situation to write documentation for :( We can't
have docs in the plugin for code that resides in another product.
The documentation really needs to be fixed to reflect the true default
manifest contents, and re-published.
The fact that the suggested configuration doesn't work is another
issue. And I can't find a list of what is allowed in <configuration>
to double check what I'm doing.
I had the same trouble when I was working on the documentation. Have a
look at these pages:
http://maven.apache.org/ref/current/maven-archiver/apidocs/org/apache/maven/archiver/MavenArchiveConfiguration.html
http://maven.apache.org/ref/current/maven-archiver/apidocs/org/apache/maven/archiver/ManifestConfiguration.html
This is the reason I asked for a link to the wiki on every plugin
page, so users at least have a chance to list errata and supply
working examples until the site can be corrected. :(
--
Dennis Lundberg
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]