I think it's the normal behavior as by default karaf adds the system folder as 
a repo (see the org.ops4j.pax.url.mvn.defaultRepositories property in the 
etc/org.ops4j.pax.url.mvn.cfg), so the search order is system folder -> local 
maven repo -> remote maven repo.


We also build karaf distribution in our product as similar what you did, the 
new build is triggered by changes commits or daily on CI jenkins, then 1) QA 
always pick up the latest build to do manual/auto testing 2) for developers, we 
can do quick testing by remove the relevant feature/bundles from system folder 
after "mvn clean install" them (or comment out the 
org.ops4j.pax.url.mvn.defaultRepositories property), then feature:repo-refresh 
or bundle:update will take effect for this testing purpose.


Regards.

Xilai

________________________________
From: Ryan Moquin <fragility...@gmail.com>
Sent: Monday, February 26, 2018 4:32:45 AM
To: user@karaf.apache.org
Subject: Karaf distributions and system repository

When building a karaf distribution, I have my main features xml defined in 
runtime scope but non of the features as installed or boot features.  This 
results in the features xml file being copied to the system repository of the 
distribution.  This is handy since I can skip the feature:repo-add command when 
I then run the distribution to test it.  It appears that this has the side 
effect that if you updated the features xml (such as when testing snapshots), 
you can't refresh the features xml that is in the system repository (well you 
can, but it won't pick up changes from the maven repository), you have to 
rebuild the whole distribution.  I wanted to find out if that is expected 
behavior and if the only option is to not have the feature defined in the 
distribution so that it will be loaded and refreshable from the local maven 
repo?

Thanks!

Ryan

Reply via email to