AFAIR, it should be fixed in 3.0.2-SNAPSHOT.

Let me check.

Regards
JB

On 07/21/2014 06:20 PM, Stuart McCulloch wrote:
If you want to make sure it only ever checks the system repository then
you could try forcing Pax-URL to treat it as the local Maven repository:

org.ops4j.pax.url.mvn.localRepository=file:${karaf.home}/${karaf.default.repository}

I’ve also found that it helps to comment out the following line,
otherwise it always adds the default Maven repository under
“.m2/repository":

#org.ops4j.pax.url.mvn.defaultLocalRepoAsRemote=false

this seems to be because Pax-URL only checks for the existence of that
setting and assumes any value is true:

https://github.com/ops4j/org.ops4j.pax.url/blob/master/pax-url-aether/src/main/java/org/ops4j/pax/url/mvn/internal/config/MavenConfigurationImpl.java#L272

If you want to make sure it avoids any local Maven settings then you
could try using a dummy settings.xml file:

org.ops4j.pax.url.mvn.settings=${karaf.home}/${karaf.default.repository}/settings.xml#
where settings.xml is added under assembly/system by your build and just
contains <settings/>
org.ops4j.pax.url.mvn.proxySupport=false

and if you know that you have everything installed and want to lock
things down further then you could also remove the default remote
repositories:

org.ops4j.pax.url.mvn.repositories=file:${karaf.home}/${karaf.default.repository}@id=system.repository

just make sure you have all the features you want pre-installed in the
system repository listed under <installFeatures>  :)

On 21 Jul 2014, at 15:57, jkraushaar <[email protected]
<mailto:[email protected]>> wrote:

Hi,

I observed the following behavior of Karaf: When our Karaf custom
distribution is installed on a system which has no ~/.m2 directory yet, it
creates the directory and puts the contents of KARAF_HOME/system there.
These bundles are then installed.

Now, if I install a newer version of our distribution, which references
bundles with the same version number (e.g. 1.0.0-SNAPSHOT), the bundles in
KARAF_HOME/system are ignored and instead the ones from ~/.m2 are
installed,
even if the bundles from system are newer (which is kind of annoying).

I found bug ticket https://issues.apache.org/jira/browse/KARAF-2990 and
already tried the new org.ops4j.pax.url.mvn.cfg from 3.0.2, but the
problem
still exist.

Is there a way to tell Karaf to always use the bundles from
KARAF_HOME/system?

Thanks and regards
Jochen



--
View this message in context:
http://karaf.922171.n3.nabble.com/Karaf-ignores-Bundles-in-KARAF-HOME-system-tp4034337.html
Sent from the Karaf - User mailing list archive at Nabble.com
<http://Nabble.com>.


--
Jean-Baptiste Onofré
[email protected]
http://blog.nanthrax.net
Talend - http://www.talend.com

Reply via email to