最近在搭建公司的基础框架,业务需求用到elasticsearch,所以需要整合到基础框架里,供各业务线使用同时也便于管理,但在整合的过程中,出现了莫名的问题,同时maven的提示也不够明确。

我的版本信息为 spring boot 2.1.0.RELEASE,elasticsearch 6.3.1,因为不同版本可能遇到的问题不一样。

  1.       我的POM包引用为
  1. <parent>
  2.  
  3. <groupId>org.springframework.boot</groupId>
  4.  
  5. <artifactId>spring-boot-starter-parent</artifactId>
  6.  
  7. <version>2.1.0.RELEASE</version>
  8.  
  9. <relativePath/>
  10.  
  11. </parent>
  12.  
  13. <dependency>
  14.  
  15. <groupId>org.springframework.boot</groupId>
  16.  
  17. <artifactId>spring-boot-starter-data-elasticsearch</artifactId>
  18. </dependency>
  1.  
  1.       我的错误提示为如下图,Return code is: 400 , ReasonPhrase:Repository version policy: SNAPSHOT does not allow version: 2.1.0.RELEASE.,你能查询的解决方案几乎都是修改私有仓库级别,但对我遇到的问题并不可行,

  1.  
  1. 这里出现的问题跟私有库没关系,是包之间的不兼容造成的,解决步骤就是把出现问题的包一一排查,要求就是你要熟悉根据每步的提示,找到要排除的包,然后引用兼容的包,最后我的POM设置如下,同时解决elasticsearch redis 冲突的问题。
  1.  
  1. <dependency>
  2.  
  3. <groupId>org.springframework.boot</groupId>
  4.  
  5. <artifactId>spring-boot-starter-data-elasticsearch</artifactId>
  6.  
  7. <exclusions>
  8.  
  9. <exclusion>
  10.  
  11. <groupId>org.elasticsearch.client</groupId>
  12.  
  13. <artifactId>transport</artifactId>
  14.  
  15. </exclusion>
  16.  
  17. <exclusion>
  18.  
  19. <groupId>org.elasticsearch.plugin</groupId>
  20.  
  21. <artifactId>transport-netty4-client</artifactId>
  22.  
  23. </exclusion>
  24.  
  25. </exclusions>
  26.  
  27. </dependency>
  28.  
  29. <dependency>
  30.  
  31. <groupId>org.elasticsearch.plugin</groupId>
  32.  
  33. <artifactId>transport-netty4-client</artifactId>
  34.  
  35. <exclusions>
  36.  
  37. <exclusion>
  38.  
  39. <groupId>org.elasticsearch.client</groupId>
  40.  
  41. <artifactId>transport</artifactId>
  42.  
  43. </exclusion>
  44.  
  45. </exclusions>
  46.  
  47. <version>6.3.1</version>
  48.  
  49. </dependency>
  50.  
  51. <dependency>
  52.  
  53. <groupId>org.elasticsearch.client</groupId>
  54.  
  55. <artifactId>transport</artifactId>
  56.  
  57. <version>6.3.1</version>
  58.  
  59. <exclusions>
  60.  
  61. <exclusion>
  62.  
  63. <groupId>org.elasticsearch</groupId>
  64.  
  65. <artifactId>elasticsearch</artifactId>
  66.  
  67. </exclusion>
  68.  
  69. <exclusion>
  70.  
  71. <groupId>org.elasticsearch.client</groupId>
  72.  
  73. <artifactId>elasticsearch-rest-client</artifactId>
  74.  
  75. </exclusion>
  76.  
  77. <exclusion>
  78.  
  79. <groupId>org.elasticsearch.plugin</groupId>
  80.  
  81. <artifactId>transport-netty4-client</artifactId>
  82.  
  83. </exclusion>
  84.  
  85. </exclusions>
  86.  
  87. </dependency>
  88.  
  89. <dependency>
  90.  
  91. <groupId>org.elasticsearch.client</groupId>
  92.  
  93. <artifactId>elasticsearch-rest-client</artifactId>
  94.  
  95. <version>6.3.1</version>
  96.  
  97. </dependency>
  98.  
  99. <dependency>
  100.  
  101. <groupId>org.elasticsearch</groupId>
  102.  
  103. <artifactId>elasticsearch</artifactId>
  104.  
  105. <version>6.3.1</version>
  106.  
  107. </dependency>
  1.  然后运行 >mvn clean compile package -U,可以看到熟悉的BUILD SUCCESS

  1.  

解决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. HTML5 Canvas核心技术 图形、动画与游戏开发学习总结

    save 和 restore 函数的应用 保存canvas和恢复canvas clip函数的应用 文字的绘制 背景图片的绘制 离屏canvas 基于时间的运动

  2. google浏览器安装不上的绝望经历

    手贱把google的一些文件删除了,整个浏览器都没法打开 决定重装下,但是连卸载的功能都无法打开了 于是决定上网重新下载了个安装包,发现安装包都打不来 很绝望,查了很多资料 很多人说要删除注册表的东西 ...

  3. Python爬虫常用之登录(一) 思想

    爬虫主要目的是获取数据,常见的数据可以直接访问网页或者抓包获取,然后再解析即可. 一些较为隐私的数据则不会让游客身份的访问者随便看到,这个时候便需要登录获取. 一般获取数据需要的是登录后的cookie ...

  4. python __getattribute__、__getattr__、__setattr__详解

    __getattribute__ 官方文档中描述如下: 该方法可以拦截对对象属性的所有访问企图,当属性被访问时,自动调用该方法(只适用于新式类).因此常用于实现一些访问某属性时执行一段代码的特性. 需 ...

  5. J15W-J45W全铜质截止阀厂家,J15W-J45W全铜质截止阀价格 - 专题栏目 - 无极资讯网

    无极资讯网 首页 最新资讯 最新图集 最新标签   搜索 J15W-J45W全铜质截止阀 无极资讯网精心为您挑选了(J15W-J45W全铜质截止阀)信息,其中包含了(J15W-J45W全铜质截止阀)厂 ...

  6. 安装vs2013要求重启后安装

    解决方案: 卸载360,然后杀毒, 重启电脑就可以直接安装vs了

  7. Tomcat 9内存溢出:"http-apr-8080-Acceptor-0" java.lang.OutOfMemoryError: Direct buffer memory

    Tomcat开启了APR模式,而APR模式会使用堆外内存,关于堆内存可从如下链接了解一下:http://blog.csdn.net/zhouhl_cn/article/details/6573213. ...

  8. Math.round、Math.floor、Math.ceil 区别

    1.Math.round() 按照四舍五入的方式返回值 例如:Math.round(9.5)=10    Math.round(9.4)=9 2.Math.floor()返回最小整数 例如:Math. ...

  9. Python中socket经ssl加密后server开多线程

            前几天手撸Python socket代码,撸完之后经过ssl加密,确保数据的安全,外加server端开启多线程保证一个客户端连接有一个线程来服务客户端,走了不少的弯路,网上的信息啥的要 ...

  10. 基础selenium+Python(定位、等待、打印)

    1.第一个脚本 # coding = utf-8 from selenium import webdriver browser = webdriver.Firefox() browser.get(&q ...