David wants to create a "dummy bundle", describing a feature as
resources (without the XML).
Not yet sure it's a good idea (it's what we discussed on IRC).
Regards
JB
On 11/30/2015 10:36 AM, Guillaume Nodet wrote:
2015-11-30 8:41 GMT+01:00 David Leangen <apa...@leangen.net
<mailto:apa...@leangen.net>>:
>> There is an easy way to install bundles.
>> Just use the feature:requirement-add command.
Sounds practical. But then again, I really like the idea of
“features”. I like to see which “feature” is installed and
running. If my bundle is only added as a requirement, then I
lose that visibility. Also, having to restart Karaf each time
I want to add a new repository (as is currently the case) is
not a very nice option for me.
Jean-Baptiste is working on that.
I've also pushed support for referencing xml repositories from
features files to a github branch
https://github.com/gnodet/karaf/tree/KARAF-4130
Looks nice!
I noticed that currently, it is not possible to add a new Feature
via the FeatureService. Although there is an addFeature(Feature)
type method in the API, in practice it will not work if there is not
a corresponding XML repo.
It would be very nice to be able to create a feature on the fly,
such as by wrapping a bundle, then add it via the service. Actually,
for what I am trying to do it would be “necessary”. :-)
I'm not sure i understand this requirement. How can you
programmatically generate the feature definition ? What's your input
exactly ?
Should I file a JIRA issue for this?
In any case, feature:requirement-add is currently not working
for me, for 2 reasons…
1) The patch I submitted to allow resolution of resources with
relative URLs only works when
there is one single Repository added to the config file.
I am investigating an updated fix, but:
2) Something odd happens intermittently when I try to add a
requirement. Karaf adds “type=karaf.feature”
even when I express the type as “osgi.bundle”. Example:
karaf@root()> feature:requirement-add
‘osgi.identity=my.bundle;type=osgi.bundle'
Error executing command: Unable to resolve root: missing
requirement [root] osgi.identity;
osgi.identity=“osgi.identity=my.bundle;type=osgi.bundle";
type=karaf.feature;
filter:="(&(osgi.identity=osgi.identity=my.bundle;type=osgi.bundle)(type=karaf.feature))”
Try with feature:requirement-add
‘requirement:osgi.identity;osgi.identity=my.bundle;type=osgi.bundle'
Still trying. I must be doing something wrong… :-(
Cheers,
=David
--
Jean-Baptiste Onofré
jbono...@apache.org
http://blog.nanthrax.net
Talend - http://www.talend.com