You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Wendy Smoak <ws...@gmail.com> on 2006/09/04 17:54:02 UTC

Jar plugin release and documentation

Jason just announced the release of maven-jar-plugin 2.1.  (Thanks!)

Now I'm going to pick on the documentation. :)

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>

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.

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. :(

-- 
Wendy

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Jar plugin release and documentation

Posted by Syvalta <sy...@yahoo.com>.

Wendy Smoak-3 wrote:
> 
> Not quite what I expected.  Using Emmanuel's suggestion of adding
> <configuration> also does not work.
> 

As Brett suggested in the MJAR-57, this does work:

<configuration>
<archive>
<manifest>
<addDefaultSpecificationEntries>true</addDefaultSpecificationEntries>
<addDefaultImplementationEntries>true</addDefaultImplementationEntries>
</manifest>
</archive>
</configuration>


-- 
View this message in context: http://www.nabble.com/Jar-plugin-release-and-documentation-tf2216063.html#a6146691
Sent from the Maven - Users forum at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Jar plugin release and documentation

Posted by Brett Porter <br...@gmail.com>.
Originally, there was one guide in the maven site that the plugins
linked to for configuring the manifest section. I didn't realise that
had changed. I may be wrong, but I think I updated that when I changed
the archiver. Sorry I didn't review the JAR docs when they were done.

t's a culture we need to change. When people change things (even small
things, like dependency versions), the docs need to be reviewed and
adjusted accordingly. I'd endorse svn blaming the person who did it -
knowing full well it could have been me :)

- Brett

On 07/09/06, Dennis Lundberg <de...@apache.org> wrote:
> 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: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>


-- 
Apache Maven - http://maven.apache.org
"Better Builds with Maven" book - http://library.mergere.com/

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Jar plugin release and documentation

Posted by Dennis Lundberg <de...@apache.org>.
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: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org