您的位置:首页 > 其它

maven 上传jar到私服

2017-08-18 16:50 169 查看
命令行
mvn deploy:deploy-file -DgroupId=com.xxxxxx-DartifactId=lib.core -Dversion=1.0.2 -Dpackaging=jar -Dfile=lib.core-1.0.2.jar -Durl=http://....:8081/nexus/content/groups/public/ -DrepositoryId=nexus_public
如果报错
Return code is: 401, ReasonPhrase: Unauthorized.

这种错误一般是DrepositoryId后面的仓库在settings.xml文件里没有配置权限

<servers>
<server>
<id>nexus_public</id>
<username>admin</username>
<password>admin123</password>
</server>
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: