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 missing. Often times , you need to include other popular Maven’s remote repositories like Java.net Repository for Maven 2 and JBoss Maven 2 repository
Add the Java.net Repository in pom.xml
1) Add remote repository detail in “pom.xml” file
<project ...> <repositories> <repository> <id>java.net</id> <url>http://download.java.net/maven/2</url> </repository> </repositories> </project>
2) Done
Add the JBoss Maven 2 Repository in pom.xml
1) Add remote repository detail in “pom.xml” file
<project ...> <repositories> <repository> <id>JBoss repository</id> <url>http://repository.jboss.com/maven2/</url> </repository> </repositories> </project>
2) Done
Now, Maven will download the library from Maven’s central repository, if the library can not find, it will download it from Java.net and JBoss repository.
P.S Try consider using Archiva for your project repository management. As both “Maven Central Repository” and “Java.net Repository” are default remote repository.


