Karaf uses the .m2 directory to cache jars it reads from remote locations. So unless you have everything in your system dir already disabling the local .m2 repository might severely affect performance of your system.

You will also depend more on remote repositories if you do not have the local cache. With the .m2 dir the bets are good you have all bundles locally in the case your remote
repository becomes unavailable.

There is unfortunately the issue that karaf even caches jars from system dir in .m2. This is due to the fact that we use the system dir like a remote repo and caching these jars is how maven reacts by default in this case.

Christian


Am 24.07.2014 16:45, schrieb thully:
We have a project (Cytoscape) that uses a custom distribution of Karaf
(currently 2.2.11) to manage OSGi/dependencies. We are in the process of
upgrading to Karaf 3.0.1 for our next release, and have already done this on
our development branch.

For the most part, we've got everything working properly, though there is
one nagging issue we're still dealing with. Since the upgrade to Karaf 3, it
seems that a local Maven repository is created at ~/.m2 every time we start
if one doesn't exist with copies of all the bundles we provide in the system
repository. While it is possible to change
org.ops4j.pax.url.mvn.localRepository in org.ops4j.pax.utl.mvn.cfg, that
just changes the location. We're still stuck with the newly-created
repository with an extra copy of everything, which wastes disk space
unnecessarily (particularly on end-user systems where they won't be using
Maven).

Given that, is there a way to disable this repository creation? I'd prefer
to continue looking in .m2 (so that developers can test updated bundles),
but don't want to create it on end user systems.



--
View this message in context: 
http://karaf.922171.n3.nabble.com/Disabling-local-repository-creation-on-Karaf-3-tp4034426.html
Sent from the Karaf - User mailing list archive at Nabble.com.


--
Christian Schneider
http://www.liquid-reality.de

Open Source Architect
Talend Application Integration Division http://www.talend.com

Reply via email to