7. Maven仓库

本文介绍了Maven仓库的工作原理,详细阐述了如何配置阿里云Maven仓库,包括中央仓库和各种特定仓库的地址。此外,还讲解了在CentOS上搭建Maven私服Nexus的步骤,包括可选配置、环境变量设置、启动验证以及与Maven的整合。同时,文章还展示了如何在IDEA中部署构件到Nexus,并提供了批量导入本地库到Nexus的方法。
摘要由CSDN通过智能技术生成

概述

maven仓库就是用来存储jar包的,在maven中,这个jar称之为构件,每个构件都有自己的坐标。

maven仓库根据坐标进行定位构件步骤:

  1. settings.xml配置文件中,找localRepository
  2. 根据坐标拼接路径groupId+artifiedId+version找到构件的目录
  3. 根据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仓的聚合仓

google

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

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值