Maven repo
- A directory of JAR file with pom.xml file
- used to search the dependencies
- Order of searching dependencies : Local -> Central -> Remote
1. Local
- in local system (Default : %USER_HOME%/.m2 directory)
- To change location : MAVEN_HOME/conf/settings.xml
- Directory automatically created when you run any maven command
Change location of local repo in settings.xml
<settings>
<localRepository>/path</localRepository>
</settings>
2. Central
- Repo created by Maven on internet (Location : http://repo1.maven.org/maven2/)
- contains common libraries
3. Remote
- Available on internet
- Some libraries which are not available on Central repo , they can be found in Remote repo
- Libraries (to use from Remote repo) are specified in pom.xml
Using libraries from Remote repo
<project>
....
<dependencies>
<dependency>
<groupId>org.apache.wicket</groupId>
<artifactId>wicket</artifactId>
<version>1.4.21</version>
</dependency>
</dependencies>
</project>
No comments:
Post a Comment
Note: only a member of this blog may post a comment.