概述
maven仓库就是用来存储jar
包的,在maven中,这个jar
称之为构件
,每个构件都有自己的坐标。
maven仓库根据坐标进行定位构件步骤:
- 从
settings.xml
配置文件中,找localRepository
- 根据坐标拼接路径
groupId+artifiedId+version
找到构件的目录 - 根据
artifiedId+version+packaging
找到文件
maven仓库是分级的,有本地仓库和远程仓库,远程仓库又包含:私服、公共仓库、中央仓库
阿里云仓库配置
仓库名称
阿里云仓库地址
阿里云仓库地址(老版)
源地址
central
https://maven.aliyun.com/repository/central
https://maven.aliyun.com/nexus/content/repositories/central
https://repo1.maven.org/maven2/
jcenter
https://maven.aliyun.com/repository/public
https://maven.aliyun.com/nexus/content/repositories/jcenter
http://jcenter.bintray.com/
public
https://maven.aliyun.com/repository/public
https://maven.aliyun.com/nexus/content/groups/public
central仓和jcenter仓的聚合仓
https://maven.aliyun.com/repository/google
https://maven.aliyun.com/nexus/content/repositories/google
https://maven.google.com/
gradle-plugin
https://maven.aliyun.com/repository/gradle-plugin
https://maven.aliyun.com/nexus/content/repositories/gradle-plugin
https://plugins.gradle.org/m2/
spring
https://maven.aliyun.com/repository/spring
https://maven.aliyun.com/nexus/content/repositories/spring
http://repo.spring.io/libs-milestone/
spring-plugin
https://maven.aliyun.com/repository/spring-plugin
https://maven.aliyun.com/nexus/content/repositories/spring-plugin
http://repo.spring.io/plugins-re