nexus出现Return code is: 401, ReasonPhrase: Unauthorized

出现Return code is: 401, ReasonPhrase: Unauthorized的情况

Failed to execute goal org.apache.maven.plugins:maven-deploy-plugin:2.8.2:deploy (default-deploy) on project support: Failed to deploy artifacts: Could not transfer artifact support:jar:0.0.1 from/to maven-release (http://172.30.71.129:8081/repository/maven-releases/): Failed to transfer file: http://172.30.71.129:8081/repository/maven-releases/em/oversea/business/support/0.0.162/support-0.0.162.jar.

Return code is: 401, ReasonPhrase: Unauthorized.

解决方案

 自己配置的私服仓库的和id,用户,密码 setting.xml 和 pom.xml一致

1. apache-maven-3.5.3的setting.xml中没有配置

 
            maven-releases
            admin
            123456
       

       
            maven-snapshots   
            admin  
            123456
       

   

maven的setting.xml与 pom.xml (id =maven-releases 一致)


    
        maven-releases
        nexus maven
        http://172.30.71.129:8081/repository/maven-releases/
    

    
        maven-snapshots
        nexus maven
        http://172.30.71.129:8081/repository/maven-snapshots/
        true
    

你可能感兴趣的:(Maven,maven,nexus)