Maven repository is divided into 3 types :
Maven local repository : It' place where all project dependency libraries which are specified in project's pom.xml are stored here after downloaded by Maven
Default to home directory is
<!-- localRepository
| The path to the local repository maven will use to store artifacts.
|
| Default: ~/.m2/repository
<localRepository>/path/to/local/repo</localRepository>
Add ex. <localRepository>C:/mavenrepo< /localRepository> and it's done
Maven Central Repository : It's place from where maven download all project libraries. if maven unable to find dependency libraries in local repository then it looks into this repository.
Central repository location is : http://search.maven.org
Maven Remote Repository : By default maven download libraries from central repository. if it's not able to find then it will look into remote repository. You need to include this repo into your project's pom.xml as
<repositories>
<repository>
<id>java.net</id>
<url>http://download.java.net/maven/2</url>
</repository>
</repositories>
</repositories>
Remote repository location : http://download.java.net/maven/2/.
- Maven local Repository
- Maven Central Repository
- Maven Remote Repository
Maven local repository : It' place where all project dependency libraries which are specified in project's pom.xml are stored here after downloaded by Maven
Default to home directory is
- Unix/Mac OS X – ~/.m2 on
- Windows – C:\Documents and Settings\
.m2 on Windows
<!-- localRepository
| The path to the local repository maven will use to store artifacts.
|
| Default: ~/.m2/repository
<localRepository>/path/to/local/repo</localRepository>
Add ex. <localRepository>C:/mavenrepo< /localRepository> and it's done
Maven Central Repository : It's place from where maven download all project libraries. if maven unable to find dependency libraries in local repository then it looks into this repository.
Central repository location is : http://search.maven.org
Maven Remote Repository : By default maven download libraries from central repository. if it's not able to find then it will look into remote repository. You need to include this repo into your project's pom.xml as
<repositories>
<repository>
<id>java.net</id>
<url>http://download.java.net/maven/2</url>
</repository>
</repositories>
</repositories>
Remote repository location : http://download.java.net/maven/2/.
No comments:
Post a Comment