Hi Lukasz,

1. I guess it works with you set credentials on the repo URL in 
org.ops4j.pax.url.mvn.repositories (http://foo:bar@url <http://foo:bar@url/>)
2. If the user who runs Karaf has .m2/settings.xml, it should be taken. Else 
you have to define the location of settings.xml via 
org.ops4j.pax.url.mvn.settings
3. Do you have a <server> part for the repository in your settings.xml ?

Regarding the mailing list, can you try user-subscr...@karaf.apache.org 
<mailto:user-subscr...@karaf.apache.org> ? You will receive and email to 
confirm you are subscribed or not.

Regards
JB

> Le 19 juil. 2021 à 10:29, Lukasz Lech <l.l...@ringler.ch> a écrit :
> 
> Hello,
>  
> I have problem getting artifacts from private company maven repository.
>  
> The repository and the credentials are defined in my settings.xml, and maven 
> command is definitely picking them. However, it seems that karaf is not.
>  
> If I don't define the repository in org.ops4j.pax.url.mvn.cfg, I see a stack 
> trace that Karaf checks default repositories, but not those defined in 
> settings.xml.
>  
> If I add our repository to the org.ops4j.pax.url.mvn.cfg : 
> org.ops4j.pax.url.mvn.repositories it says: Not authorized, as if Karaf was 
> failing to pull credentials from settings.xml correctly.
>  
> Most of artifacts needed are in 2nd private repository, that requires no 
> auth, and it was configured for Karaf, but some artifacts are not there (from 
> the other part of the organization) and can be available only from repository 
> that requires credentials, so I have a problem if I do a clean start 
> (deleting local repository).
>  
> How to configure karaf so that it pulls credentials correctly? Is it a bug? 
> I'm using 4.2.8
>  
> P.S. I'm sorry if I won't be able to give any fallback, but I'm not able to 
> respond to the topics using Nabble. I can do posts by sending mail to 
> user@karaf.apache.org <mailto:user@karaf.apache.org>, but I'm unable to 
> respond, since I get no email from the group to my email account. I've 
> already asked about that issue, but without efford. So most likely I'm able 
> only to post new issues.
>  
> Best regards,
> Lukasz Lech

Reply via email to