war:manifest does not add "manifestEntries" to generated manifest -----------------------------------------------------------------
Key: MWAR-197 URL: http://jira.codehaus.org/browse/MWAR-197 Project: Maven 2.x WAR Plugin Issue Type: Bug Affects Versions: 2.1-beta-1, 2.1-alpha-2, 2.1-alpha-1, 2.0.2 Reporter: Nagesh Susarla Attachments: unit_test_to_add.patch, WarManifestMojo.patch Team: As stated in the summary, the manifest goal doesnt seem to add any of the manifestEntries to the generated manifest. Here is a testcase that I added to the project which exposes the issue <project> <name>war-plugin-test</name> <build> <plugins> <plugin> <artifactId>maven-war-plugin</artifactId> <configuration> <project implementation="org.apache.maven.plugin.war.stub.MavenProjectBasicStub"/> <warSourceDirectory> ${basedir}/target/test-classes/unit/manifest/manifest-with-custom-attrs/src/main</warSourceDirectory> <archive> <manifest> <addExtensions>true</addExtensions> <addDefaultImplementationEntries>true</addDefaultImplementationEntries> <addDefaultSpecificationEntries>true</addDefaultSpecificationEntries> </manifest> <manifestEntries> <Custom-Version>2.0</Custom-Version> </manifestEntries> </archive> </configuration> </plugin> </plugins> </build> </project> Expected: "Custom-Version" is expected in the manifest. But it not present in the generated manifest Actual: Manifest-Version: 1.0 Created-By: Apache Maven Built-By: nageshs Build-Jdk: 1.6.0_07 Specification-Title: Test Project Specification-Version: 0.0-Test Specification-Vendor: Test Name Implementation-Title: Test Project Implementation-Version: 0.0-Test Implementation-Vendor-Id: org.apache.maven.plugin.test Implementation-Vendor: Test Name I'm also attaching a fix along with a unit test to test the presence of the custom manifest entry. After the fix all tests pass and the "Custom-Version" is also included in the manifest. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira