You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@karaf.apache.org by koch <ma...@averbis.com> on 2020/11/18 11:51:52 UTC

Upgrading Features

Hi

I'm trying to update a feature.

Documentation (https://karaf.apache.org/manual/latest/provisioning):
You can update a release by installing the same feature (with the same 
SNAPSHOT version or a different version).

So i built a feature and wrapped it into a kar file.  When i drop it 
into the deploy folder the feature gets installed and everything seems 
fine.
Then i built a new instance of this feature (same feature name, but 
higher version).
When i dropped this into the deploy folder it was installed right next 
to the old feature.
Then i had both features up and running in karaf.
What i expected was the deinstallation of the old feature and the 
installation of the new one.

here is my feature.xml file:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<features xmlns="http://karaf.apache.org/xmlns/features/v1.6.0" 
name="foobar">
     <feature name="foobar" description="foobar" 
version="1.0.0-beta-4-SNAPSHOT">
         <details>Plugin Example: foobar</details>
         
<bundle>mvn:de......plugin.examples/foobar/1.0.0-beta-4-SNAPSHOT</bundle>
     </feature>
</features>

What am i doing wrong? Or is my expectation wrong?

Kind regards,
Matthias


-- 
Matthias Koch
Developer

Averbis GmbH
Salzstraße 15
79098 Freiburg
Germany

Fon: +49 761 708 394 21
Fax: +49 761 708 394 10
Email: matthias.koch@averbis.com
Web: https://averbis.com

Headquarters: Freiburg im Breisgau
Register Court: Amtsgericht Freiburg im Breisgau, HRB 701080
Managing Directors: Dr. med. Philipp Daumke, Dr. Kornél Markó


Re: Upgrading Features

Posted by Jean-Baptiste Onofre <jb...@nanthrax.net>.
Fair enough, I will create a Jira related to that.

Thanks for your input,
Regards
JB

> Le 20 nov. 2020 à 08:54, Paul Fraser <pa...@qnenet.com> a écrit :
> 
> On 18/11/2020 11:40 pm, Jean-Baptiste Onofre wrote:
>> I can enhance the Kar service to detect an existing feature and upgrade it.
> 
> In my opinion this would be well worthwhile.
> 
> Paul Fraser
> 
> <paulf.vcf>


Re: Upgrading Features

Posted by Paul Fraser <pa...@qnenet.com>.
On 18/11/2020 11:40 pm, Jean-Baptiste Onofre wrote:
> I can enhance the Kar service to detect an existing feature and upgrade it.

In my opinion this would be well worthwhile.

Paul Fraser


Re: Upgrading Features

Posted by Jean-Baptiste Onofre <jb...@nanthrax.net>.
Hi Matthias,

Not using Kar, if you use feature directly, you can do feature:install -u (or directly feature:update alias).

But KAR consider each feature atomically, so, it considers a new version.

I can enhance the Kar service to detect an existing feature and upgrade it.

Regards
JB

> Le 18 nov. 2020 à 12:51, koch <ma...@averbis.com> a écrit :
> 
> Hi
> 
> I'm trying to update a feature. 
> 
> Documentation (https://karaf.apache.org/manual/latest/provisioning <https://karaf.apache.org/manual/latest/provisioning>):
> You can update a release by installing the same feature (with the same SNAPSHOT version or a different version).
> 
> So i built a feature and wrapped it into a kar file.  When i drop it into the deploy folder the feature gets installed and everything seems fine. 
> Then i built a new instance of this feature (same feature name, but higher version).
> When i dropped this into the deploy folder it was installed right next to the old feature. 
> Then i had both features up and running in karaf. 
> What i expected was the deinstallation of the old feature and the installation of the new one.
> 
> here is my feature.xml file:
> 
> <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
> <features xmlns="http://karaf.apache.org/xmlns/features/v1.6.0" <http://karaf.apache.org/xmlns/features/v1.6.0> name="foobar">
>     <feature name="foobar" description="foobar" version="1.0.0-beta-4-SNAPSHOT">
>         <details>Plugin Example: foobar</details>
>         <bundle>mvn:de......plugin.examples/foobar/1.0.0-beta-4-SNAPSHOT</bundle>
>     </feature>
> </features>
> 
> What am i doing wrong? Or is my expectation wrong?
> 
> Kind regards,
> Matthias
> 
> 
> 
> -- 
> Matthias Koch
> Developer
> 
> Averbis GmbH
> Salzstraße 15
> 79098 Freiburg
> Germany
> 
> Fon: +49 761 708 394 21
> Fax: +49 761 708 394 10
> Email: matthias.koch@averbis.com <ma...@averbis.com>
> Web: https://averbis.com <https://averbis.com/>
> 
> Headquarters: Freiburg im Breisgau
> Register Court: Amtsgericht Freiburg im Breisgau, HRB 701080
> Managing Directors: Dr. med. Philipp Daumke, Dr. Kornél Markó