You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@karaf.apache.org by Ken Longnan <ke...@gmail.com> on 2013/11/21 14:29:29 UTC
Install bundle folder by karaf feature
Hi,
I have a bundle folder (not packaged as jar). How to install it by feature?
I know if need install a bundle jar, you can by following way:
<feature name="spring-web" version="2.5.6.SEC01">
<bundle>file:base/bundles/spring-web-2.5.6.SEC01.jar</bundle>
</feature>
Can I use this way:
<bundle>folder:base/bundles/mybundle/</bundle>
If just drop whole folder 'mybundle' into deploy directory, then
bundle will be installed.
Thanks for your help!
BR,
Ken
Re: Install bundle folder by karaf feature
Posted by Achim Nierbeck <bc...@googlemail.com>.
Hi,
not sure if it works but if you use jardir:file:xx it might work.
regards, Achim
2013/11/21 Ken Longnan <ke...@gmail.com>
> Hi,
>
> I have a bundle folder (not packaged as jar). How to install it by feature?
>
> I know if need install a bundle jar, you can by following way:
>
> <feature name="spring-web" version="2.5.6.SEC01">
> <bundle>file:base/bundles/spring-web-2.5.6.SEC01.jar</bundle>
> </feature>
>
> Can I use this way:
> <bundle>folder:base/bundles/mybundle/</bundle>
>
> If just drop whole folder 'mybundle' into deploy directory, then bundle will be installed.
>
> Thanks for your help!
>
> BR,
>
> Ken
>
>
--
Apache Karaf <http://karaf.apache.org/> Committer & PMC
OPS4J Pax Web <http://wiki.ops4j.org/display/paxweb/Pax+Web/> Committer &
Project Lead
OPS4J Pax for Vaadin <http://team.ops4j.org/wiki/display/PAXVAADIN/Home>
Commiter & Project Lead
blog <http://notizblog.nierbeck.de/>
Re: Install bundle folder by karaf feature
Posted by Ken Longnan <ke...@gmail.com>.
Thanks a lot, both!
jardir is the key!
But:
<bundle>jardir:file:base/bundles/mybundle/</bundle>
not working due to exception:
Exception in thread "Thread-49" java.lang.NullPointerException
at org.apache.felix.fileinstall.internal.Util.zipDir(Util.java:252)
at org.apache.felix.fileinstall.internal.Util.jarDir(Util.java:232)
at
org.apache.felix.fileinstall.internal.JarDirUrlHandler$Connection$1.run(JarDirUrlHandler.java:81)
Then I change to:
<bundle>jardir:base/bundles/mybundle/</bundle>
Without 'file', it is working well!
BR,
Ken
2013/11/21 Jean-Baptiste Onofré <jb...@nanthrax.net>
> Hi Ken,
>
> try to use the jardir: protocol:
>
> <bundle>jardir:file:base/bundles/mybundle/</bundle>
>
> Regards
> JB
>
>
> On 11/21/2013 02:29 PM, Ken Longnan wrote:
>
>> Hi,
>>
>> I have a bundle folder (not packaged as jar). How to install it by
>> feature?
>>
>> I know if need install a bundle jar, you can by following way:
>>
>> <feature name="spring-web" version="2.5.6.SEC01">
>> <bundle>file:base/bundles/spring-web-2.5.6.SEC01.jar</bundle>
>> </feature>
>>
>> Can I use this way:
>> <bundle>folder:base/bundles/mybundle/</bundle>
>>
>> If just drop whole folder 'mybundle' into deploy directory, then bundle
>> will be installed.
>>
>>
>> Thanks for your help!
>>
>> BR,
>>
>> Ken
>>
>>
> --
> Jean-Baptiste Onofré
> jbonofre@apache.org
> http://blog.nanthrax.net
> Talend - http://www.talend.com
>
Re: Install bundle folder by karaf feature
Posted by Jean-Baptiste Onofré <jb...@nanthrax.net>.
Hi Ken,
try to use the jardir: protocol:
<bundle>jardir:file:base/bundles/mybundle/</bundle>
Regards
JB
On 11/21/2013 02:29 PM, Ken Longnan wrote:
> Hi,
>
> I have a bundle folder (not packaged as jar). How to install it by feature?
>
> I know if need install a bundle jar, you can by following way:
>
> <feature name="spring-web" version="2.5.6.SEC01">
> <bundle>file:base/bundles/spring-web-2.5.6.SEC01.jar</bundle>
> </feature>
>
> Can I use this way:
> <bundle>folder:base/bundles/mybundle/</bundle>
>
> If just drop whole folder 'mybundle' into deploy directory, then bundle will be installed.
>
>
> Thanks for your help!
>
> BR,
>
> Ken
>
--
Jean-Baptiste Onofré
jbonofre@apache.org
http://blog.nanthrax.net
Talend - http://www.talend.com