FantasticGirlisMe 2017-06-16 10:02 采纳率: 0%
浏览 7797
已采纳

maven的私服nexus下载自定义包失败

nexus中新建host类型的仓库,配置了权限,能上传上去jar包,但是在其他项目里面引用不了那个jar,下不来
报错:Not authorized , ReasonPhrase:Unauthorized.
说没权限

  • 写回答

1条回答 默认 最新

  • King-Long 博客专家认证 2017-06-16 12:18
    关注

    原来是没有配置认证。

    maven目录conf的setting.xml里,



    releases

    admin

    admin123





    snapshots

    admin

    admin123





    用户名和密码都是nexus的。再次deploy即可。

    注意这里的id要和pom.xml里远程deploy的地址对应一致,我的pom.xml里配置:

    <distributionManagement>  
        <repository>  
            <id>releases</id>  
            <name>Nexus Release Repository</name>  
            <url>http://10.1.81.199:8081/nexus/content/repositories/releases/</url>  
        </repository>  
        <snapshotRepository>  
            <id>snapshots</id>  
            <name>Nexus Snapshot Repository</name>  
            <url>http://10.1.81.199:8081/nexus/content/repositories/snapshots/</url>  
        </snapshotRepository>  
    </distributionManagement>  
    
    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?