<feature> element of a feature

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

<feature> element of a feature

Benson Margulies
I'd like to improve the documentation in the feature schema.

Could someone elaborate for me on the difference between the
'dependency' and 'prerequisite' attributes of the feature element used
to declare a dependency? Since the whole thing is a dependency, why
does it have a dependency attribute.

Also, am I correct that the 'name' is from the flat namespace, not g/a/v?
Reply | Threaded
Open this post in threaded view
|

Re: <feature> element of a feature

jbonofre
name is just the name, you also have the version attribute.

dependency means that it's a dependency for the resolver, so the
resolver resolves this feature.

prerequisite means the feature has to be completely installed before
moving forward on the current feature installation.

Regards
JB

On 08/31/2015 03:28 AM, Benson Margulies wrote:
> I'd like to improve the documentation in the feature schema.
>
> Could someone elaborate for me on the difference between the
> 'dependency' and 'prerequisite' attributes of the feature element used
> to declare a dependency? Since the whole thing is a dependency, why
> does it have a dependency attribute.
>
> Also, am I correct that the 'name' is from the flat namespace, not g/a/v?
>

--
Jean-Baptiste Onofré
[hidden email]
http://blog.nanthrax.net
Talend - http://www.talend.com
Reply | Threaded
Open this post in threaded view
|

Re: <feature> element of a feature

Benson Margulies
So, here's my practical question.

Feature 'A' is made up of many bundles.

Feature 'B' has wiring dependencies on jars in feature 'A', and a few
dependencies that are not part of feature 'A', including transitive
dependencies.

So B has a plain old Maven dependency on the bundle inside 'B' that
has the API, plus its own.

I am trying to work out the POM and feature.xml content so that
feature B's feature.xml shows that it depends on 'A', and that it
lists only those bundles that are not in A.

I've tried a few experiments with feature.xml dependencies, but I end
up with either more or less bundles than I was looking to get.

Is this even a reasonable thing to do, or should I just let feature B
have the redundant bundles?



On Mon, Aug 31, 2015 at 1:30 AM, Jean-Baptiste Onofré <[hidden email]> wrote:

> name is just the name, you also have the version attribute.
>
> dependency means that it's a dependency for the resolver, so the resolver
> resolves this feature.
>
> prerequisite means the feature has to be completely installed before moving
> forward on the current feature installation.
>
> Regards
> JB
>
>
> On 08/31/2015 03:28 AM, Benson Margulies wrote:
>>
>> I'd like to improve the documentation in the feature schema.
>>
>> Could someone elaborate for me on the difference between the
>> 'dependency' and 'prerequisite' attributes of the feature element used
>> to declare a dependency? Since the whole thing is a dependency, why
>> does it have a dependency attribute.
>>
>> Also, am I correct that the 'name' is from the flat namespace, not g/a/v?
>>
>
> --
> Jean-Baptiste Onofré
> [hidden email]
> http://blog.nanthrax.net
> Talend - http://www.talend.com
Reply | Threaded
Open this post in threaded view
|

Re: <feature> element of a feature

jbonofre
If you work only at feature name level, you just need:

<feature name="A" version="1">
   <bundle>...</bundle>
   ...
</feature>

<feature name="B" version="x">
   <feature>A</feature>
   ...
</feature>

The purpose of dependency/prerequisite is to work on
requirements/capabilities level.

Regards
JB

On 08/31/2015 01:08 PM, Benson Margulies wrote:

> So, here's my practical question.
>
> Feature 'A' is made up of many bundles.
>
> Feature 'B' has wiring dependencies on jars in feature 'A', and a few
> dependencies that are not part of feature 'A', including transitive
> dependencies.
>
> So B has a plain old Maven dependency on the bundle inside 'B' that
> has the API, plus its own.
>
> I am trying to work out the POM and feature.xml content so that
> feature B's feature.xml shows that it depends on 'A', and that it
> lists only those bundles that are not in A.
>
> I've tried a few experiments with feature.xml dependencies, but I end
> up with either more or less bundles than I was looking to get.
>
> Is this even a reasonable thing to do, or should I just let feature B
> have the redundant bundles?
>
>
>
> On Mon, Aug 31, 2015 at 1:30 AM, Jean-Baptiste Onofré <[hidden email]> wrote:
>> name is just the name, you also have the version attribute.
>>
>> dependency means that it's a dependency for the resolver, so the resolver
>> resolves this feature.
>>
>> prerequisite means the feature has to be completely installed before moving
>> forward on the current feature installation.
>>
>> Regards
>> JB
>>
>>
>> On 08/31/2015 03:28 AM, Benson Margulies wrote:
>>>
>>> I'd like to improve the documentation in the feature schema.
>>>
>>> Could someone elaborate for me on the difference between the
>>> 'dependency' and 'prerequisite' attributes of the feature element used
>>> to declare a dependency? Since the whole thing is a dependency, why
>>> does it have a dependency attribute.
>>>
>>> Also, am I correct that the 'name' is from the flat namespace, not g/a/v?
>>>
>>
>> --
>> Jean-Baptiste Onofré
>> [hidden email]
>> http://blog.nanthrax.net
>> Talend - http://www.talend.com

--
Jean-Baptiste Onofré
[hidden email]
http://blog.nanthrax.net
Talend - http://www.talend.com
Reply | Threaded
Open this post in threaded view
|

Re: <feature> element of a feature

Achim Nierbeck
To add some more detail on Bensons question.

A bundle marked as dependency is an extra information for the resolver to
only install this bundle if it isn't already installed by any previous
means.
So in comparison to a feature dependency, this dependency explicitly marks
this feature to be installed together with this feature. Like a transitive
dependency.
A bundle within a feature marked as "dependency" marks this bundle as
"optional" installable if it's not already available from installed
bundles.

this makes a lot more sense for a scenario where you have 3 different
features which might be installed together or standalone, so all of those
features will try to install the same bundle, but only if it's not already
available.

hope this makes it a bit clearer.

regards, Achim

2015-08-31 13:11 GMT+02:00 Jean-Baptiste Onofré <[hidden email]>:

> If you work only at feature name level, you just need:
>
> <feature name="A" version="1">
>   <bundle>...</bundle>
>   ...
> </feature>
>
> <feature name="B" version="x">
>   <feature>A</feature>
>   ...
> </feature>
>
> The purpose of dependency/prerequisite is to work on
> requirements/capabilities level.
>
> Regards
> JB
>
>
> On 08/31/2015 01:08 PM, Benson Margulies wrote:
>
>> So, here's my practical question.
>>
>> Feature 'A' is made up of many bundles.
>>
>> Feature 'B' has wiring dependencies on jars in feature 'A', and a few
>> dependencies that are not part of feature 'A', including transitive
>> dependencies.
>>
>> So B has a plain old Maven dependency on the bundle inside 'B' that
>> has the API, plus its own.
>>
>> I am trying to work out the POM and feature.xml content so that
>> feature B's feature.xml shows that it depends on 'A', and that it
>> lists only those bundles that are not in A.
>>
>> I've tried a few experiments with feature.xml dependencies, but I end
>> up with either more or less bundles than I was looking to get.
>>
>> Is this even a reasonable thing to do, or should I just let feature B
>> have the redundant bundles?
>>
>>
>>
>> On Mon, Aug 31, 2015 at 1:30 AM, Jean-Baptiste Onofré <[hidden email]>
>> wrote:
>>
>>> name is just the name, you also have the version attribute.
>>>
>>> dependency means that it's a dependency for the resolver, so the resolver
>>> resolves this feature.
>>>
>>> prerequisite means the feature has to be completely installed before
>>> moving
>>> forward on the current feature installation.
>>>
>>> Regards
>>> JB
>>>
>>>
>>> On 08/31/2015 03:28 AM, Benson Margulies wrote:
>>>
>>>>
>>>> I'd like to improve the documentation in the feature schema.
>>>>
>>>> Could someone elaborate for me on the difference between the
>>>> 'dependency' and 'prerequisite' attributes of the feature element used
>>>> to declare a dependency? Since the whole thing is a dependency, why
>>>> does it have a dependency attribute.
>>>>
>>>> Also, am I correct that the 'name' is from the flat namespace, not
>>>> g/a/v?
>>>>
>>>>
>>> --
>>> Jean-Baptiste Onofré
>>> [hidden email]
>>> http://blog.nanthrax.net
>>> Talend - http://www.talend.com
>>>
>>
> --
> Jean-Baptiste Onofré
> [hidden email]
> http://blog.nanthrax.net
> Talend - http://www.talend.com
>



--

Apache Member
Apache Karaf <http://karaf.apache.org/> Committer & PMC
OPS4J Pax Web <http://wiki.ops4j.org/display/paxweb/Pax+Web/> Committer &
Project Lead
blog <http://notizblog.nierbeck.de/>
Co-Author of Apache Karaf Cookbook <http://bit.ly/1ps9rkS>

Software Architect / Project Manager / Scrum Master