TestingDocs.com
Software Testing website
  • Automation
    • Selenium
    • JBehave Framework
  • Tutorials
    • MySQL Tutorials
    • Testlink
    • Maven
    • Git
  • IDEs
    • IntelliJ IDEA
    • Eclipse
  • Flowcharts
    • Flowgorithm
    • Raptor
  • About

Apache Maven

Understanding Maven Repositories

Maven

Introduction

A repository is a directory where maven build artifacts are stored. Different types of Maven repositories are as follows

  • Local Repository
  • Central Repository
  • Remote Repository

Local Repository

It is your local folder in which artifacts and dependencies are stored on your computer. Maven automatically downloads the dependencies into the local repository.

Default location of Maven local repository is .m2 folder. Default: ${user.home}/.m2/repository

<localRepository> in settings.xml file can be used to override the local repository directory location.

 

<!-- localRepository
 | The path to the local repository maven will use to store artifacts.
 |
 | Default: ${user.home}/.m2/repository
 <localRepository>/path/to/local/repo</localRepository>
 -->

 

The Central Repository

This is the repository provided by the community. It is located on repo.maven.apache.org. This repository contains a large number of artifacts from different providers.

 

Central Repo

 

It contains the jars and artifacts that are commonly used. You can search the repository for relevant jars and artifacts as shown below.

 

Central Repository

Remote Repository

Remote repositories are custom internal repositories containing artifacts used by projects in the enterprise. This is a remote folder in which jars and other build artifacts are stored. These can be located on internal servers within your enterprise. Furthermore, you can specify the remote repositories in the POM.xml file. Maven will download the dependency from this repository.

<repositories>
 <repository>
 <id>sampleorganization.repo</id>
 <url>http://www.sampleorg.com/maven/etc</url>
 </repository>
</repositories>

 

Maven Tutorials on this website can be found at:
https://www.testingdocs.com/apache-maven-tutorial/

For more details on the Apache Maven, visit the official website at:
https://maven.apache.org/

Related Posts

Maven Download Verification Win11

Apache Maven /

Download Maven on Windows 11

Invalid Target Java Error

Apache Maven /

Fix Fatal Error compiling: Invalid target release in Maven Project

Maven Project from archetype

Apache Maven /

Create Maven Project from Archetype in NetBeans

Create New Project

Apache Maven /

Create a Maven Project skip archetype

Maven Download Button

Apache Maven /

Install Maven on Ubuntu Linux

‹ Maven Automation Questions› Maven Dependencies, Plugins and Repositories

Recent Posts

  • Update draw.io on Windows
  • Install RAPTOR Avalonia on CentOS
  • Download RAPTOR Avalonia Edition on Windows
  • npm doctor command
  • Build & Run CLion Project
  • Create New CLion C Project on Windows
  • Configure CLion Toolchains on Windows
  • Launch CLion IDE on Windows
  • Activate CLion IDE
  • CLion IDE for C/C++ Development

Back to Top

Links

  • Contact
  • Privacy Policy
  • Cookie Policy

www.TestingDocs.com