Johnny
Johnny

Reputation: 15413

How Maven knows what remote repositories to access and check?

Let's say i'm adding Spring dependency to my Maven project: http://mvnrepository.com/artifact/org.springframework/spring-core/4.2.1.RELEASE

To my pom.xml, the following will be added:

<dependency>
    <groupId>org.springframework</groupId>
    <artifactId>spring-core</artifactId>
    <version>4.2.1.RELEASE</version>
</dependency>

How my Maven will know from where exactly the artifact will be fetched? I didn't setup anything in maven settings.xml besides our enterprise Artifactory repositories.

Upvotes: 0

Views: 1987

Answers (1)

Aur&#233;lien Thieriot
Aur&#233;lien Thieriot

Reputation: 5923

There are several official Central repositories and proxies. (See documentation) and Maven knows them by default.

Specifying something in your settings.xml will just add some to the list.

A convenient way to search through the Central repository is to go to: search.maven.org

Upvotes: 1

Related Questions