nexus
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.配置上传地址,地址去私服中copy
dev
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完整配置(来源网络,仅供参考)
<?xml version="1.0" encoding="UTF-8"?><settings xmlns=“http://maven.apache.org/SETTINGS/1.0.0”
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_repo\repository
maven-releases
admin
admin123
maven-snapshots
admin
admin123
nexus
admin
admin123
nexus
*
http://192.168.65.129:8081/repository/maven-public/
nexus
central
Nexus
http://central
true
true
central
Nexus Plugin Repository