An's Blog
收藏、分享 …
Toggle navigation
Home
Cesium
SuperMap
ArcGIS
MapboxGL
CentOS
GeoServer
Favorites
Archives
Tags
Nexus代理阿里云仓库+Gradle仓库
2022-12-09 10:02:19
2
0
0
admin
nexus官方仓库,在开发中我们可以添加国内阿里云maven仓库。 ### **1. nexus默认仓库说明** maven-central:maven 中央库,默认从 https://repo1.maven.org/maven2/ 拉取 jar maven-releases:私库发行版 jar,初次安装请将 Deployment policy 设置为 Allow redeploy maven-snapshots:私库快照(调试版本)jar maven-public:仓库分组,把上面三个仓库组合在一起对外提供服务,在本地 maven 基础配置 settings.xml 或项目 pom.xml 中使用 ### **2. nexus仓库类型说明** group:这是一个仓库聚合的概念,用户仓库地址选择 Group 的地址,即可访问 Group 中配置的,用于方便开发人员自己设定的仓库。 maven-public 就是一个 Group 类型的仓库,内部设置了多个仓库,访问顺序取决于配置顺序,3.x 默认为 Releases、Snapshots、Central,当然你也可以自己设置。 hosted:私有仓库,内部项目的发布仓库,专门用来存储我们自己生成的 jar 文件 snapshots:本地项目的快照仓库 releases: 本地项目发布的正式版本 proxy:代理类型,从远程中央仓库中寻找数据的仓库(可以点击对应的仓库的 Configuration 页签下 Remote Storage 属性的值即被代理的远程仓库的路径),如可配置阿里云 maven 仓库 central:中央仓库 ### **3. 创建repository** 配置阿里云的代理仓库,在maven客户端下载maven依赖后,nexus私服如果不存在的话,会从阿里云私服下载,然后缓存到本地的私服,下载maven客户端下载依赖后,就可以从本地nexus私服拉取依赖。 同时自己开发的服务,可以deploy到本地nexus私服   配置参数: Name: maven-aliyun aliyun-url: http://maven.aliyun.com/nexus/content/groups/public/ Cache统一设置为200天 288000 设置私用仓库可重复发布(可选) Nexus安装后自带maven-releases,maven-snapshots两个仓库,用于将生成的jar包发布在这两个仓库中,在实际开发中需要将maven-releases设置为可以重复发布 其他保持默认 点击,保存  配置 mavne-public 加入列表并配置新加的proxy的顺序  可重复添加多个 1. aliyun http://maven.aliyun.com/nexus/content/groups/public 2. gradle https://plugins.gradle.org/m2/ 2. apache_snapshot https://repository.apache.org/content/repositories/snapshots/ 3. apache_release https://repository.apache.org/content/repositories/releases/ 4. atlassian https://maven.atlassian.com/content/repositories/atlassian-public/ 5. central.maven.org http://central.maven.org/maven2/ 6. datanucleus http://www.datanucleus.org/downloads/maven2 7. maven-central (安装后自带,仅需设置Cache有效期即可) https://repo1.maven.org/maven2/ 8. nexus.axiomalaska.com http://nexus.axiomalaska.com/nexus/content/repositories/public 9. oss.sonatype.org https://oss.sonatype.org/content/repositories/snapshots 10.pentaho https://public.nexus.pentaho.org/content/groups/omni/ 复制maven nexus 地址  通过 pom.xml 文件配置新的仓库 <repositories> <repository> <id>maven-nexus</id> <name>maven-nexus</name> <url>http://10.3.10.248:8081/repository/maven-public/</url> <releases> <enabled>true</enabled> </releases> <snapshots> <enabled>true</enabled> </snapshots> </repository> </repositories> 原文地址:https://blog.csdn.net/LG_15011399296/article/details/125083847
Pre:
postgresql性能优化-最大连接数
Next:
Mapbox Style 规范(中文)
0
likes
2
Weibo
Wechat
Tencent Weibo
QQ Zone
RenRen
Table of content