You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@karaf.apache.org by Nick Baker <nb...@pentaho.com> on 2015/09/17 16:50:16 UTC

features-add-to-repository and multiple versions of a feature

Hey All,

We're supplying customized versions for some of the core features: http, kar in order to provide different bundles. These features are all versioned higher than the stock ones and are indeed being used instead of the stock ones at runtime.

The issue is that in assembly these override features' bundles are not being added to the system/ repository. Production environments are downloading them from maven which is unacceptable for our customers. It seems that features-add-to-repository isn't honoring the highest-version feature the same way the FeaturesService is.

Anyone run into this one before? I'm about to create a bogus feature with these bundles, referenced in the assembly simply to get around the problem but it's not a long-term solution.

Thanks,
Nick

Re: features-add-to-repository and multiple versions of a feature

Posted by Achim Nierbeck <bc...@googlemail.com>.
Hi,

this might be a really, really late reply :D
But did you consider on using the karaf-maven-plugin for creating a custom
assembly where those bootfeatures are used?
In that scenario it shouldn't be much of an issue.
But maybe I'm wrong and most likely you already found something that solved
it :D

regards, Achim


2015-09-17 21:04 GMT+02:00 Nick Baker <nb...@pentaho.com>:

> Sure kar was an easy one. We’re waiting on the 3.0.5 release so we’re
> overriding it to load our patched core bundle instead. Yes this is
> something that we have to constantly maintain as releases increase :(
>
>   <feature name="kar" version="3.7.5" description="Provide KAR (KARaf
> archive) support" resolver="(obr)">
> *    <bundle
> start-level="30">mvn:org.apache.karaf.kar/org.apache.karaf.kar.core/3.0.5-p</bundle>*
>     <bundle
> start-level="30">mvn:org.apache.karaf.kar/org.apache.karaf.kar.command/3.0.3</bundle>
>     <bundle
> start-level="30">mvn:org.apache.karaf.deployer/org.apache.karaf.deployer.kar/3.0.3</bundle>
>   </feature>
>
> Http is another one we override as Karaf in some of our products is
> running within an existing Application Server and we bridge the HttpService
> out to the Servlet environment supplied by the server (felix-http-bridge).
> That one is more involved as some of the features declare a specific
> version of http so we’ve overridden them as well to direct them to our
> customized version.
>
> -Nick
>
> From: Achim Nierbeck <bc...@googlemail.com>
> Reply-To: "user@karaf.apache.org" <us...@karaf.apache.org>
> Date: Thursday, September 17, 2015 at 2:50 PM
> To: "user@karaf.apache.org" <us...@karaf.apache.org>
> Subject: Re: features-add-to-repository and multiple versions of a feature
>
> Hi Nick,
>
> I'm not quite sure what you're doing, so let's try clear some question
> marks from my view.
> core features in higher version, are you merely updating to newer
> available versions or are you creating "new" versions which will collide in
> future if those
> bundles are actually bumped to that version?
>
> Is it possible that some other bundles/features do have requirements for
> certain features which are exactly the version from the std. repo.
> As an example take the http feature and the http commands, those commands
> require certain pax-web- bundles in certain versions. So might it
> be possible that you have some "transitive" dependencies in there
> somewhere?
>
> Could you give us a view of the customized features you got?
>
> regards, Achim
>
>
> 2015-09-17 16:50 GMT+02:00 Nick Baker <nb...@pentaho.com>:
>
>> Hey All,
>>
>> We’re supplying customized versions for some of the core features: http,
>> kar in order to provide different bundles. These features are all versioned
>> higher than the stock ones and are indeed being used instead of the stock
>> ones at runtime.
>>
>> The issue is that in assembly these override features’ bundles are not
>> being added to the system/ repository. Production environments are
>> downloading them from maven which is unacceptable for our customers. It
>> seems that features-add-to-repository isn’t honoring the highest-version
>> feature the same way the FeaturesService is.
>>
>> Anyone run into this one before? I’m about to create a bogus feature with
>> these bundles, referenced in the assembly simply to get around the problem
>> but it’s not a long-term solution.
>>
>> Thanks,
>> Nick
>>
>
>
>
> --
>
> 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
>
>


-- 

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

Re: features-add-to-repository and multiple versions of a feature

Posted by Nick Baker <nb...@pentaho.com>.
Sure kar was an easy one. We're waiting on the 3.0.5 release so we're overriding it to load our patched core bundle instead. Yes this is something that we have to constantly maintain as releases increase :(

  <feature name="kar" version="3.7.5" description="Provide KAR (KARaf archive) support" resolver="(obr)">
    <bundle start-level="30">mvn:org.apache.karaf.kar/org.apache.karaf.kar.core/3.0.5-p</bundle>
    <bundle start-level="30">mvn:org.apache.karaf.kar/org.apache.karaf.kar.command/3.0.3</bundle>
    <bundle start-level="30">mvn:org.apache.karaf.deployer/org.apache.karaf.deployer.kar/3.0.3</bundle>
  </feature>

Http is another one we override as Karaf in some of our products is running within an existing Application Server and we bridge the HttpService out to the Servlet environment supplied by the server (felix-http-bridge). That one is more involved as some of the features declare a specific version of http so we've overridden them as well to direct them to our customized version.

-Nick

From: Achim Nierbeck <bc...@googlemail.com>>
Reply-To: "user@karaf.apache.org<ma...@karaf.apache.org>" <us...@karaf.apache.org>>
Date: Thursday, September 17, 2015 at 2:50 PM
To: "user@karaf.apache.org<ma...@karaf.apache.org>" <us...@karaf.apache.org>>
Subject: Re: features-add-to-repository and multiple versions of a feature

Hi Nick,

I'm not quite sure what you're doing, so let's try clear some question marks from my view.
core features in higher version, are you merely updating to newer available versions or are you creating "new" versions which will collide in future if those
bundles are actually bumped to that version?

Is it possible that some other bundles/features do have requirements for certain features which are exactly the version from the std. repo.
As an example take the http feature and the http commands, those commands require certain pax-web- bundles in certain versions. So might it
be possible that you have some "transitive" dependencies in there somewhere?

Could you give us a view of the customized features you got?

regards, Achim


2015-09-17 16:50 GMT+02:00 Nick Baker <nb...@pentaho.com>>:
Hey All,

We're supplying customized versions for some of the core features: http, kar in order to provide different bundles. These features are all versioned higher than the stock ones and are indeed being used instead of the stock ones at runtime.

The issue is that in assembly these override features' bundles are not being added to the system/ repository. Production environments are downloading them from maven which is unacceptable for our customers. It seems that features-add-to-repository isn't honoring the highest-version feature the same way the FeaturesService is.

Anyone run into this one before? I'm about to create a bogus feature with these bundles, referenced in the assembly simply to get around the problem but it's not a long-term solution.

Thanks,
Nick



--

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


Re: features-add-to-repository and multiple versions of a feature

Posted by Achim Nierbeck <bc...@googlemail.com>.
Hi Nick,

I'm not quite sure what you're doing, so let's try clear some question
marks from my view.
core features in higher version, are you merely updating to newer available
versions or are you creating "new" versions which will collide in future if
those
bundles are actually bumped to that version?

Is it possible that some other bundles/features do have requirements for
certain features which are exactly the version from the std. repo.
As an example take the http feature and the http commands, those commands
require certain pax-web- bundles in certain versions. So might it
be possible that you have some "transitive" dependencies in there somewhere?

Could you give us a view of the customized features you got?

regards, Achim


2015-09-17 16:50 GMT+02:00 Nick Baker <nb...@pentaho.com>:

> Hey All,
>
> We’re supplying customized versions for some of the core features: http,
> kar in order to provide different bundles. These features are all versioned
> higher than the stock ones and are indeed being used instead of the stock
> ones at runtime.
>
> The issue is that in assembly these override features’ bundles are not
> being added to the system/ repository. Production environments are
> downloading them from maven which is unacceptable for our customers. It
> seems that features-add-to-repository isn’t honoring the highest-version
> feature the same way the FeaturesService is.
>
> Anyone run into this one before? I’m about to create a bogus feature with
> these bundles, referenced in the assembly simply to get around the problem
> but it’s not a long-term solution.
>
> Thanks,
> Nick
>



-- 

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