原文地址:https://blog.csdn.net/m18336132361/article/details/123580428
配置本地nexus仓库配置
<server>
<id>nexus</id>
<username>admin</username>
<password>root</password>
</server>
<mirrors>
<mirror>
<id>nexus</id>
<name>nexus repository</name>
<url>http://localhost:10086/repository/myself_group/</url>
<mirrorOf>central</mirrorOf>
</mirror>
</mirrors>
上传jar包到私有仓库
- 手动
mvn deploy:deploy-file -DgroupId=com.zmf -DartifactId=kingUtils -Dversion=2.0.0 -Dpackaging=jar -Dfile=./kingUtils-2.0.0-SNAPSHOT.jar -Durl=http://localhost:10086/repository/myself_hosted/ -DrepositoryId=nexus
上传地址来源(Browse菜单):
命令解释:
-DgroupId=com.zmf 自定义
-DartifactId=kingUtils 自定义
-Dversion=2.0.0 自定义 三个自定义,构成pom.xml文件中的坐标
-Dpackaging=jar 上传的类型是jar类型
-Dfile=./kingUtils-2.0.0-SNAPSHOT.jar jar的本地磁盘位置
-Durl=http://localhost:10086/repository/myself_hosted/ hosted资源库的地址,下图中
-DrepositoryId=nexus setting.xml文件中配置的ID
- 使用网页上传