AthenaJDBC冲突的依赖关系

时间:2017-08-21 06:49:26

标签: dependencies aws-sdk amazon-athena

AthenaJDBC library是一个胖罐子。它的依赖关系嵌入了它。其中一些依赖项与AWS S3库重叠,仅部分包含在内。

如果我从S3 jar中排除依赖项,我会收到与未找到的类相关的编译错误。

libraryDependencies ++= {
  List(
    ...
    "com.amazonaws" % "aws-java-sdk-s3" % "1.11.179" excludeAll (
      ExclusionRule(name = "ion-java"),
      ExclusionRule(name = "aws-java-sdk-core")
    ),
    "com.amazonaws.athena.jdbc" % "AthenaJDBC41" % "1.0.1-atlassian-hosted"
  )
}

导致错误,如:

Class com.amazonaws.SdkClientException not found - continuing with a stub.
...

但如果我不这样做,我就无法组装自己的应用程序:

java.lang.RuntimeException: deduplicate: different file contents found in the following:
/Users/jem/.ivy2/cache/com.amazonaws/aws-java-sdk-core/jars/aws-java-sdk-core-1.11.179.jar:com/amazonaws/auth/AWSCredentials.class
/Users/jem/.ivy2/cache/com.amazonaws.athena.jdbc/AthenaJDBC41/jars/AthenaJDBC41-1.0.1-atlassian-hosted.jar:com/amazonaws/auth/AWSCredentials.class
...

据我所知,我唯一的前进方向是

  1. 找到AthenaJDBC的非脂肪版本 - 但我找不到它;或
  2. 查找AthenaJDBC中捆绑的AWS核心库的版本,因此我可以降级为S3 lib的依赖项。我已经检查了AthenaJDBC jar,但无法辨别它捆绑的AWS库的版本。
  3. 我该如何解决这个问题?

0 个答案:

没有答案