昨天遇到的问题,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里的配置呢。

maven-deploy失败的更多相关文章

  1. [转] 手动上传jar包到远程仓库 (maven deploy)

    [From] https://my.oschina.net/360yg/blog/1588899 前言:通常允许上传的远程仓库有两种:Snapshots和Releases,分别为快照版仓库和稳定版仓库 ...

  2. Maven deploy部署jar包到远程私仓

    Maven deploy部署jar包到远程私仓 maven deploy介绍 maven中的仓库分为两种,snapshot快照仓库和release发布仓库.snapshot快照仓库用于保存开发过程中的 ...

  3. Fundebug后端Java异常监控插件更新至0.3.1,修复Maven下载失败的问题

    摘要: 0.3.1修复Maven下载失败的问题. 监控Java应用 1. pom.xml 配置fundebug-java依赖 <dependency> <groupId>com ...

  4. No compiler is provided in this environment. --Maven build失败

    今天,maven build 失败了, 遇到下面的问题 经过查找,通过这个大佬的blog(  https://blog.csdn.net/lslk9898/article/details/738367 ...

  5. 解决maven项目 maven install失败 错误 Failed to execute goal org.apache.maven.plugins

    1.Maven构建失败 Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin: 2.3.4 :compile ( ...

  6. maven nexus deploy方式以及相关注意事项(增加eclipse执行maven deploy)

    以前公司都是配管负责管理jar的,现在没有专职配管了,得自己部署到deploy上供使用.总的来说,jar部署到nexus上有两种方式: 1.直接登录nexus控制台进行上传,如下: 但是,某些仓库可能 ...

  7. Maven deploy Return code is: 400

    Maven deploy Return code is: 400 学习了:https://blog.csdn.net/running_snail_/article/details/19821777 H ...

  8. java分模块项目在idea中使用maven打包失败(ps:maven常用到的命令)

    一.分模块项目打包失败 情况:项目是分模块创建的,一些公共的方法是单独的一个模块common,其他模块依赖于此模块,poom依赖已经添加了,项目可以正常运行,但使用maven打包时出现了问题:找不到依 ...

  9. Maven deploy

      1.在maven/conf/setting.xml中: 在<servers>中加入 <server> <id>internal</id> <u ...

  10. Maven deploy时报Fatal error compiling: tools.jar not found错误的问题处理

    摘自:http://blog.csdn.net/achilles12345/article/details/19046061 在Eclipse环境下,使用Maven进行deploy时发现报了该错误:F ...

随机推荐

  1. Java集合运用技巧

    需要唯一吗? 需要:Set 需要制定顺序吗? 需要:TreeSet 不需要:HashSet 但是想要一个和存储一致的顺序(有序):LinkedHashSet 不需要:List 需要频繁增删吗? 需要: ...

  2. 入住cnblogs第一篇随笔 Hello, world!

    在网上搜索计算机参考资料时经常看到各位大神的博客,甚是神往.今天我也在这里安家,记录自己的学习过程,也同各位共勉. 第一篇随笔,就用来测试一下这里的文本编辑器吧. //The C language # ...

  3. C语言实现栈

    #include <stdio.h> #include <stdlib.h> #include <stdbool.h> typedef struct stack_t ...

  4. eclipse + marven

    eclipse使用maven管理项目,可以自动下载依赖包(尤其是容易引起依赖包冲突的场合),也可以实现打jar包,编译等功能 1  eclipse安装maven插件 使用Eclipse--help-- ...

  5. Java—从文件中读取数据

    1.FileInputStream() // 构建字节输入流对象,参数为文件名 FileInputStream fin = new FileInputStream("message" ...

  6. Integer to Roman -- LeetCode 012

    Given an integer, convert it to a roman numeral. Input is guaranteed to be within the range from 1 t ...

  7. Tomcat8 localhost+端口可以访问Manager APP,而IP+端口不可以访问 解决办法

    localhost + 端口可以正常访问Manager APP,而IP + 端口不能访问Manager APP,报403错误.(我的主机环境是Ubuntu16.04) 前提是你已经配好了tomcat_ ...

  8. 【LeetCode OJ】Binary Tree Zigzag Level Order Traversal

    Problem Link: https://oj.leetcode.com/problems/binary-tree-zigzag-level-order-traversal/ Just BFS fr ...

  9. -webkit-appearance、sselect

    -webkit-appearance 是一个 不规范的属性(unsupported WebKit property),用来改变按钮和其他控件的外观,使其外观类似于原生控件. iOS下的safari中有 ...

  10. Asp.net Web.Config - 配置元素 httpCookies

    1.属性   属性 说明 domain 可选的 String 属性. 设置 Cookie 域名. httpOnlyCookies 可选的 Boolean 属性. 脚本(javascript之类)能够访 ...