Reputation: 130
In feature.xml (Apache Karaf provisioning mechanism) tag feature
has a dependency
attribute. What does this attribute do?
For example:
<feature dependency="true">custom-feature-name</feature>
Where can I find any information on it?
After a brief googling I've only found dependency
attribute on a bundle
tag:
The role of the dependency attribute is to mark that a bundle is a dependency. If a dependency is already satisfied (an existing bundle already exports the same packages/version) then it doesn't get installed. This behavior happens if the declared feature resolver is installed (e.g. obr is installed).
Source: http://karaf.922171.n3.nabble.com/features-xml-dependency-quot-true-quot-td3286359.html
But still, no information on feature tag.
Upvotes: 4
Views: 1762
Reputation: 3096
It would seem that the definition of dependency for features in
<feature name="${project.name}-cxf" version="${cxfVersion}" description="Gets CXF up and running." install="auto">
<feature version="${cxfVersion}" dependency="true">cxf</feature>
</feature>
means that the feature ${project.name}-cxf does not have to start cxf, because it is declared that something else will provide it. This is indeed counterintuitive. Whoever came up with that ludicrous misnomer?
To auto install cxf, it should actually be set to false. This can be varified by looking up the name of the feature ${project.name}-cxf when dependency="true" and again set to false.
Developers of Karaf, the dependency=false
should be renamed provided=true
Upvotes: 2