felix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jason van Zyl <ja...@maven.org>
Subject Re: Creating OSGi bundles with the Maven JAR Plugin
Date Wed, 18 Oct 2006 19:40:40 GMT

On 29 Sep 06, at 8:56 AM 29 Sep 06, Peter Kriens wrote:

> I sent you two mails about this, I guess they must have ended up in
> your spam box :-(
>
> You wanted to have a function that could be called with a Properties
> object.
>
>        Manifest getManifest( Properties p,
>                 File target /* jar | dir */ ) {
>
>          if ( ! p.containsKey("Export-Package") )
>            p.put("Export-Package", "*" );
>
>          Analyzer analyzer = new Analyzer();
>          analyzer.setJar(target);
>          analyzer.setProperties(properties);
>          return analyzer.calcManifest();
>        }
>
>
> The library that makes this possible can be download from
>
> http://www.aqute.biz/php/tools/jars/bnd.jar

This will ultimately need to be placed in the remote repository so  
please put a version in the JAR name and create a POM for the  
artifact and I will take care of the rest.

I have the extension for the JAR plugin so as long as you hand me a  
Properties object it will work transparently.

>
> The properties can be empty. In that case it will export all and
> calculate the imports (imports=*). If you allow the pom to set the
> import and export fields, then users can defined attributes and
> directives on the headers. E.g.
>
>            <export-package>aQute.util.jar;version=1.4</export-package>
>
> Or they can actually limit the imports (default is import anything):
>
>
>           <import-package>!com.acme.*,*</import-package>
>
> This will not import com.acme packages even if some code refers to
> them.
>
> Will this work?

For the first phase of this I will activate the transparent insertion  
of manifest information. I still have not created an extension  
configuration mechanism for this. Basically this is an extension of  
the JAR plugin. That should not take me long. I will bring it up on  
the Maven developers list and I should be able to have these changes  
in the JAR plugin for the next release.

Jason.

>
> Kind regards,
>
>      Peter Kriens
>
>
> JvZ> I'm thinking about ApacheCon again so I remember that at the last
> JvZ> ApacheCon we talked about modifying the JAR plugin to create OSGi
> JvZ> bundles for you guys automatically. I'm hoping that I can try and
> JvZ> demo something for ApacheCon (not for any preso, but just to  
> show it
> JvZ> can work) so I'm wondering where this ended up. I'm now  
> subscribed to
> JvZ> the list so maybe I dropped the ball.
>
> JvZ> Thanks,
>
> JvZ> Jason.
>
>
> -- 
> Peter Kriens                              Tel +33467542167
> 9C, Avenue St. Drézéry                    AOL,Yahoo: pkriens
> 34160 Beaulieu, France                    ICQ 255570717
> Skype pkriens                             Fax +1 8153772599
>
>


Mime
View raw message