You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@karaf.apache.org by Claus Ibsen <cl...@gmail.com> on 2013/07/02 06:33:49 UTC

Having custom features.xml in own bundles - how to?

Hi

I can't remember how to do this.

Looking at:
http://karaf.apache.org/manual/latest-2.3.x/users-guide/provisioning.html

I have a custom bundle - eg in this case its a new Camel example -
camel-example-mybatis. But it could also be a custom application.

And as my bundle requires X other bundles and whatnot to be installed
I want to have a feature to install it easily in karaf.

I can't remember if I can include a features.xml in my own bundle in
some special directory. And then use the

addurl to add my features.xml file, eg like

features:addurl
mvn:org.apache.camel/camel-example-mybatis/2.12-SNAPSHOT/xml/features

But I get this error

Error executing command: Unable to add repositories:
URL [mvn:org.apache.camel/camel-example-mybatis/2.12-SNAPSHOT/xml/features]
could not be resolved.


Currently my features.xml file is in src/main/resources directory of
the camel-example-mybatis. Though wonder if I must place it in another
directory.

It would be sad if I have to create a features.xml file outside my
bundle. As I would like a single deployment unit with included
features.xml, for people to easy install and use it.





--
Claus Ibsen
-----------------
www.camelone.org: The open source integration conference.

Red Hat, Inc.
FuseSource is now part of Red Hat
Email: cibsen@redhat.com
Web: http://fusesource.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen

Re: Having custom features.xml in own bundles - how to?

Posted by Freeman Fang <fr...@gmail.com>.
Hi Claus,

Seems you're looking for kar archive, a zip file which contains features descriptor and a bunch of bundles, please take a look at [1] to get more details.

[1]http://karaf.apache.org/manual/latest-2.3.x/users-guide/kar.html
-------------
Freeman(Yue) Fang

Red Hat, Inc. 
FuseSource is now part of Red Hat
Web: http://fusesource.com | http://www.redhat.com/
Twitter: freemanfang
Blog: http://freemanfang.blogspot.com
http://blog.sina.com.cn/u/1473905042
weibo: @Freeman小屋



On 2013-7-2, at 下午12:33, Claus Ibsen wrote:

> Hi
> 
> I can't remember how to do this.
> 
> Looking at:
> http://karaf.apache.org/manual/latest-2.3.x/users-guide/provisioning.html
> 
> I have a custom bundle - eg in this case its a new Camel example -
> camel-example-mybatis. But it could also be a custom application.
> 
> And as my bundle requires X other bundles and whatnot to be installed
> I want to have a feature to install it easily in karaf.
> 
> I can't remember if I can include a features.xml in my own bundle in
> some special directory. And then use the
> 
> addurl to add my features.xml file, eg like
> 
> features:addurl
> mvn:org.apache.camel/camel-example-mybatis/2.12-SNAPSHOT/xml/features
> 
> But I get this error
> 
> Error executing command: Unable to add repositories:
> URL [mvn:org.apache.camel/camel-example-mybatis/2.12-SNAPSHOT/xml/features]
> could not be resolved.
> 
> 
> Currently my features.xml file is in src/main/resources directory of
> the camel-example-mybatis. Though wonder if I must place it in another
> directory.
> 
> It would be sad if I have to create a features.xml file outside my
> bundle. As I would like a single deployment unit with included
> features.xml, for people to easy install and use it.
> 
> 
> 
> 
> 
> --
> Claus Ibsen
> -----------------
> www.camelone.org: The open source integration conference.
> 
> Red Hat, Inc.
> FuseSource is now part of Red Hat
> Email: cibsen@redhat.com
> Web: http://fusesource.com
> Twitter: davsclaus
> Blog: http://davsclaus.com
> Author of Camel in Action: http://www.manning.com/ibsen