You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@karaf.apache.org by ivoleitao <Iv...@gmail.com> on 2017/04/23 08:18:50 UTC

Problem with KAR deployer

Hi,

I'm using karaf 4.1.1 and I've created a custom distribution built around a
number of custom features. At development time I start  the custom karaf
server and after code changes I create a kar file with the changed bundles
(I have a kar file by logical package of bundles, in my case a logical
package is all bundles of each microservice) and upload it to the deploy
folder via ssh (via maven-wagon-plugin).

The problem is that my changes are not considered. One important thing here
is that I already have a version of those bundles in the system directory.
To make things clear I create the custom distribution with my custom
features in bootRepositories and in bootFeatures (example bellow) :

<plugin>
  <groupId>org.apache.karaf.tooling</groupId>
  <artifactId>karaf-maven-plugin</artifactId>
  <configuration>
    <bootRepositories combine.children="append">
     
<repository>mvn:com.acme/microservice-karafarchive/${my.version}/xml/features</repository>
    </bootRepositories>
    <bootFeatures combine.children="append">
      <feature>my-feature</feature>
    </bootFeatures>
  </configuration>
</plugin>

I've verified that the kar is correctly uploaded to the deploy folder and
decompressed to to the data/kar folder. However what I have previously in
the system folder is not updated. One way to make it work is to start the
custom distribution without the the bootRepositories and bootFeatures filled
as presented above. With that approach the bundles are loaded from the
data/kar and I'm able to update them via ssh to the deploy folder as
explained above.

This does not solve my problem because I want to have custom distribution
that is easily updated via ssh and I want to start with the bundles already
installed.

This is somewhat similar to the problem described in 
http://karaf.922171.n3.nabble.com/kar-install-doesn-t-work-as-documented-td4044108.html

I've not tried but I'm tempted to change karStorage=${karaf.data}/kar in the
etc/org.apache.karaf.kar.cfg to point to the system folder. I'm not
completely sure if that is a good idea in a running instance however.

Tnks in advance,
Best Regards,
Ivo Leitão




--
View this message in context: http://karaf.922171.n3.nabble.com/Problem-with-KAR-deployer-tp4050227.html
Sent from the Karaf - User mailing list archive at Nabble.com.

Re: Problem with KAR deployer

Posted by ivoleitao <Iv...@gmail.com>.
ivoleitao wrote
> An update, I've found https://issues.apache.org/jira/browse/KARAF-3779 in
> karaf JIRA. It seems that the previous behavior was to copy to the system
> folder as I was suggesting...
> 
> Why was it changed ? It safe to change to system folder again via
> configuration ?
> 
> Best Regards,
> Ivo Leitão

Nevermind this JIRA has nothing to do with the problem. Also after looking
at the code I don't think changing to the system folder will solve the
problem. 

Well the question remains however, how can i update the bundles in the
system folder with a kar file ? It seems that it's not possible...



--
View this message in context: http://karaf.922171.n3.nabble.com/Problem-with-KAR-deployer-tp4050227p4050229.html
Sent from the Karaf - User mailing list archive at Nabble.com.

Re: Problem with KAR deployer

Posted by ivoleitao <Iv...@gmail.com>.
An update, I've found https://issues.apache.org/jira/browse/KARAF-3779 in
karaf JIRA. It seems that the previous behavior was to copy to the system
folder as I was suggesting...

Why was it changed ? It safe to change to system folder again via
configuration ?

Best Regards,
Ivo Leitão



--
View this message in context: http://karaf.922171.n3.nabble.com/Problem-with-KAR-deployer-tp4050227p4050228.html
Sent from the Karaf - User mailing list archive at Nabble.com.