===================
1.配置 .m2 下的 settings.xml首先,这个文件在系统盘当前设备登录用户的.m2文件下,加入认证机制
没有就去网上copy一个配置好的,自己配置容易出错
->settings.xm 《一线大厂Java面试题解析+后端开发学习笔记+最新架构讲解视频+实战项目源码讲义》无偿开源 威信搜索公众号【编程进阶路】 l<-
nexus
admin
admin123
maven-snapshots
admin
admin123
maven-releases
admin
admin123
rdc-releases
xxxxxxxxx
xxxxx
rdc-snapshots
xxxxxxxxx
xxxx
复制代码
2.配置 IDEA 项目 下的 pom.xmlnexus
nexus
http://xxxx:port/repository/maven-snapshots/
maven-snapshots
maven-snapshots
http://xxxx:port/repository/maven-snapshots/
复制代码
这里标签中的id对应第一条server中的id ,url取得值可以直接在这里写,也可以如下图中settings文件中的值,name可以自定义 ->settings.xml<-
http://xxxx:port/repository/maven-snapshots/
http://xxxx:port/repository/maven-snapshots/
复制代码
同样,上面pom.xml改成如下格式
nexus
nexus
${altReleaseDeploymentRepository}
maven-snapshots
maven-snapshots
${altSnapshotDeploymentRepository}
复制代码
3.配置上传地址,地址去私服中copydev
nexus
http://localhost:8081/nexus/content/groups/public/
true
true
central
Nexus Plugin Repository
http://central
true
true
复制代码
4.其他配置(可忽略)比如配置阿里的镜像,映射阿里中央仓库(下载jar包快一点)
alimaven
aliyun maven
http://maven.aliyun.com/nexus/content/groups/public/
central
复制代码
配置本地仓库(无需联网使用jar包)
E:maven_repository
复制代码
5.settings.xml完整配置(来源网络,仅供参考)xmlns:xsi=“http://www.w3.org/2001/XMLSchema-instance” xsi:schemaLocation=“http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd”> D:mvn_reporepository maven-releases admin admin123 maven-snapshots admin admin123



