karaf-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andreas Pieber <anpie...@gmail.com>
Subject Re: same feature name exists in multi feature repo url
Date Tue, 23 Oct 2012 14:04:22 GMT
Yep. Exactly to the point! Would you mind if I include your summary into
the user manual? :-)

Kind regards, Andreas
On Oct 23, 2012 4:02 PM, "ajs6f@virginia.edu" <ajs6f@virginia.edu> wrote:

> To be clear, if I understand you correctly, you're pointing out that the
> version attribute in feature XML _defines_ the version of the feature that
> the XML describes. The version of the feature that you offer when
> installing via Maven protocol (say, via command-line features:install) is
> what Karaf _searches_ for in available repositories, with ordering behavior
> undefined (howsoever the feature-version in Maven was defined). If you
> don't give a version in your install operation, it'll search for the latest
> non-snapshot in available repositories, with ordering behavior undefined.
> And just to be complete, if you use a feature version in a feature declared
> as a _dependency_ in feature XML, it has the second meaning.
>
> Is that right? Two different meanings, the first of which (defining the
> feature version) _only_ applies to the attribute in XML?
>
> ---
> A. Soroka
> Software & Systems Engineering :: Online Library Environment
> the University of Virginia Library
>
> On Oct 23, 2012, at 9:50 AM, Andreas Pieber wrote:
>
> > Well, since you're using the mvn (maven) Protokoll this need to be
> installed at least in your lokal maven repository. The version of the
> features you've defined in the xml is of NO relevance here. Only the
> version you've given it in your maven repo is relevant. For starting using
> the file: protocol, directly pointing to your features in your file system
> might be the easier option. You can still switch to mvn there once you get
> familiar with the concepts.
> >
> > Kind regards, Andreas
> >
> > On Oct 23, 2012 5:36 AM, "XiLai Dai" <xldai@talend.com> wrote:
> > Hi,
> >
> >
> >
> > One feature xml named feature-a-1.0
> >
> >
> >
> > <?xml version="1.0" encoding="UTF-8"?>
> >
> > <features name="feature_a" xmlns="
> http://karaf.apache.org/xmlns/features/v1.0.0">
> >
> >
> >
> >   <feature name='myfeature' version='1.0'>
> >
> >
> <bundle>mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.jdom/1.1_4</bundle>
> >
> >   </feature>
> >
> >
> >
> > </features>
> >
> >
> >
> > The other feature xml named feature-b-1.0
> >
> >
> >
> > <features name="feature_b" xmlns="
> http://karaf.apache.org/xmlns/features/v1.0.0">
> >
> >
> >
> >   <feature name='myfeature' version='1.0'>
> >
> >      <bundle>mvn:commons-dbcp/commons-dbcp/1.4</bundle>
> >
> >   </feature>
> >
> >
> >
> > </features>
> >
> >
> >
> > Both of them have a feature named “myfeature”/”1.0”. then add feature
> url to karaf:
> >
> >
> >
> > karaf@root>features:addurl mvn:org.test/features_a/1.0/xml
> >
> > karaf@root>features:addurl mvn:org.test/features_b/1.0/xml
> >
> >
> >
> > then install myfeature:  karaf@root>features:install myfeature
> >
> >
> >
> > which is the expected search order for myfeature?  I did some test but
> sometimes myfeature which from the first features xml installed, sometimes
> from the second features.
> >
> >
> >
> > Thanks.
> >
> > Xilai
> >
>
>

Mime
View raw message