zoukankan      html  css  js  c++  java
  • maven-deploy失败

    昨天遇到的问题,mavne项目执行deploy的时候,出错。提示

    Return code is: 401, ReasonPhrase: Unauthorized. -> [Help 1]

    很直白,就是权限问题。

    那就上网搜索,deploy的配置。其实要deploy到远端私服,就两点:

    1:本地pom文件,配置

      <distributionManagement>
       <repository>
        <id>releases</id>
        <name>Internal Releases</name>
        <url>http://自己服务器地址:8081/nexus/content/repositories/releases</url>
       </repository>
      </distributionManagement>

    2:maven的setting.xml配置

     <servers>
         <server>
           <id>releases</id>   <!-- 注意这里的id名字要和pom.xml里配置的名字保持一致 -->
           <username>deployment</username>
           <password>deployment</password>
         </server>
     </servers>

    检查下来,两条都“符合”,我的天这肿么办。于是再看。。。

    最终发现,项目顶层有parent配置,parent配置中distributionManagement项的id是另一个名字。

    so找不到对应server配置的用户名、密码。

    但是再想想,我项目的pom.xml里已经配置了,为什么没有抵掉parent里的配置呢。

    期待成为寂寞高手的武林老白
  • 相关阅读:
    Leetcode 5
    DFS输出全排列
    Leetcode 461
    Leetcode 4
    Leetcode 3
    Leetcode 2
    Windows 10 Mac 为Vs Code配置C/C++环境
    机器学习 学习笔记(1) -- 初识机器学习
    MacBook Pro休眠掉电、耗电量大问题解决方案
    Oracle错误及解决方案
  • 原文地址:https://www.cnblogs.com/aquariusm/p/6255643.html
Copyright © 2011-2022 走看看