TestingDocs.com
Software Testing website
  • JBehave
  • Selenium
  • Testlink
  • Maven
  • Git
  • RAPTOR
  • Questions

Understanding Maven Repositories

Tweet
Pin it

Document Contents

  • Introduction
  • Local Repository
  • The Central Repository
  • Remote Repository

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

Apache Maven /

Maven Project from Archetype

Apache Maven /

Creating a Maven project using NetBeans IDE

Apache Maven /

Create a Maven Project skip archetype

Apache Maven /

Install Maven on Ubuntu Linux

Maven Archetype plugin command line

Apache Maven /

Maven Archetype plugin command line

Tag Cloud

Agile Appium Tutorials C++ Eclipse Tutorials Git Tutorials IntelliJ Tutorials Java Java Tutorial JBehave Jenkins Jira Cloud JUnit Tutorial Maven Object-oriented Flowchart Python Tutorials Raptor Flowcharts Selenium IDE TestLink Tutorials

Random Posts

  • TestLink Bitnami Cloud Image
    Overview In this tutorial, we will see the steps

    Read more

  • Code Coverage Tools
    Overview Let’s look at some of the code coverage

    Read more

  • pCloudy Continuous Testing Cloud
    Overview pCloudy is a continuous testing cloud

    Read more

Latest Tweets

Tweets by @TestingDocs

Back to Top

TestingDocs.com

  • Privacy Policy
  • Cookie Policy
  • JBehave
  • Selenium
  • Testlink
  • Maven
  • Git
  • RAPTOR
  • Questions
www.TestingDocs.com | All Rights Reserved