You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@felix.apache.org by "Alan D. Cabrera" <li...@toolazydogs.com> on 2007/09/08 20:19:02 UTC

Organizing native libraries with maven

I was wondering how other people package in native libraries in with  
their bundles.  Is there a standard and accepted practice when using  
maven?


Regards,
Alan


Re: Organizing native libraries with maven

Posted by "Richard S. Hall" <he...@ungoverned.org>.
Alan D. Cabrera wrote:
> I was wondering how other people package in native libraries in with 
> their bundles.  Is there a standard and accepted practice when using 
> maven?

In truth, it is the one thing I haven't tried to do yet with the bundle 
plugin...we need to do this for the "simple" example bundle we have.

I would guess that you'd just include it as a resource and add the 
appropriate manifest header in the plugin instructions. Maybe someone 
with experience has more to say...

-> richard

>
>
> Regards,
> Alan
>

Re: Organizing native libraries with maven

Posted by "Alan D. Cabrera" <li...@toolazydogs.com>.
On Sep 10, 2007, at 7:05 AM, Damien Lecan wrote:

> Hello,
>
> 2007/9/8, Alan D. Cabrera <li...@toolazydogs.com>:
>> I was wondering how other people package in native libraries in with
>> their bundles.  Is there a standard and accepted practice when using
>> maven?
>
> In our applications, .so and .dll files are artifacts too. So they are
> uploaded in our internal Maven repository.
>
> Then :
>
> - use maven-dependency-plugin to copy dependencies to "target" folder
> in phase "process-resource"
>
> - add BND Include-Resource instruction in your pom to embed them
> inside the bundle
>
> - update the Bundle-NativeCode configuration in your pom file.
>
> You can play with native-maven-plugin
> (http://mojo.codehaus.org/maven-native/native-maven-plugin/) or with
> NAR packaging plugin (http://java.freehep.org/freehep-nar-plugin) to
> build your native components.

This looks perfect.  Exactly how I was thinking of organizing things.

I'll take it for a spin.  Thanks!


Regards,
Alan


Re: Organizing native libraries with maven

Posted by Damien Lecan <ml...@dlecan.com>.
Hello,

2007/9/8, Alan D. Cabrera <li...@toolazydogs.com>:
> I was wondering how other people package in native libraries in with
> their bundles.  Is there a standard and accepted practice when using
> maven?

In our applications, .so and .dll files are artifacts too. So they are
uploaded in our internal Maven repository.

Then :

- use maven-dependency-plugin to copy dependencies to "target" folder
in phase "process-resource"

- add BND Include-Resource instruction in your pom to embed them
inside the bundle

- update the Bundle-NativeCode configuration in your pom file.

You can play with native-maven-plugin
(http://mojo.codehaus.org/maven-native/native-maven-plugin/) or with
NAR packaging plugin (http://java.freehep.org/freehep-nar-plugin) to
build your native components.

Hope it helps

Damien