felix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Richard S. Hall" <he...@ungoverned.org>
Subject Re: OSGi Manifests in Maven JARs
Date Fri, 30 Jun 2006 11:05:07 GMT
I think this will be more than reasonable for initial integration. To 
convert a library JAR file to a bundle JAR file, we only need to insert 
a few manifest headers. The two most important will be:

    * "Import-Package" which is a list of all packages referenced by
      classes inside the JAR but not contained in it.
    * "Export-Package" which will be a list of all packages contained
      inside of the JAR file.

We just need to polish up how we generate these various manifest headers 
and then we should be ready to go. The end result should be completely 

-> richard

Jason van Zyl wrote:
> Hi,
> 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.
> I believe the the plugin is trying to pull in all the dependencies and 
> create a bundle from that, but what I would like to try first is doing 
> something non-invasive and add manifest entries to standard JARs that 
> are created by Maven. I think a simple first step that, while not 
> ideal for OSGi, gets you something without much effort.
> If you can make me something that takes a Maven project object  and 
> produces a Properties object containing all the entries you would like 
> inserted in the manifest I can probably get that wired in, propose 
> it's inclusion as standard on the Maven list and go from there. So I 
> need you a signature like the following:
> Properties getManifestEntries( MavenProject project )
>     throws MojoExecutionException;
> I will also take a look at how we can make the JAR plugin easier to 
> extend so that you can create proper OSGi bundles without having to 
> completely rewrite your own plugin to make bundles.
> Please cc me on any responses to the list as I'm not subscribed right 
> now.
> Thanks,
> Jason van Zyl
> jason@maven.org

View raw message