Hi,
nope, defaultLocalRepoAsRemote=true unfortunately changes nothing.

When loading my feature, the error is:
2018-07-10 07:51:20,328 | DEBUG | AbstractRetryableDownloadTask | 10 - 
org.apache.karaf.features.core - 4.0.4 |  | Error downloading 
mvn:my.group/some.api/[5.2,6): Error resolving artifact 
my.group/some.api:[5.2,6). Retrying in approx 14171 ms.

When installing via console:
karaf@root()> bundle:install mvn:my.group/some.api/[5.2,6)
Bundle IDs:
Error executing command: Error installing bundles:
        Unable to install bundle mvn:my.group/some.api/[5.2,6)


Now I am thinking about to place the generated bundle in the deploy folder 
instead of system as a workaround.


BTW: I tried the same with Karaf 4.2.0 (Win 7, Java 8), there the console shuts 
down/crashes immediately without any Exception after executing the command. I 
will raise a Jira on this.

2018-07-10T08:13:03,708 | DEBUG | RMI TCP Connection(1)-127.0.0.1 | tcp         
                     |  -  -  | RMI TCP Connection(1)-127.0.0.1: close 
connection
$ bundle:install mvn:my.group/some.api/[5.2,6)
2018-07-10T08:13:14,235 | DEBUG | Karaf local console user karaf | jline        
                    | 40 - org.jline.terminal - 3.6.2 | Removing shutdown-hook: 
Thread[JLine Shutdown Hook,5,main]
2018-07-10T08:13:14,237 | DEBUG | FelixShutdown    | CommandExtender            
      | 33 - org.apache.karaf.shell.core - 4.2.0 | org.apache.felix.framework 
(0): Starting destruction process
2018-07-10T08:13:14,239 | DEBUG | FelixShutdown    | CommandExtender            
      | 33 - org.apache.karaf.shell.core - 4.2.0 | org.apache.felix.framework 
(0): Not an extended bundle or destruction of extension already finished
...


Regards,
  Volker


-----Ursprüngliche Nachricht-----
Von: Jean-Baptiste Onofré [mailto:[email protected]] 
Gesendet: Montag, 9. Juli 2018 16:21
An: [email protected]
Betreff: Re: Bundle resolve with range does not work on bundles in system 
repository

Hi,

what's the exception you have when bundle is in system ?

Maybe you can try to change etc/org.ops4j.pax.url.mvn.cfg file to use local 
repositories as remotes.

org.ops4j.pax.url.mvn.defaultLocalRepoAsRemote = true

Both localRepository and defaultRepositories (where system repository is
defined) are considered as local.

Regards
JB

On 09/07/2018 16:16, Althaus, Volker wrote:
> Hello
> I am facing a problem when resolving bundles with the mvn protocol and a 
> range. 
> 
> Example feature.xml
> 
> <feature name="some-api " version="...">
>   <bundle>mvn:my.group/some.api/[5.2,6)</bundle>
> </feature>
> 
> If the bundle resides in the local Karaf repository under "system", the 
> bundle could not be resolved. "LATEST" also does not work, I will always have 
> to specify a concrete version.
> However, if it lies in the local .m2 Maven repository, it works! It think 
> because the Maven repo is indexed properly with metadata and the system 
> directory is not.
> 
> Unfortunately I need the range specification because the bundle is built and 
> placed under "system" at customers site, with a minor version we don't 
> exactly know before.
> 
> Any ideas how to solve this? Version is Karaf 4.0.4.
> 
> 
> TIA & Regards
>   Volker

CENIT AG, Industriestrasse 52-54, 70565 Stuttgart, Tel.: +49 711 7825-30, Fax: 
+49 711 7825-4000, Internet: www.cenit.com
Geschaeftsstellen (Branch Offices): Berlin, Frankfurt, Hamburg, Hannover, 
Muenchen, Oelsnitz, Ratingen, Saarbruecken
Vorstandsmitglieder (Members of the Board): Kurt Bengel  (CEO), Matthias 
Schmidt  (CFO)
Aufsichtsratsmitglieder (Supervisory Board Members): Prof. Dr. Oliver Riedel 
(Vorsitzender des Aufsichtsrats / Chairman of the Supervisory Board), Stephan 
Gier, Ricardo Malta
Bankverbindungen (Bank Accounts):
Deutsche Bank (BLZ 600 700 70) Kto. 1661 040 IBAN : DE85 6007 0070 0166 1040 00 
SWIFT-CODE : DEUTDESS,
Commerzbank (BLZ 600 400 71) Kto. 532 015 500 IBAN : DE83 6004 0071 0532 0155 
00 SWIFT-Code : COBADEFF600,
Registergericht (Registry court): Amtsgericht Stuttgart
Handelsregister (Commercial Register): HRB Nr. 19117
Umsatzsteuer (VAT) ID: DE 147 862 777

Reply via email to