mavendeploy命令的使用,及报错401ReasonPhra:Unauthori。。。

更新时间:2023-05-21 19:38:52 阅读: 评论:0

mavendeploy命令的使⽤,及报错401ReasonPhra:Unauthori。。。maven deploy 命令的使⽤,及报错 401 ReasonPhra: Unauthorized 的⼆种解决⽅式
maven deploy 的使⽤场景:
1、将私有jar包上传到maven私库
2、将项⽬上传到maven私库
3、将第三⽅依赖包上传到私库
maven命令使⽤前的准备⼯作
1、确认在使⽤的机器上安装 maven,⽤ mvn -version 或 mvn -v 查看
\\ 查看本地安装 maven
C:\Urs\Janyue>mvn -version
Apache Maven 3.3.9(bb52d8502b132ec0a5a3f4c09453c07478323dc5;2015-11-11T00:41:47+08:00)
Maven home: D:\JavaUtils\apache-maven-3.3.9-sts\bin\..
Java version:1.8.0_171, vendor: Oracle Corporation
Java home: D:\JavaUtils\Java\jdk1.8.0_171\jre
Default locale: zh_CN, platform encoding: GBK
OS name:"windows 10", version:"10.0", arch:"amd64", family:"dos"
C:\Urs\Janyue>mvn -v
Apache Maven 3.3.9(bb52d8502b132ec0a5a3f4c09453c07478323dc5;2015-11-11T00:41:47+08:00)
Maven home: D:\JavaUtils\apache-maven-3.3.9-sts\bin\..
Java version:1.8.0_171, vendor: Oracle Corporation
Java home: D:\JavaUtils\Java\jdk1.8.0_171\jre
Default locale: zh_CN, platform encoding: GBK
OS name:"windows 10", version:"10.0", arch:"amd64", family:"dos"
2、编写deploy 上传命令
mvn deploy:deploy-file - -DartifactId=xxx -Dversion=2.0.7 -Dpackaging=jar -Dfile=C:\Urs\Janyue\Desktop\JAR包管理\升级平台\xxx-xx .jar -Durl=192.168.66.166:9000/nexus/content/repositories/snapshots/ -DrepositoryId=snapshots
1. 必传参数:
file:上传⽂件本地所在路径,即: jar或pom⽂件具体地址;
repositoryId:l 对应的仓库配置,即:仓库权限配置;
url: 仓库地址
2. 可传参数:
groupId:组件路径,存储的包的路径,⼀般分为多段,第⼀段为域,第⼆段为公司名。。。对应pom中的 groupId 标签;
artifactId:组件模块 对应pom中的 artifactId 标签;
version:组件版本,这个好理解 即版本号;
emingly报错 401 ReasonPhra: Unauthorized 的解决⽅法
报错⽇志:
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------公主的保护计划
[INFO] Total time: 4.999 s
[INFO] Finished at: 2021-07-20T15:40:42+08:00
i arched for you
[INFO] Final Memory: 7M/164M
小喇叭故事网[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-deploy-plugin:2.7:deploy-file (def
ault-cli) on project standalone-pom: Failed to deploy ar tifacts: Could not transfer :xxx-core:jar:2.0.7-20210720.074039-15 from/to public (192.79.172.97:9000/nexus/content/reposito ries/public/): Failed to transfer file: 192.79.172.97:9000/nexus/content/repositories/public/com/xxx/xx/xx/xx-core/2.0.7/xxx-core-2.0.7-20210720.0740 39-15.jar. Return code is: 401, ReasonPhra: Unauthorized. -> [Help 1]
[ERROR]
外国留学中介
[ERROR] To e the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, plea read the following articles:
[ERROR] [Help 1] /confluence/display/MAVEN/MojoExecutionException
解决⽅法⼀: 在l 配置权限2012年高考英语
hammer是什么意思注:id与命令中的repositoryId值⼀致
urname:即 你的私库账号
password:即 你的私库密码
<rver>
<id>snapshots</id>
<urname>urname</urname>
<password>password</password>
</rver>
steven jobs解决⽅法⼆: 直接在命令 url中 带权限执⾏
我采⽤的是这种
urname:即 你的私库账号
纠纷英文
password:即 你的私库密码
mvn deploy:deploy-file - -DartifactId=xxx -Dversion=2.0.7 -Dpackaging=jar -Dfile=C:\Urs\Janyue\Desktop\JAR包管理\升级平台\xxx-xx .jar -Durl=urname:password@192.168.66.166:9000/nexus/content/repositories/snapshots/ -DrepositoryId=snapshots
女厕所英文执⾏结果:成功了

本文发布于:2023-05-21 19:38:52,感谢您对本站的认可!

本文链接:https://www.wtabcd.cn/fanwen/fan/90/117459.html

版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。

标签:私库   传到   仓库
相关文章
留言与评论(共有 0 条评论)
   
验证码:
Copyright ©2019-2022 Comsenz Inc.Powered by © 专利检索| 网站地图