Extending normal Manifest entries

2003-09-04 Thread Berin Loritsch
Is there currently any way to simply add new manifest entries to all
the ones that Maven generates for you?  I have a special packaging
requirement that needs to add up to four attributes--but I don't want
to have to choose between Maven generated and personally generated
manifests.  I would like to simply add attributes.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Extending normal Manifest entries

2003-09-04 Thread Erik Husby
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
The result is Maven will merge the MANIFEST.MF that you generate with 
the one it does.

Make sure that you have the latest version of the JAR plugin 
(maven-jar-plugin-1.1) because there
was a bug in the prior version that corrupted the manifests.

Berin Loritsch wrote:

Is there currently any way to simply add new manifest entries to all
the ones that Maven generates for you?  I have a special packaging
requirement that needs to add up to four attributes--but I don't want
to have to choose between Maven generated and personally generated
manifests.  I would like to simply add attributes.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
--
Erik Husby
Team Lead for Software Quality Automation
Whitehead Institute/MIT Center for Genome Research
Rm. 2192
320 Charles St
Cambridge, MA 02141-2023
mobile: 781.354.6669
office: 617.258.9227
[EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Extending normal Manifest entries

2003-09-04 Thread Berin Loritsch
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]