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

后端 未结 4 494
萌比男神i
萌比男神i 2020-12-28 14:46

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 t

相关标签:
4条回答
  • 2020-12-28 15:07

    You can output the effective pom with the command

    mvn help:effective-pom
    

    There the default repositories are listed.

    0 讨论(0)
  • 2020-12-28 15:24

    Use the Maven Dependency Plugin to show repositories for a specific build:

    mvn dependency:list-repositories
    

    or the full path, if you still use a very old version (<2.2)

    mvn org.apache.maven.plugins:maven-dependency-plugin:2.6:list-repositories
    
    0 讨论(0)
  • 2020-12-28 15:26

    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

    0 讨论(0)
  • 2020-12-28 15:26

    As a side-effect of displaying newer versions, the versions:display-dependency-updates goal of the Versions Maven Plugin also displays the names of the repositories that it searches. To display the newer versions and the repository names, run

    mvn versions:display-dependency-updates
    
    0 讨论(0)
提交回复
热议问题