You should ask karaf specific question on the karaf users list.

Anyway, I suppose you're talking about maven resolution, not osgi resolution
which is completely different.

The thing is that the maven url handler is nothing more than a url handler:
i.e. it can grab an input stream from a url. This input stream is then given
to the osgi framework if you use the osgi:install command  for example.  So
the two things are completely separated and the maven url handler has no way
to guess if the bundle is installed or not.  This is something that the osgi
framework takes in charge, mostly by making sure the bundle symbolic name +
bundle version is unique.   But in order to do that, the osgi framework
needs to get the input stream, read the manifest and check the headers.

As for the order in which the maven url handler looks for the artifact, it
can be fully configured and you can change it if you want, but your ordering
is correct for #1 #2 #3.   As I explained above, #4 is handled by the osgi
framework and is completely unrelated.

There's really no way to bypass that, unless you use some tool like OBR to
determine which bundles need to be installed before-hand.

On Tue, Oct 5, 2010 at 18:01, <[email protected]> wrote:

>
>
> All,
>
>
>
> Recently I was reviewing my logs, and noticed something strange.  The order
> in which bundles are resolved in Karaf 2.0.0 appears to be:
>
> 1) look in the system directory (called "local repository"),
>
> 2) Look in the local repository located in the users home/.m2 directory,
>
> 3) Look in all remote repositories,
>
> 4) Look to see if the bundle is already installed and active.
>
>
>
> My question is, why doesn't Karaf look FIRST to see if the bundle is
> already installed and active within its OSGi environment?  This would make
> more sense than the way it is currently done.  Can anyone tell my why the
> above order is used?
>
>
>
> v/r,
>
>
>
> Mike Van
>



-- 
Cheers,
Guillaume Nodet
------------------------
Blog: http://gnodet.blogspot.com/
------------------------
Open Source SOA
http://fusesource.com

Reply via email to