Erik Husby wrote:
I had a need to do this as well.
In maven.xml, I added:
project
xmlns:ant=jelly:ant
xmlns:j=jelly:core
xmlns:deploy=deploy
pregoal name=jar:jar
ant:manifest file=MANIFEST.MF
ant:attribute name=Class-Path value=j2ee-1.4.1_02.jar
jdom-b9.jar jhall-1.1.3.jar js-1.5R4-RC3.jar junit-3.8.1.jar
profiler-1.0.jar/
/ant:manifest
/pregoal
/project
And then in project.properties, one adds
maven.jar.manifest=MANIFEST.MF
SO it does merge...
I just spent some time changing the plugin to add to the manifest using properties.
Example snippet below:
maven.jar.manifest.attributes.list = GUIApp-Conf,GUIApp-Instrument,GUIApp-Log
maven.jar.manifest.attribute.GUIApp-Conf = org/d_haven/demoapp/DemoApp.xconf
maven.jar.manifest.attribute.GUIApp-Instrument =
org/d_haven/demoapp/DemoApp.instruments
maven.jar.manifest.attribute.GUIApp-Log = org/d_haven/demoapp/DemoApp.xlog
maven.jar.manifest.groups.list = DemoAppConstants,ValidateQuitApplication
maven.jar.manifest.DemoAppConstants.name=org/d_haven/demoapp/DemoAppConstants.class
maven.jar.manifest.DemoAppConstants.attributes.list=Description,Foo
maven.jar.manifest.DemoAppConstants.attribute.Description=It's ok
maven.jar.manifest.DemoAppConstants.attribute.Foo=bar
maven.jar.manifest.ValidateQuitApplication.name=org/d_haven/demoapp/screens/ValidateQuitApplication.class
maven.jar.manifest.ValidateQuitApplication.attributes.list=Description
maven.jar.manifest.ValidateQuitApplication.attribute.Description=We are rockin'
This will add to the Maven generated Manifest like this:
skip maven generated content
GUIApp-Conf: org/d_haven/demoapp/DemoApp.xconf
GUIApp-Instrument: org/d_haven/demoapp/DemoApp.instruments
GUIApp-Log: org/d_haven/demoapp/DemoApp.xlog
Name: org/d_haven/demoapp/DemoAppConstants.class
Description: It's ok
Foo: bar
Name: org/d_haven/demoapp/screens/ValidateQuitApplication.class
Description: We are rockin'
It seems to work pretty decently, and I am getting ready to send a patch in.
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]