您的位置:首页 > 其它

Deploy standalone jar to nexus

2017-02-22 00:00 211 查看
摘要: Deploy standalone jar to nexus

再升级Nexus版本(OSS 3.2.0-01)后,Maven的包管理,通过WEB-UI操作入口被取消,所以需要通过Maven命令来上传第三方的依赖。

mvn deploy:deploy-file -DgroupId=<group-id> \
-DartifactId=<artifact-id> \
-Dversion=<version> \
-Dpackaging=<type-of-packaging> \
-Dfile=<path-to-file> \
-DrepositoryId=<id-to-map-on-server-section-of-settings.xml> \
-Durl=<url-of-the-repository-to-deploy>

参数说明:

groupId : 依赖所属group

artifactId : 依赖名称

version : 依赖版本

packaging : 依赖包类型

file : 依赖文件

repositoryId: 在setting中配置的server节点的ID

url : 仓库的地址

settings.xml配置:

<servers>
<server>
<id>geeks-hosted</id>
<username>admin</username>
<password>admin</password>
</server>
</servers>

PS:https://maven.apache.org/guides/mini/guide-3rd-party-jars-remote.html
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: