Re: Karaf distributions and system repository

2018-02-26 Thread Jean-Baptiste Onofré
Hi Ryan,

To copy a feature (and contents) in the system folder, it has to be an installed
feature.

That's the expected behavior as by default, Karaf first checks in the "Karaf
user" .m2/repository,  then it goes in system repo and finally in any repo
defined in etc/org.ops4j.pax.url.mvn.cfg.

It's well explained (IMHO) in the user guide and dev guide (custom disto).

Regards
JB

On 02/25/2018 09:32 PM, Ryan Moquin wrote:
> 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

-- 
Jean-Baptiste Onofré
jbono...@apache.org
http://blog.nanthrax.net
Talend - http://www.talend.com


Re: Karaf distributions and system repository

2018-02-26 Thread XiLai Dai
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 
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


Karaf distributions and system repository

2018-02-25 Thread Ryan Moquin
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