我有一个基于 Play 2.1-SNAPSHOT 的应用程序在本地运行良好,但是当我尝试部署到 Heroku 时出现以下错误:
[warn] :::::::::::::::::::::::::::::::::::::::::::::: [warn] :: UNRESOLVED DEPENDENCIES :: [warn] :::::::::::::::::::::::::::::::::::::::::::::: [warn] :: play#sbt-plugin;2.1-SNAPSHOT: not found [warn] :::::::::::::::::::::::::::::::::::::::::::::: [warn] [warn] Note: Some unresolved dependencies have extra attributes. Check that these dependencies exist with the requested
属性。
我的 plugins.sbt 文件指向包含 2.1-SNAPSHOT 依赖项的本地存储库:
resolvers ++= Seq(
"Typesafe repository" at "http://repo.typesafe.com/typesafe/releases/",
Resolver.file("My Repository", file( "repository/local") )
)
// Use the Play sbt plugin for Play projects
addSbtPlugin("play" % "sbt-plugin" % "2.1-SNAPSHOT")
目录“repository/local”被检入到我的 GIT 存储库中。Heroku 上的 SBT 看起来确实在本地存储库中查找,因为在“未解决的依赖关系”错误之前,我看到以下警告:
[warn] ==== Typesafe repository: tried [warn] http://repo.typesafe.com/typesafe/releases/play/sbt-plugin_2.9.1_0.11.2/2.1-SNAPSHOT/sbt-plugin-2.1-SNAPSHOT.pom [warn] ==== My Repository: tried [warn] ==== heroku-sbt-typesafe: tried [warn] ==== heroku-central: tried
在本地运行命令“play stage”成功完成。