Note I have created a bug to track this so that it doesn't get lost. The bug is MNG-1202
Mark Russell -----Original Message----- From: Russell, Mark [mailto:[EMAIL PROTECTED] Sent: Thursday, October 13, 2005 9:31 AM To: dev@maven.apache.org Subject: [m2] maven-jar-plugin support for manifest sections (patch) Wasn't real sure where to send this but figured the dev list was the best place to start. While working on converting the build process of some of the applications I work on I found that I needed to be able to add sections to the manifest. Currently the maven-jar-plugin doesn't support this except by using an externally defined file and pointing the plugin to the file. I personally prefer to have it all in the pom so it's in one place. So I started to look into the code and realized that it should be a very simple thing to add support for. As I don't think the list supports attachments a zip file containing all of my changes can be found at http://arctic-wolf.net/ManifestSectionSupportChanges.zip In the zip file I have included my modified versions of the MavenArchiveConfiguration.java and MavenArchiver.java files, along with a .patch to simplify including the changes. Additionally, one new class found in the ManifestSection.java file is also included. Lastly, I have included a pom.xml that shows an example of how the changes would be used. The fix was really quite simple, but if there is anything else needed let me know, especially if it will improve the changes of the patch being included in time for 2.0 final. Thanks, Mark Russell Below you will find a simple example based on the my-app example in the maven source. (obviously modified to use the new feature) USAGE EXAMPLE ============================== pom.xml ======= <project> ... <build> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-jar-plugin</artifactId> <configuration> <archive> <manifest> <mainClass>org.com.foo.App</mainClass> <packageName>org.com.foo.app</packageName> </manifest> <manifestEntries> <mode>development</mode> <url>${pom.url}</url> </manifestEntries> <manifestSections> <manifestSection> <name>SampleSectionNumberOne</name> <manifestEntries> <mode>development</mode> <url>${pom.url}</url> </manifestEntries> </manifestSection> <manifestSection> <name>SampleSectionNumberTwo</name> <manifestEntries> <mode>development</mode> <url>${pom.url}</url> </manifestEntries> </manifestSection> </manifestSections> </archive> </configuration> </plugin> </plugins> </build> ... </project> Resulting MANIFEST.MF ====================== Manifest-Version: 1.0 Archiver-Version: Plexus Archiver Created-By: Apache Maven Built-By: RUSM01 Package: org.com.foo.app Build-Jdk: 1.4.2_08 Extension-Name: my-app Specification-Vendor: MyCompany Inc Implementation-Vendor: MyCompany Inc Implementation-Title: my-app Implementation-Version: 1.0-SNAPSHOT Main-Class: org.com.foo.App mode: development url: http://maven.apache.org Name: SampleSectionNumberOne mode: development url: http://maven.apache.org Name: SampleSectionNumberTwo mode: development url: http://maven.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]