[
https://jira.codehaus.org/browse/MSHARED-99?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Kristian Rosenvold closed MSHARED-99.
-------------------------------------
Resolution: Fixed
Fix Version/s: maven-archiver-2.5
Assignee: Kristian Rosenvold
Plexus-archiver 2.1 uses the jdk manifest class, which barfs loudly about
illegal attributes
> Archiver should validate manifest attribute names.
> --------------------------------------------------
>
> Key: MSHARED-99
> URL: https://jira.codehaus.org/browse/MSHARED-99
> Project: Maven Shared Components
> Issue Type: Improvement
> Components: maven-archiver
> Reporter: Paul Gier
> Assignee: Kristian Rosenvold
> Priority: Minor
> Fix For: maven-archiver-2.5
>
>
> I noticed that the jar plugin and maven archiver will allow you to use an
> invalid attribute name in your manifest. According the jar specification,
> attribute names can only contain letters, numbers, dash, or underscore [1].
> Currently if you put an attribute name like "my.attribute" in the manifest
> configuration of the jar plugin, the attribute will be added to your jar
> manifest. If you then try to use this jar file in your classpath, for
> example as a dependency of another project, you will get a compilation error:
> [INFO] Compilation failure
> error: error reading
> /home/me/.m2/repository/org/company/my-project/1.0-SNAPSHOT/my-project-1.0-SNAPSHOT.jar;
> invalid header field name: my.attribute
> The archiver or the jar plugin should do a regex check to make sure that you
> are using a valid attribute name. And if not, a warning or error should be
> produced.
> [1]
> http://java.sun.com/j2se/1.5.0/docs/guide/jar/jar.html#Name-Value%20pairs%20and%20Sections
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira