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
...
据我所知,我唯一的前进方向是
我该如何解决这个问题?