Elasticsearch 6.3.0 jarhell模块-信息。类

时间:2018-07-06 20:33:18

标签: java elasticsearch lombok

嗨,我在我的项目中使用Spring Boot 2,Lombok和Elasticsearch 6.3.0,并尝试运行集成测试,但遇到了臭名昭著的jar地狱!检查。

Caused by: java.lang.IllegalStateException: jar hell!
class: module-info
jar1: home/tim/.m2/repository/org/projectlombok/lombok/1.16.22/lombok 
1.16.22.jar
jar2: /home/tim/.m2/repository/org/apache/logging/log4j/log4j-
api/2.10.0/log4j-api-2.10.0.jar
  at org.elasticsearch.bootstrap.JarHell.checkClass(JarHell.java:273)
  at org.elasticsearch.bootstrap.JarHell.checkJarHell(JarHell.java:190)
  at org.elasticsearch.bootstrap.JarHell.checkJarHell(JarHell.java:86)
  at org.elasticsearch.bootstrap.BootstrapForTesting.<clinit>(BootstrapForTesting.java:93)

module-info.class同时存在于lombok和log4j-api(elasticsearch的传递依赖项)中。我不能排除log4j-api,因为Elasticsearch需要此类,但不想删除lombok,因为它有助于避免编写样板Java代码。

任何线索如何解决此问题?

0 个答案:

没有答案