最近在搭建公司的基础框架,业务需求用到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. 实验吧之deeeeeeaaaaaadbeeeeeeeeeef-200

    题目中提示说“图片是正确的吗”,赶紧打开图片,图片显示正常,没啥毛病,那就放到winhex里面,好像它的十六进制格式也蛮标准的,然后它的文本区域有个iphone,这个梗我也是百度才知道的: winhe ...

  2. C# Directory和DirectoryInfo类(文件目录操作)

    对目录操作例子: using System; using System.Collections.Generic; using System.Linq; using System.Text; using ...

  3. python update()

    Python 字典 update() 函数把字典参数 dict2 的 key/value(键/值) 对更新到字典 dict 里. dict.update(dict2) 如果dict2里的键和dict1 ...

  4. python学习,day3:函数式编程,带return

    return的主要作用就是,在调用的时候,能知道函数的运行情况,相当于打个标签 # coding=utf-8 # Author: RyAn Bi def test1(): print('in the ...

  5. 断电后gitlab报500错误启动出错

    异常断电后,gitlab报500错误,重启无效 通过sudo gitlab-ctl reconfigure启动时, 提示 [execute] pgsql:could not connect to se ...

  6. Visual Studio 2019 激活码

    Visual Studio 2019 Enterprise BF8Y8-GN2QH-T84XB-QVY3B-RC4DF Visual Studio 2019 Professional NYWVH-HT ...

  7. C++经典面试题汇总

    1. 下面代码输出什么?为什么?(初始化列表) #include<iostream> using namespace std; class Test { int m_i; int m_j; ...

  8. Android自动化之AccessibilityService

    简介demo示例说明Manifest声明AccessibilityService的XML配置文件创建继承自AccessibilityService的服务类MainActivity检测服务是否开启UiA ...

  9. 宜人贷项目里-----正则匹配input输入月份规则

    在标签上可以直接进行校验如下,如果只调数字键盘type=number不好用可以用type=tel <input name="creditDate" oninput=" ...

  10. app唤起的完美解决方案,及阻止浏览器的默认弹窗行为

    https://stackoverflow.com/questions/10237031/how-to-open-a-native-ios-app-from-a-web-appvar frame = ...