Just an example for others and a note for myself in case I need to reference this in the future.
Steps:
Add the custom/additional maven repos where you can find the JARs (that are not hosted on maven central or other common repo)
<repositories>
<!-- has some useful JARs not hosted on maven central, a popular alternative repo -->
<repository>
<id>clojars.org</id>
<url>http://clojars.org/repo</url>
</repository>
<!-- needed for javaxt/javaxt-core dependency -->
<!-- this repo has version 1.6.2 -->
<repository>
<id>jspresso.org</id>
<url>http://repository.jspresso.org/maven2</url>
</repository>
<!-- this repo has version 1.4.3 -->
<repository>
<id>ci-dev.renci.org</id>
<url>http://ci-dev.renci.org/nexus/content/repositories/public</url>
</repository>
</repositories>
Then put in the JAR dependencies. For not so common JARs where there's no webpage that shows you what POM XML entry to put in,
you'll need to browse the maven repo via web browser and find the file maven-metadata.xml
for your desired JAR, then get the
values for groupId
, artifactId
, and desired version
for the JAR you want and create a entry for your POM file like
follows:
<dependencies>
<dependency>
<groupId>javaxt</groupId>
<artifactId>javaxt-core</artifactId>
<version>1.6.2</version>
</dependency>
</dependencies>
Then test out by running a maven command to pull the JARs, and verify your desired JAR is saved to your local maven repo.
And if there's issue with these public repos, one can go the alternate route of maven repo self hosting, as in this example using source control with local repo as an alternate maven repo to pull JARs from (where you first download and store the JARs in said repo): https://gist.github.com/daluu/52af7eef52563ddf78fe