栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 软件开发 > 后端开发 > Java

nexus下载提示无权限

Java 更新时间: 发布时间: IT归档 最新发布 模块sitemap 名妆网 法律咨询 聚返吧 英语巴士网 伯小乐 网商动力

nexus下载提示无权限

报错信息

[ERROR] Failed to execute goal on project njc-user-service: Could not resolve dependencies for project com.njc:njc-user-service:jar:0.0.1-SNAPSHOT: Failed to collect dependencies at com.njc:security-starter:jar:0.0.3-Release: Failed to read artifact descriptor for com.njc:security-starter:jar:0.0.3-Release: Could not transfer artifact com.njc:security-starter:pom:0.0.3-Release from/to nexus (http://192.168.140.21:8081/repository/maven-public/): authentication failed for http://192.168.140.21:8081/repository/maven-public/com/njc/security-starter/0.0.3-Release/security-starter-0.0.3-Release.pom, status: 401 Unauthorized -> [Help 1]
[ERROR]
[ERROR] To see 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, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/DependencyResolutionException

原因:401 Unauthorized,即下载包的时候无权限

解决方案:nexus 配置可匿名访问

或者在项目的pom文件配置加上权限


    
        maven-releases
        Nexus Release Repository
        http://******:8081/repository/maven-releases/
    
    
        maven-snapshots
        Nexus Snapshot Repository
        http://*******:8081/repository/maven-snapshots/
    
 

repository 的 id 要和 maven settings 里 server 的 id 一样

   
    maven-releases  
    admin  
    ******  

  
    maven-snapshots  
    admin  
    ******  
 
转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/1009451.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号