0

My work has its own maven server that it uses. Unfortunately, when I try to add a dependency to http://mvnrepository.com/artifact/commons-dbutils/commons-dbutils/1.6 it is not being found.

My question is how do I modify my settings.xml to allow for a 2nd server, which would be the mvnrepository, but only reference that server if the dependency isn't found on the main server?

Tunaki
  • 132,869
  • 46
  • 340
  • 423
James Oravec
  • 19,579
  • 27
  • 94
  • 160
  • 2
    did you check this http://stackoverflow.com/questions/7065165/maven-repository-lookup-order – A_Di-Matteo Feb 01 '16 at 16:06
  • @A. Di Matteo, Thanks the link didn't quite give me what I needed, but lead me down the road of being able to do other googles/searches and get closer to what I needed. I posted an answer below as a reference. – James Oravec Feb 01 '16 at 18:24

1 Answers1

0

Doing some search on stack overflow, I found the following answer to be useful: Do you know the maven profile for mvnrepository.com?

I did a combination of Tristan and Nicolas' answers, which let me add the following into my settings.xml:

<repository>
  <id>maven repo</id>
  <url>http://central.maven.org/maven2/</url>
  <snapshots>
    <enabled>false</endabled>
  </snapshots>
  <releases>
    <enabled>true</enabled>
  </releases>
</repository>

Closed my project, reopened then reimported the maven dependences and all was good.

Community
  • 1
  • 1
James Oravec
  • 19,579
  • 27
  • 94
  • 160