You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@karaf.apache.org by Lu Qin <lu...@gmail.com> on 2015/11/20 03:03:26 UTC
how can I build a bundle with his dependences
Hi,all.I have a question when I begin use karaf.In java ,I use maven to manage project dependences.When I use it to appoint the package as a WAR,I can build a war with my project and dependences.
Now,I use karaf,and appoint the package as bundle,and I use maven-bundle-plugin to manage the bundle,but it only build a single jar file as a bundle,I must manage the dependences manually.It always show the error message
about “missing requirement ***”.
Is there a easy way to build the bundle ? Can I build my project as a bundle and auto-general its dependences?
Thanks.
Re: how can I build a bundle with his dependences
Posted by Lu Qin <lu...@gmail.com>.
OK,Thank you very much.
> 在 2015年11月20日,14:37,Jean-Baptiste Onofré <jb...@nanthrax.net> 写道:
>
> You can embed dependencies, but it's not the correct approach in OSGi.
>
> Bundle import packages provided by other bundles, so just install all bundles in the runtime.
>
> Regards
> JB
>
> On 11/20/2015 07:06 AM, Lu Qin wrote:
>> Thanks for you help.
>>
>> For example , my project depend on mysql-driver,when I build my project as a bundle ,can I generator the mysql-driver as a bundle together ? Or I can only manual build the mysql-driver bundle and put it into karaf deploy directory ?
>>
>>
>>> 在 2015年11月20日,13:38,Jean-Baptiste Onofré <jb...@nanthrax.net> 写道:
>>>
>>> Hi Lu,
>>>
>>> It's a not a Karaf issue: in OSGi, you have to create valid bundle.
>>>
>>> Here your bundle needs a dependency deployed.
>>>
>>> What's the missing ?
>>>
>>> Regards
>>> JB
>>>
>>> On 11/20/2015 03:03 AM, Lu Qin wrote:
>>>>
>>>>
>>>> Hi,all.I have a question when I begin use karaf.In java ,I use maven to manage project dependences.When I use it to appoint the package as a WAR,I can build a war with my project and dependences.
>>>>
>>>> Now,I use karaf,and appoint the package as bundle,and I use maven-bundle-plugin to manage the bundle,but it only build a single jar file as a bundle,I must manage the dependences manually.It always show the error message
>>>> about “missing requirement ***”.
>>>>
>>>> Is there a easy way to build the bundle ? Can I build my project as a bundle and auto-general its dependences?
>>>>
>>>> Thanks.
>>>>
>>>
>>> --
>>> Jean-Baptiste Onofré
>>> jbonofre@apache.org
>>> http://blog.nanthrax.net
>>> Talend - http://www.talend.com
>>
>
> --
> Jean-Baptiste Onofré
> jbonofre@apache.org
> http://blog.nanthrax.net
> Talend - http://www.talend.com
Re: how can I build a bundle with his dependences
Posted by Jean-Baptiste Onofré <jb...@nanthrax.net>.
You can embed dependencies, but it's not the correct approach in OSGi.
Bundle import packages provided by other bundles, so just install all
bundles in the runtime.
Regards
JB
On 11/20/2015 07:06 AM, Lu Qin wrote:
> Thanks for you help.
>
> For example , my project depend on mysql-driver,when I build my project as a bundle ,can I generator the mysql-driver as a bundle together ? Or I can only manual build the mysql-driver bundle and put it into karaf deploy directory ?
>
>
>> 在 2015年11月20日,13:38,Jean-Baptiste Onofré <jb...@nanthrax.net> 写道:
>>
>> Hi Lu,
>>
>> It's a not a Karaf issue: in OSGi, you have to create valid bundle.
>>
>> Here your bundle needs a dependency deployed.
>>
>> What's the missing ?
>>
>> Regards
>> JB
>>
>> On 11/20/2015 03:03 AM, Lu Qin wrote:
>>>
>>>
>>> Hi,all.I have a question when I begin use karaf.In java ,I use maven to manage project dependences.When I use it to appoint the package as a WAR,I can build a war with my project and dependences.
>>>
>>> Now,I use karaf,and appoint the package as bundle,and I use maven-bundle-plugin to manage the bundle,but it only build a single jar file as a bundle,I must manage the dependences manually.It always show the error message
>>> about “missing requirement ***”.
>>>
>>> Is there a easy way to build the bundle ? Can I build my project as a bundle and auto-general its dependences?
>>>
>>> Thanks.
>>>
>>
>> --
>> Jean-Baptiste Onofré
>> jbonofre@apache.org
>> http://blog.nanthrax.net
>> Talend - http://www.talend.com
>
--
Jean-Baptiste Onofré
jbonofre@apache.org
http://blog.nanthrax.net
Talend - http://www.talend.com
Re: how can I build a bundle with his dependences
Posted by Lu Qin <lu...@gmail.com>.
Thanks for you help.
For example , my project depend on mysql-driver,when I build my project as a bundle ,can I generator the mysql-driver as a bundle together ? Or I can only manual build the mysql-driver bundle and put it into karaf deploy directory ?
> 在 2015年11月20日,13:38,Jean-Baptiste Onofré <jb...@nanthrax.net> 写道:
>
> Hi Lu,
>
> It's a not a Karaf issue: in OSGi, you have to create valid bundle.
>
> Here your bundle needs a dependency deployed.
>
> What's the missing ?
>
> Regards
> JB
>
> On 11/20/2015 03:03 AM, Lu Qin wrote:
>>
>>
>> Hi,all.I have a question when I begin use karaf.In java ,I use maven to manage project dependences.When I use it to appoint the package as a WAR,I can build a war with my project and dependences.
>>
>> Now,I use karaf,and appoint the package as bundle,and I use maven-bundle-plugin to manage the bundle,but it only build a single jar file as a bundle,I must manage the dependences manually.It always show the error message
>> about “missing requirement ***”.
>>
>> Is there a easy way to build the bundle ? Can I build my project as a bundle and auto-general its dependences?
>>
>> Thanks.
>>
>
> --
> Jean-Baptiste Onofré
> jbonofre@apache.org
> http://blog.nanthrax.net
> Talend - http://www.talend.com
Re: how can I build a bundle with his dependences
Posted by Jean-Baptiste Onofré <jb...@nanthrax.net>.
Hi Lu,
It's a not a Karaf issue: in OSGi, you have to create valid bundle.
Here your bundle needs a dependency deployed.
What's the missing ?
Regards
JB
On 11/20/2015 03:03 AM, Lu Qin wrote:
>
>
> Hi,all.I have a question when I begin use karaf.In java ,I use maven to manage project dependences.When I use it to appoint the package as a WAR,I can build a war with my project and dependences.
>
> Now,I use karaf,and appoint the package as bundle,and I use maven-bundle-plugin to manage the bundle,but it only build a single jar file as a bundle,I must manage the dependences manually.It always show the error message
> about “missing requirement ***”.
>
> Is there a easy way to build the bundle ? Can I build my project as a bundle and auto-general its dependences?
>
> Thanks.
>
--
Jean-Baptiste Onofré
jbonofre@apache.org
http://blog.nanthrax.net
Talend - http://www.talend.com