karaf-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jean-Baptiste Onofré ...@nanthrax.net>
Subject Re: Some thoughts about the system dir and artifact resolution on trunk
Date Tue, 06 Mar 2012 12:38:11 GMT
Hi Christian,

My comment inline:

> we recently switched to pax-url-ather on trunk

We switched pax-url-aether on trunk quite one year ago:

   Revision 1090691
   Date:   Sat Apr 9 21:42:13 2011 +0000
  [KARAF-529] - Upgrade to Pax URL 1.3.2 using pax-ur-aether for mvn: urls

> - When developing either karaf or custom bundles I do mvn install. So
> karaf should ideally use the snapshots from the local maven repo if they
> are newer then the ones from system dir
It should be the case

> - Basically Karaf should do artifact resolution like maven. So it should
> first look in the local repo and only consult external repos if
> something is not found or for snapshots check for newer versions after a
> certain time
It behaves the same way. If you don't have the maven-metadata-local.xml 
in your local repo, your SNAPSHOT artifact will ALWAYS be overrided by 
It's one of the big change between Maven 2 and Maven 3.
It's not always related to local repo, but also for remote repo. I mean 
that if you don't use the deploy plugin, the remote repo will contain 
unusable artifacts.

> - The system dir should be read only and be consulted before real
> external repos if possible
Agree, it should be easily do-able in pax-url-aether.

> - Karaf should be able to run in a offilne mode where it does not need
> an internet connection. Of course it is then limited to what is
> available in the local maven repo and in the system dir
It's already the case if you comment all repositories in the 
etc/org.ops4j.pax.url.mvn.cfg file.
However, a dedicated property for that is better


for instance.

> So how does the system dir fit in? Currently it is at least partly
> treated as a local maven repo. If something is missing it is downloaded
> to the system dir. On the other hand it seems to need metadata for
> snapshots to be found. So when resolving artifacts it seems to be
> treated as a remote repo.
> I think the system dir should be treated like an external repo. That
> would ensure it is readonly. Of course that means that we have to
> provide all necessary metadata but that already seems to work at least
> partly. This of course means that we can not simply switch into the
> "offilne" mode by using the equivalent of -o. Perhaps we can instead
> tell maven to only use the given repos and not search any others.

I think we are not so far. Having read-only and offline should be the 
two new features to add in pax-url-aether.


> I hope my thoughts were not too confusing and would be interested what
> you excpect from the karaf artifact resolution and how we could achieve it.
> Christian

Jean-Baptiste Onofré
Talend - http://www.talend.com

View raw message