昨天遇到的问题,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. 布局容器layout Container

    画布canvas 盒子Box VBox Hbox-->HGroup VGroup 控制条 ControlBar

  2. 4 多表代替密码之Hill 密码 2实现

    该解密方法的KEY 不是一个数或者一段字符串,而是一个矩阵, 比如有个3*3的KEY: 那么如果我们要加密一个长度为N的字符串, 那么把N除以3,分成M个3个字母组成的小段, 对每个小段尽心加密: 1 ...

  3. 第二章:搭建Android开发环境

    通过对本章节内容的阅读,了解了Android底层开发所需要的各种开发工具,以及在Linux环境下怎样搭建Android底层开发环境,在Linux系统上开发Android应用程序,需要安装Linux版本 ...

  4. Guess Number Higher or Lower II--困惑

    今天,试着做了一下LeetCode OJ上面的第375道题:Guess Number Higher or Lower II 原题链接:https://leetcode.com/problems/gue ...

  5. HDU 4059 容斥初步练习

    #include <iostream> #include <cstring> #include <cstdio> #include <algorithm> ...

  6. Thinkphp_基础(2)URL模式

    URL请求 ThinkPHP采用单一入口模式访问应用,对应用的所有请求都定向到应用的入口文件,系统会从URL参数中解析当前请求的模块.控制器和操作,下面是一个标准的URL访问格式: http://se ...

  7. Mac下搭建php开发环境【转】

    Mac OS X 内置了Apache 和 PHP,这样使用起来非常方便.本文以Mac OS X 10.6.3为例.主要内容包括: 启动Apache 运行PHP 安装MySQL 使用phpMyAdmin ...

  8. editor does not contain a main type的解决方案

    editor does not contain a main type的解决方案 今天用eclipse,当打算run一个带有main函数的class时,出现editor does not contai ...

  9. c#读写文件

    1.添加命名空间 System.IO; System.Text; 2.文件的读取 (1).使用FileStream类进行文件的读取,并将它转换成char数组,然后输出. byte[] byData = ...

  10. Azure 媒体服务可将优质内容传输至 Apple TV

    作为内容提供商,如果想要将优质内容传输到Apple TV,需要使用Apple FairPlay Streaming (FPS)技术. 但是这个技术的构建比较繁琐,基于此,Azure提供了FairPla ...