Central repository url is not getting picked during maven build in eclipse oxygen

891 views Asked by At

I have imported a maven project in Eclipse Oxygen. I have added settings.xml to the eclipse as below:

Windows -> Preference -> Maven -> User Setting -> browser to the the settings.xml

Now settings.xml file is having url pointing to central repository(like: https://mydomain.cloud.repo/*) other than default maven central repository(https://repo.maven.apache.org/*). But when i am building my project as below, it is still trying to download the dependency from maven central repository but not the one updated in settings.xml.

pom.xml -> right click run as -> maven install

Can any one tell me what could be the reason and how can i resolve this issue.

1

There are 1 answers

0
Jim Sellers On

If you're only going through a single maven repo, then make sure that you have

<mirrorOf>*</mirrorOf>

https://maven.apache.org/guides/mini/guide-mirror-settings.html#using-a-single-repository