播放2.2.2 Heroku部署httpclient; 4.0.1下载失败

时间:2015-11-02 14:16:43

标签: heroku playframework

播放应用程序更新在本地运行构建/运行正常但是在迁移到cedar-14之后推送到Heroku失败时出现以下情况:

[error] (*:update) sbt.ResolveException: download failed: org.apache.httpcomponents#httpclient;4.0.1!httpclient.jar

浏览后我尝试了以下方法来解决问题而没有任何运气: 将sbt.version设置为0.13.5

问题似乎出现在Heroku自己的构建过程中。

非常感谢有关此问题的任何帮助。

DUMP:

remote:        [info]   [SUCCESSFUL ] org.scala-lang#jline;2.10.3!jline.jar (11ms)
remote:        [warn]   ::::::::::::::::::::::::::::::::::::::::::::::
remote:        [warn]   ::              FAILED DOWNLOADS            ::
remote:        [warn]   :: ^ see resolution messages for details  ^ ::
remote:        [warn]   ::::::::::::::::::::::::::::::::::::::::::::::
remote:        [warn]   :: org.apache.httpcomponents#httpclient;4.0.1!httpclient.jar
remote:        [warn]   ::::::::::::::::::::::::::::::::::::::::::::::
remote:        sbt.ResolveException: download failed: org.apache.httpcomponents#httpclient;4.0.1!httpclient.jar

Build.sbt

name := "jmpdb"

version := "1.0-SNAPSHOT"

libraryDependencies ++= Seq(
  javaJdbc,
  javaEbean,
  cache,
  "mysql" % "mysql-connector-java" % "5.1.18",
  "org.mindrot" % "jbcrypt" % "0.3m",
  "com.thoughtworks.xstream" % "xstream" % "1.4.7",
  "org.apache.velocity" % "velocity" % "1.7",
  "commons-lang" % "commons-lang" % "2.6",
  "com.google.api-client" % "google-api-client" % "1.12.0-beta",
  "com.google.http-client" % "google-http-client-jackson" % "1.12.0-beta",
  "com.google.oauth-client" % "google-oauth-client" % "1.12.0-beta",
  "com.google.apis" % "google-api-services-drive" % "v2-rev30-1.12.0-beta",
  "com.google.apis" % "google-api-services-oauth2" % "v2-rev25-1.12.0-beta",
  "org.json" % "json" % "20080701",
  "org.reflections" % "reflections" % "0.9.8",
  "com.ecwid" % "ecwid-mailchimp" % "1.3.0.7",
  "com.typesafe" %% "play-plugins-mailer" % "2.1.0"
)

resolvers += "jBCrypt Repository" at "http://repo1.maven.org/maven2/org/"

resolvers += "google-api-services" at "http://google-api-client-libraries.appspot.com/mavenrepo"

resolvers := Seq("typesafe" at "http://repo.typesafe.com/typesafe/repo")

// Only needed in development
javaOptions ++= Seq("-Xmx512M", "-Xmx2048M", "-XX:MaxPermSize=2048M")

play.Project.playJavaSettings

Plugins.sbt

// Comment to get more information during initialization
logLevel := Level.Warn

// The Typesafe repository
resolvers += "Typesafe repository" at "http://repo.typesafe.com/typesafe/releases/"

// Use the Play sbt plugin for Play projects
addSbtPlugin("com.typesafe.play" % "sbt-plugin" % "2.2.2")

1 个答案:

答案 0 :(得分:2)

在咨询Heroku技术支持后,问题与Heroku上的SBT缓存中的损坏有关。下面建议的步骤解决了这个问题(在我的例子中是purge_cache,因为我已经运行了sbt_clean = true):

$ heroku config:set SBT_CLEAN=true
$ git push heroku master

如果仍然无效,请尝试通过运行以下命令清除ivy2和m2缓存:

$ heroku plugins:install https://github.com/heroku/heroku-repo.git
$ heroku repo:purge_cache -a peaceful-mountain-6737
$ git push heroku master

希望这可以帮助其他人进入圈子。