0

由于 com.google.guava#guava-base;r03 和 com.google.guava#guava-annotaions;r03 出现“未解决的依赖关系”错误,我将应用程序部署到 Heroku 时出错。当我尝试使用 URL 手动获取其中一个 jar 时:

http://repo.typesafe.com/typesafe/releases/com/google/guava/guava-base/r03/guava-base-r03.jar

我收到以下错误。看起来类型安全版本存储库中此工件的校验和是错误的。有谁知道如何解决或解决此问题?谢谢!

HTTP 状态 409 - 工件下载请求被拒绝:校验和策略“GEN_IF_ABSENT”拒绝工件“guava-base-r03.jar”。Checksums info: [ChecksumInfo{type=SHA-1, original='cb713fb4e84bd3c82cb71dece3c123563ed2643e', actual='251db72895ba5745e6810334075095832f12f437'}, ChecksumInfo{type=MD5, original='1384456aeec4d4c8cc2bff9227766a4e', actual='4bb26509e6e43a603b4e2f17161fbbc5'}]

类型状态报告

消息拒绝工件下载请求:校验和策略“GEN_IF_ABSENT”拒绝工件“guava-base-r03.jar”。Checksums info: [ChecksumInfo{type=SHA-1, original='cb713fb4e84bd3c82cb71dece3c123563ed2643e', actual='251db72895ba5745e6810334075095832f12f437'}, ChecksumInfo{type=MD5, original='1384456aeec4d4c8cc2bff9227766a4e', actual='4bb26509e6e43a603b4e2f17161fbbc5'}]

描述 由于与资源的当前状态冲突,请求无法完成(被拒绝的工件下载请求:校验和策略“GEN_IF_ABSENT”拒绝工件“guava-base-r03.jar”。校验和信息:[ChecksumInfo{type= SHA-1, original='cb713fb4e84bd3c82cb71dece3c123563ed2643e', actual='251db72895ba5745e6810334075095832f12f437'}, ChecksumInfo{type=MD5, original='1384456aeec4d4c8cc2bff9227766a4e', actual='4bb26509e6e43a603b4e2f17161fbbc5'}]).

Apache Tomcat/7.0.26

4

1 回答 1

1

根据上面的建议,我能够通过排除我从 bitcoinj -> guava-base r03 获得的瞬态依赖并向 guava 13.0 添加新的依赖来解决这个问题。我还回到使用默认解析器和校验和检查。我的新 Build.scala appDependencies 如下所示:

val appDependencies = Seq(
    "com.google.guava" % "guava" % "13.0",
    "com.google" % "bitcoinj" % "0.5.1" exclude("com.google.guava", "guava"),
    "org.squeryl" %% "squeryl" % "0.9.5-2",
    "postgresql" % "postgresql" % "9.1-901.jdbc4"
)

val main = PlayProject(appName, appVersion,
           appDependencies).settings(defaultScalaSettings:_*)

我现在可以毫无问题地将我的应用程序部署到 Heroku。感谢本的有用提示!

于 2012-08-06T02:13:41.520 回答