By default, Maven’s will download all dependency libraries from Maven Central Repository. The central repository is full of Java libraries, but there are still many libraries are missing.

Often times , you need to include other Maven’s remote repositories like Java.net Repository and JBoss repository.

Java.net Repository

1. Add Java.net remote repository details in “pom.xml” file.

<project ...>
<repositories>
    <repository>
      <id>java.net</id>
      <url>http://download.java.net/maven/2</url>
    </repository>
 </repositories>
</project>

2. Done

JBoss Maven Repository

1. Add JBoss remote repository details in “pom.xml” file.

<project ...>
<repositories>
    <repository>
      <id>JBoss repository</id>
      <url>http://repository.jboss.com/maven2/</url>
    </repository>
 </repositories>
</project>

2. Done

Firstly, Maven will download the dependency library from Maven’s central repository, if the library is not found, it will download it from remote repository – Java.net and JBoss repository.

This article was posted in Maven category.

Related Posts