elasticsearch-hadoop.jar 6.8版本编译异常

背景

重新编译 elasticsearch-hadoop 包;

GitHub - elastic/elasticsearch-hadoop at 6.8

编译 7.17 版本时很正常,注意设置下环境变量就好,JAVA8_HOME/....

编译 6.8 版本时(要求jdk8 / jdk9),出现异常

  1. Could not resolve org.springframework.build.gradle:propdeps-plugin:0.0.7.

  2. Could not resolve cascading:cascading-local:2.6.3.

  3. Could not resolve org.elasticsearch.gradle:build-tools:6.8.24-SNAPSHOT

  4. Could not resolve cascading:cascading-hadoop:2.6.3.

分析(尝试逐个解决)

  1. gradle 仓库修改

    复制代码
     // ali库 解决 Could not resolve org.springframework.build.gradle:propdeps-plugin:0.0.7.
     maven{ url 'https://maven.aliyun.com/repository/central'}
     maven{ url 'https://maven.aliyun.com/repository/public' }
     maven{ url 'https://maven.aliyun.com/repository/google'}
     maven{ url 'https://maven.aliyun.com/repository/gradle-plugin'}
     maven{ url 'https://maven.aliyun.com/repository/spring'}
     maven{ url 'https://maven.aliyun.com/repository/spring-plugin'}
     maven{ url 'https://maven.aliyun.com/mvn/guide'}
     maven{ url 'https://maven.aliyun.com/repository/apache-snapshots'}
  2. esh-version.properties 修改

6.8.24-SNAPSHOT -> 6.8.23

  1. cascading-local 这个包始终无法获取

最终解决

本质原因有2个,一个是 repo.spring.io 改造成需要验证了,不验证会有401;另一个是http://conjars.org/repo 已经失效了,需要替换;

所以前面修改的全部回滚,完整解决方案如下:

  1. 处理 propdeps-plugin 包,增加阿里云的库

    复制代码
     // ali库 propdeps-plugin
     maven{ url 'https://maven.aliyun.com/repository/central'}
     maven{ url 'https://maven.aliyun.com/repository/public' }
     maven{ url 'https://maven.aliyun.com/repository/google'}
     maven{ url 'https://maven.aliyun.com/repository/gradle-plugin'}
     maven{ url 'https://maven.aliyun.com/repository/spring'}
     maven{ url 'https://maven.aliyun.com/repository/spring-plugin'}
     maven{ url 'https://maven.aliyun.com/mvn/guide'}
     maven{ url 'https://maven.aliyun.com/repository/apache-snapshots'}
  2. 修改 buildSrc/src/main/groovy/org/elasticsearch/hadoop/gradle/BuildPlugin.groovy

    全部的 http://conjars.org/repo 或者 https://conjars.org/repo

    替换成 https://conjars.wensel.net/repo

参考:

  1. Notice of Permissions Changes to repo.spring.io, January 2023

  2. https://segmentfault.com/q/1010000043853512

  3. spring源码编译问题解决1,Received status code 401 from server问题,not found问题,更换阿里云镜像_received status code 401 from server:-CSDN博客

  4. https://github.com/elastic/elasticsearch-hadoop/issues/984

  5. How to build a plugin for a not yet released version? - Elasticsearch - Discuss the Elastic Stack

  6. conjars.org: Connection timed out_http://conjars.org/repo 地址失效-CSDN博客

相关推荐
一次旅行14 小时前
【效率秘籍】Shell 函数+别名组合拳,让 80% 的重复命令变 1 个字母
大数据·elasticsearch·搜索引擎
暖和_白开水14 小时前
数据分析agent(九):es_client_manager.py 和分词器ik_max_word问题
elasticsearch·数据分析·c#
码农学院14 小时前
Elasticsearch构建汽车零配件智能搜索与匹配系统
大数据·elasticsearch·汽车
Elastic 中国社区官方博客1 天前
不到 5 分钟完成本地部署:Jina embedding 模型现已支持本地部署
大数据·人工智能·elasticsearch·搜索引擎·embedding·jina
二进制流水搬运工1 天前
入职第一天拉了23个仓库,我写了个脚本解放双手
大数据·elasticsearch·搜索引擎
Elasticsearch1 天前
在不到一小时内将 Datadog Kubernetes 仪表板迁移到 Elastic Observability
elasticsearch
.柒宇.1 天前
Elasticsearch 核心概念与系统架构详解
elasticsearch·系统架构
风行無痕1 天前
单机Elasticsearch 8.19.18安全升级到9.4.3的过程
大数据·elasticsearch·搜索引擎
Elastic 中国社区官方博客2 天前
使用重新设计的 AutoOps 更快地进行 Elasticsearch 问题排查
大数据·运维·前端·人工智能·elasticsearch·搜索引擎·全文检索
阿拉雷️2 天前
【搜索实战】Spring Boot 3.3 + AI Agent × Elasticsearch:让AI自动优化搜索策略,查询速度从2秒压到50毫秒
人工智能·spring boot·elasticsearch