On 29 Jun 06, at 11:51 PM 29 Jun 06, Niclas Hedhman wrote:

On Thursday 29 June 2006 23:38, Jason van Zyl wrote:

I took a quick look at the OSGi plugin that you guys have and I
quickly tried to hack it up so that the standard Maven Jar plugin
used some of the logic to add the appropriate manifest entries.

Thanks for the interest. _I_ am not entirely sure what you are actually trying
to achieve and what the request really is.


It's not really a request, it's an offer being made after chatting with Richard.

Out of all the code for the plugin, very little is duplicated work, although
there are a couple of lines.


You're basically doing what the JAR plugin is doing. You should be able to easily extend the JAR plugin to add bits and pieces to the resultant JAR.

More important issue, IMHO, is the general <configuration> tag for plugins, which can't at all be decoupled from the <plugin> declaration. Many OSGi projects consists of a lot of bundles, and having a lot of duplication of both the plugin declaration as well as common manifest entries makes each
bundle's pom fairly extensive, even if it doesn't really need to be.

I forked[1] the Maven OSGi plugin to allow me to put these entries as
<properties> entries in the pom instead, which made the project poms very
nimble. That change has not made it into the Felix version.

What would be cool is a 'extension' mechanism for the configuration section of a plugin. Not sure how it should look like, but where it is possible to override configuration elements of the parent pom's plugin declaration with
additional or new values, and without deeply nested XML elements.


Ok, these are all things that can be done in the future. My suggestion as a first step is something would place information in standard JARs that will be useful for OSGi users. So we're talking zero configuration on the part of the typical user and OSGi folks get a non-optimal set of entries in the manifest. So in this first step let's take commons-logging for example: the commons-logging people won't know anything about OSGi but some basic OSGi manifest entries will be placed in the JAR in the hopes that the commons-logging JAR doesn't have to be repackaged for use with an OSGi environment.

So this is just a first simple step to try and help OSGi leverage anything that is built with Maven. Once that is done we can work on the configuration bits that people might use to take full advantage of OSGi features and there are a couple people here at ApacheCon like the Jetty folks who would like to try the extended features to make a Jetty bundle. But simple steps first :-)

Jason.


Cheers
Niclas

[1] Source is available at;
    https://scm.ops4j.org/repos/ops4j/projects/pax/maven/osgi-bundle/


Jason van Zyl
[EMAIL PROTECTED]



Reply via email to