# Why add OpenMRS repositories to Maven settings.xml?

**URL:** <https://talk.openmrs.org/t/why-add-openmrs-repositories-to-maven-settings-xml/13983>\
**Category:** Development\
**Tags:** openmrs-sdk\
**Created:** [November 2, 2017, 12:49pm UTC](https://talk.openmrs.org/t/why-add-openmrs-repositories-to-maven-settings-xml/13983 "2017-11-02T12:49:44Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![gayanw](https://talk.openmrs.org/letter_avatar/gayanw/32/6_449c533f586939b6e5f246632a46421f.png) [@gayanw](https://talk.openmrs.org/u/gayanw)\
**Post date:** [November 2, 2017, 12:49pm UTC](https://talk.openmrs.org/t/why-add-openmrs-repositories-to-maven-settings-xml/13983/1 "2017-11-02T12:49:44Z")

</div>

I see that the Maven’s global settings.xml is being used to configure OpenMRS repositories. But the problem seems to be that this cause even non-openmrs projects to fetch build dependencies from OpenMRS repositories.

Quoted from: [Maven – Settings Reference](https://maven.apache.org/settings.html#Repositories)

> The settings element in the settings.xml file contains elements used to define values which configure Maven execution in various ways, like the pom.xml, but should not be bundled to any specific project, or distributed to an audience.

---

<div class="post-metadata">

**Author:** ![raff](https://talk.openmrs.org/user_avatar/talk.openmrs.org/raff/32/11894_2.png) [@raff](https://talk.openmrs.org/u/raff)\
**Post date:** [November 2, 2017, 1:14pm UTC](https://talk.openmrs.org/t/why-add-openmrs-repositories-to-maven-settings-xml/13983/2 "2017-11-02T13:14:51Z")

</div>

It’s handy for working with OpenMRS SDK so that maven knows from where to fetch SDK updates. The OpenMRS repo proxies JCenter, which is also handy for fetching libraries published there.

Are you having any issue with that setting?

---

<div class="post-metadata">

**Author:** ![gayanw](https://talk.openmrs.org/letter_avatar/gayanw/32/6_449c533f586939b6e5f246632a46421f.png) [@gayanw](https://talk.openmrs.org/u/gayanw)\
**Post date:** [November 20, 2017, 8:56am UTC](https://talk.openmrs.org/t/why-add-openmrs-repositories-to-maven-settings-xml/13983/3 "2017-11-20T08:56:01Z")

</div>

Say that I have a maven project that set to fetch dependencies only from some certain remote repository.

If I run mvn, it will still look in for dependencies from [openmrs.org/nexus](http://openmrs.org/nexus) repositories. Currently I’m not having any particular issue. It seems to slow down the download process however.

---

<div class="post-metadata">

**Author:** ![sharif](https://talk.openmrs.org/user_avatar/talk.openmrs.org/sharif/32/11982_2.png) [@sharif](https://talk.openmrs.org/u/sharif)\
**Post date:** [October 2, 2019, 8:45am UTC](https://talk.openmrs.org/t/why-add-openmrs-repositories-to-maven-settings-xml/13983/4 "2019-10-02T08:45:52Z")

</div>

@raff, @gayanw am having issues with settings.xml when i was creating a module using sdk.The only problem arise from the settings.xml file. Any help with be appreciated thanks

---

<div class="post-metadata">

**Author:** ![mozzy](https://talk.openmrs.org/user_avatar/talk.openmrs.org/mozzy/32/11815_2.png) [@mozzy](https://talk.openmrs.org/u/mozzy)\
**Post date:** [October 2, 2019, 12:29pm UTC](https://talk.openmrs.org/t/why-add-openmrs-repositories-to-maven-settings-xml/13983/5 "2019-10-02T12:29:47Z")

</div>

@sharif , since we are not magicians 😀 , can you be more detailed on the error you get , what steps have you taken etc ??

---

<div class="post-metadata">

**Author:** ![sharif](https://talk.openmrs.org/user_avatar/talk.openmrs.org/sharif/32/11982_2.png) [@sharif](https://talk.openmrs.org/u/sharif)\
**Post date:** [October 4, 2019, 6:52am UTC](https://talk.openmrs.org/t/why-add-openmrs-repositories-to-maven-settings-xml/13983/6 "2019-10-04T06:52:28Z")

</div>

@mozzy thanks , the problem was with maven settings where by it was pointed to jre than jdk on the classpath. @k-joseph helped me out , am now out of any blocker so fur thanks for concern
