Hi,

I'm not into OSGi, so I don't fully understand the requirement.
But what I can say is that one of the principals of Maven is that maven-plugins don't depend on each other. Regarding the MANIFEST.MF file, I think that both the maven-ear-plugin and the maven-shade-plugin are good examples of how this should work. The maven-ear-plugin is capable to transform a common war to a skinny war and change the wars classpath in the MANIFEST file. The maven-shade-plugin has a ManifestResourceTransformer which does its job fine.
Can this plugin help for the mentioned problem?

my 2 cents,
Robert

On Sun, 01 May 2016 14:10:53 +0200, Karl Heinz Marbaise <[email protected]> wrote:

Hi,

currently there are some requirements to allow other mojo's to contribute to MANIFEST.MF which is used during the package of for example of maven-jar-plugin...

The question is:
   o Does someone has a good idea to solve such things ?
     Or what might be a good direction to go?

   o Let other mojo's / tools write a partial MANIFEST.MF
     (to a special location?) and let for example maven-jar-plugin
     pick this up and merge this with other information into
     the final MANIFEST.MF file?

   o Or should we allow to transfer such information via
     the project context in Maven itself ? (which might
     not be a good idea cause it might influence other
     mojo's?)

   o Or might it be worth thinking of a special Maven
     plugin which handles such things in general and
     all other packaging plugins (just pick the resulting
     MANFIFEST.MF) and package it into jar, war, ear, rar etc.
     (Hm..i'm not sure if this is a good idea, cause it might
     cause problems with putting classpath information into
     MANIFEST.MF ?) but if we are in prepare-package phase?


      ...
      prepare-package:  maven-manifest-plugin (?)
      package:          maven-jar-plugin
      ...

      This would result in removing all MANIFEST related
      parts from packaging plugins ? into a single location.

      One thing might be a problem if artifacts are signed and
      the information should be put into MANIFEST ? (Not sure)..
      cause in the prepare-package phase the artifacts are
      not yet packaged....

      But based on things like moving the life cycle definitions
      into the plugins it could be configured to bind two plugins
      to the package phase like this:

       <package>
          org.apache.maven.plugins:maven-manifest-plugin:..:jar,
          org.apache.maven.plugins:maven-plugin-jar-plugin:..:jar
       </package>

       Could that work?



WDYT ?

Kind regards
Karl Heinz Marbaise

---------------------------------------------------------------------
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]

Reply via email to