Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I ask Maven for a list of the default repositories?

What command can I use to ask Maven for a list of the default repositories that it searches for its dependencies? If no such command exists, where else may I look to find this default list?

like image 376
Derek Mahar Avatar asked May 20 '10 20:05

Derek Mahar


People also ask

What is the default repository for Maven?

Maven Central, a.k.a. the Central Repository, is the default repository for Maven, SBT, Leiningen, and many other JVM based build tools.

How do I find my Maven repository?

2.1 Find this file {MAVEN_HOME}\conf\settings. xml and update the localRepository . Issue mvn -version to find out where is Maven installed. 2.2 Save the file, done, the Maven local repository is now changed to D:/maven_repo .

How many repositories are there in Maven?

A repository in Maven holds build artifacts and dependencies of varying types. There are exactly two types of repositories: local and remote: the local repository is a directory on the computer where Maven runs. It caches remote downloads and contains temporary build artifacts that you have not yet released.

How do I specify Maven central repository in POM xml?

Explicitly Pointing to Maven Central from your POM file. To explicitly configure maven to use Central from your Project Object Model (POM) file, you may do so by adding the following to your pom. xml: This is based on the Maven Default Project which defines the Super POM, or default settings, for all Maven builds.


2 Answers

on the command line, execute

mvn help:evaluate 

then, when prompted, enter

${project.repositories} 

see http://maven.apache.org/plugins/maven-help-plugin/evaluate-mojo.html

like image 51
Sean Patrick Floyd Avatar answered Sep 20 '22 08:09

Sean Patrick Floyd


You can output the effective pom with the command

mvn help:effective-pom 

There the default repositories are listed.

like image 26
tangens Avatar answered Sep 22 '22 08:09

tangens