maven部署ojdb14.jar到nexus仓库报错及解决方法

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/lk_blog/article/details/51020130
部署命令:
mvn deploy:deploy-file -DgroupId=com.oracle -DartifactId=ojdbc14 -Dversion=10.2.0.3.0 -Dpackaging=jar -Dfile=E:\ojdbc14.jar -Durl=http://127.0.0.1:8081/nexus/content/repositories/thirdparty/ -DrepositoryId=<strong>thirdparty</strong>

执行时报错:
Return code is: 401, ReasonPhrase: Unauthorized. -> [Help 1]


解决方式:
在setting.xml中修改配置,添加如下代码:
    <server>
      <id><strong>thirdparty</strong></id>
      <username>admin</username>
      <password>admin123</password>
    </server>
 
   
注意:thirdparty在部署命令和配置中要保持一致。

再次执行不再报错。

猜你喜欢

转载自blog.csdn.net/lk_blog/article/details/51020130