How to add remote repository in Maven
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.
- Java Core Technology - Java RegEx, Java XML, Java I/O, Java Misc
- J2EE Frameworks - Hibernate, Spring 2.5, Spring MVC, Struts 1.x, Struts 2.x
- Build Tools - Maven, Archiva
- Unit Test - jUnit, TestNG
- Client Scripts - jQuery