我有一个基于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正在寻找本地存储库,因为在“Unresolved Dependency”错误之前,我看到以下警告:
[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”成功完成。
答案 0 :(得分:8)
如果您不想使用本地文件仓库,可以选择将Typesafe ivy-snapshots存储库添加为插件解析程序。
在 project / plugins.sbt :
中resolvers += Resolver.url("Typesafe Ivy Snapshots", url("http://repo.typesafe.com/typesafe/ivy-snapshots/"))(Resolver.ivyStylePatterns)
答案 1 :(得分:6)
发现了这个问题。我需要通过在文件解析器之后添加“Resolver.ivyStylePatterns”来声明“我的存储库”作为常春藤存储库:
Resolver.file("My Repository", file( "repository/local/") )(Resolver.ivyStylePatterns)
答案 2 :(得分:0)
http://repo.typesafe.com/typesafe/ivy-snapshots/
似乎不再有效,以下配置适用于我:
:
//play sbt-plugin snapshot
resolvers += Resolver.url("Typesafe Simple Snapshots", url("https://repo.typesafe.com/typesafe/simple/snapshots/"))(Resolver.ivyStylePatterns)
//play snapshot
resolvers += "Sonatype snapshots" at "https://oss.sonatype.org/content/repositories/snapshots/"
// The Play plugin
addSbtPlugin("com.typesafe.play" %% "sbt-plugin" % "2.4-SNAPSHOT")
你的build.sbt 中的
//play snapshot
resolvers += "Sonatype snapshots" at "https://oss.sonatype.org/content/repositories/snapshots/"