• 解决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。

    
    
  • 相关阅读:
    ionic 白名单
    简单的apk Ionic
    Ionic 小节
    Ionic学习笔记四 一些问题处理
    Android Platform Guide
    Android各个版本 版本号对应关系表
    JBPM4.4_管理流程定义
    JBPM4.4_核心概念与相关API
    工作流JBPM_day01:3-使用JBPM的API添加与执行流程
    工作流JBPM_day01:2-HelloWorld
  • 原文地址:https://www.cnblogs.com/lzh-boy/p/9995900.html
Copyright © 2020-2023  润新知