最近在搭建公司的基础框架,业务需求用到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. 的错误的更多相关文章

  1. 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 ...

  2. maven deploy Return code is: 400, ReasonPhrase: Bad Request.

    最近在自己本地deploy jar 到本地 nexus的时候,报错 Return code is: 400, ReasonPhrase: Bad Request. 解决思路: 1.查看maven pr ...

  3. mvn deploy 报错:Return code is: 400, ReasonPhrase: Bad Request. ->

    mvn deploy 报错:Return code is: 400, ReasonPhrase: Bad Request. -> TEST通过没有报错,但是最终部署到Nexus中时出现错误. 后 ...

  4. Maven deploy Return code is: 400

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

  5. 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 ...

  6. maven报错:Return code is: 501 , ReasonPhrase:HTTPS Required

    今天把一个去年没做完的项目翻出来做时,发现maven无法正常导入依赖.检查了一遍项目配置,没发现有什么问题.而且依赖在本地仓库存在. 随后发现报错:Failed to transfer file:** ...

  7. 【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 ...

  8. 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 ...

  9. [转]解决Maven报错"Plugin execution not covered by lifecycle configuration"

    [转]解决Maven报错"Plugin execution not covered by lifecycle configuration" 导入Myabtis源码后,POM文件会报 ...

随机推荐

  1. 洛谷 P3227 [HNOI2013]切糕(最小割)

    题解 Dinic求最小割 题目其实就是求最小的代价使得每个纵轴被分成两部分 最小割!!! 我们把每个点抽象成一条边,一个纵轴就是一条\(S-T\)的路径 但是题目要求\(|f(x,y)-f(x',y' ...

  2. [转] 基于Gitlab CI搭建持续集成环境

    [From] https://blog.csdn.net/wGL3k77y9fR1k61T1aS/article/details/78798577 前言 本文是在12月12号迅雷@赵兵在前端早读课第三 ...

  3. sklearn的train_test_split

    train_test_split函数用于将矩阵随机划分为训练子集和测试子集,并返回划分好的训练集测试集样本和训练集测试集标签. 格式: X_train,X_test, y_train, y_test ...

  4. CDH集群安装配置(四)- mysql 的安装

    安装mysql,并且创建相关的表(只需要在chd1上面安装而且需要root权限)1.1 查看Centos自带mysql是否已经安装 yum list installed | grep mysql 卸载 ...

  5. linux 安装python

    wget https://www.python.org/ftp/python/3.6.0/Python-3.6.0.tgz #下载安装包 tar zxvf Python-3.6.0.tgz #解压 . ...

  6. myEclipse或eclipse复制或修改项目后的部署名称

    第一种方式: 右键工程-properties-Deployment-Deployment Assembly下 修改Web Content Root名称即可.见下图 第二种方式: 右键工程-proper ...

  7. 学习java虚拟机笔记

    虚拟机jvm 包括 类加载机制 ,运行时数据区域 运行时数据区域包括 ,程序计数器,虚拟机栈和本地方法栈,堆,方法区. 程序计数器是一块较小的内存控件, 用来指定当前字线程执行节码的行数 ,每个程序计 ...

  8. Java基础28-继承

    /* 继承的概述: 1.提高了代码复用性,简化了代码 2.让类与类之间产生了继承关系,才有了后面的多态特性的存在 注意:千万不要为了获取其他类的功能简化代码,而建立继承关系,必须要类与类之间存在继承关 ...

  9. 我的Python升级打怪之路【七】:网络编程

    Socket网络套接字 socket通常也称为"套接字",用于描述IP地址和端口,是一个通信链的句柄.应用程序通常通过”套接字“向网络发出请求或者应答网络请求. socket起源于 ...

  10. Mybatis基本介绍

    Mybatis介绍 1.Mybatis介绍   MyBatis 本是apache的一个开源项目iBatis, 2010年这个项目由apache software foundation 迁移到了goog ...