解决Maven 报 Return code is: 400 , ReasonPhrase:Repository version policy: SNAPSHOT does not allow version: 2.1.0.RELEASE. 的错误
最近在搭建公司的基础框架,业务需求用到elasticsearch,所以需要整合到基础框架里,供各业务线使用同时也便于管理,但在整合的过程中,出现了莫名的问题,同时maven的提示也不够明确。
我的版本信息为 spring boot 2.1.0.RELEASE,elasticsearch 6.3.1,因为不同版本可能遇到的问题不一样。
我的POM包引用为
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.1.0.RELEASE</version>
<relativePath/>
</parent>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-elasticsearch</artifactId>
</dependency>
我的错误提示为如下图,Return code is: 400 , ReasonPhrase:Repository version policy: SNAPSHOT does not allow version: 2.1.0.RELEASE.,你能查询的解决方案几乎都是修改私有仓库级别,但对我遇到的问题并不可行,

这里出现的问题跟私有库没关系,是包之间的不兼容造成的,解决步骤就是把出现问题的包一一排查,要求就是你要熟悉根据每步的提示,找到要排除的包,然后引用兼容的包,最后我的POM设置如下,同时解决elasticsearch 与redis 冲突的问题。
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-elasticsearch</artifactId>
<exclusions>
<exclusion>
<groupId>org.elasticsearch.client</groupId>
<artifactId>transport</artifactId>
</exclusion>
<exclusion>
<groupId>org.elasticsearch.plugin</groupId>
<artifactId>transport-netty4-client</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.elasticsearch.plugin</groupId>
<artifactId>transport-netty4-client</artifactId>
<exclusions>
<exclusion>
<groupId>org.elasticsearch.client</groupId>
<artifactId>transport</artifactId>
</exclusion>
</exclusions>
<version>6.3.1</version>
</dependency>
<dependency>
<groupId>org.elasticsearch.client</groupId>
<artifactId>transport</artifactId>
<version>6.3.1</version>
<exclusions>
<exclusion>
<groupId>org.elasticsearch</groupId>
<artifactId>elasticsearch</artifactId>
</exclusion>
<exclusion>
<groupId>org.elasticsearch.client</groupId>
<artifactId>elasticsearch-rest-client</artifactId>
</exclusion>
<exclusion>
<groupId>org.elasticsearch.plugin</groupId>
<artifactId>transport-netty4-client</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.elasticsearch.client</groupId>
<artifactId>elasticsearch-rest-client</artifactId>
<version>6.3.1</version>
</dependency>
<dependency>
<groupId>org.elasticsearch</groupId>
<artifactId>elasticsearch</artifactId>
<version>6.3.1</version>
</dependency>
然后运行 >mvn clean compile package -U,可以看到熟悉的BUILD SUCCESS。

解决Maven 报 Return code is: 400 , ReasonPhrase:Repository version policy: SNAPSHOT does not allow version: 2.1.0.RELEASE. 的错误的更多相关文章
- Maven私有仓库: 发布release版本报错:Return code is: 400, ReasonPhrase: Repository does not allow upd ating assets: maven-releases.
今天在将一个maven组件由SNAPSHORT升级为正式版本1.0.0,然后执行发布: mvn clean deploy -pl ielong-common -am -DskipTests, 报错:R ...
- maven deploy Return code is: 400, ReasonPhrase: Bad Request.
最近在自己本地deploy jar 到本地 nexus的时候,报错 Return code is: 400, ReasonPhrase: Bad Request. 解决思路: 1.查看maven pr ...
- mvn deploy 报错:Return code is: 400, ReasonPhrase: Bad Request. ->
mvn deploy 报错:Return code is: 400, ReasonPhrase: Bad Request. -> TEST通过没有报错,但是最终部署到Nexus中时出现错误. 后 ...
- Maven deploy Return code is: 400
Maven deploy Return code is: 400 学习了:https://blog.csdn.net/running_snail_/article/details/19821777 H ...
- Maven-008-Nexus 私服部署发布报错 Failed to deploy artifacts: Failed to transfer file: ... Return code is: 4XX, ReasonPhrase: ... 解决方案
我在部署构件至 maven nexus 私服时,有时会出现 Failed to deploy artifacts: Failed to transfer file: ... Return code i ...
- maven报错:Return code is: 501 , ReasonPhrase:HTTPS Required
今天把一个去年没做完的项目翻出来做时,发现maven无法正常导入依赖.检查了一遍项目配置,没发现有什么问题.而且依赖在本地仓库存在. 随后发现报错:Failed to transfer file:** ...
- 【Maven错误】 Non-resolvable parent POM for ...... Return code is: 500 , ReasonPhrase:Internal Server Error. and 'parent.relativePath' points at no local POM @ line 14, column 11
一.异常信息 [INFO] Scanning for projects... Downloading: http://www.myhost.com/maven/jdk18/org/springfram ...
- QA:Failed to deploy artifacts from/to snapshots XX Failed to transfer file Return code is: 405, ReasonPhrase:Method Not Allowed.
QA: Failed to deploy artifacts from/to snapshots XX Failed to transfer file Return code is: 405, Rea ...
- [转]解决Maven报错"Plugin execution not covered by lifecycle configuration"
[转]解决Maven报错"Plugin execution not covered by lifecycle configuration" 导入Myabtis源码后,POM文件会报 ...
随机推荐
- NASA的10条代码编写原则
NASA的10条代码编写原则 作者: Gerard J. Holzmann 来源: InfoQ 原文链接 英文原文:NASA's 10 Coding Rules for Writing Safety ...
- wifi测距
#include "ESP8266WiFi.h" #include "math.h" //d = 10^(A-(abs(rssi)) / (10 * n)) 信 ...
- editplus5注册码
注册码:Vovan 3AG46-JJ48E-CEACC-8E6EW-ECUAW
- nginx基础学习第二篇:nginx内置变量的使用
ngx_http_core模块提供的内置变量有很多,常见的有 $uri,用来获取当前请求的uri,不含请求参数. $request_uri,用来获取请求最原始的uri,包含请求参数,且未解码. $re ...
- VirtualBox 命令行操作
vboxmanage list vmsvboxmanage list runningvmsvboxmanage startvmvboxmanage controlvm "RHEL6.1_fo ...
- python学习-基础知识-1
1.计算机历史 计算机使用高低电压的两种状态来描述信息.计算机可以理解的只有二进制数据即010100011....,1个比特位可以表示的状态只有2种,n个比特位可以表示的状态有2的n次方种. 所以如果 ...
- (转)最新版 nginx内置变量 大全
原文:http://www.cnphp.info/nginx-embedded-variables-lasted-version.html 在配置基于nginx服务器的网站时,必然会用到 nginx内 ...
- Python数据类型(字符串)
文章内容参考了教程:http://www.runoob.com/python/python-basic-syntax.html#commentform Python 字符串 字符串是 Python 中 ...
- 关于myeclipse加载building workspace卡顿的解决办法
在MyEclipse的使用中,在建立新文件或者改动代码后,经常会出现building workspace半天卡顿不动的情况,如果开的程序过多,经常会发生失去响应,电脑要是再烂点,直接死机的情况也常有发 ...
- nginx内网代理为外网地址
#user nobody; worker_processes 1; #error_log logs/error.log; #error_log logs/error.log notice; #erro ...