将基于Play 2.1-SNAPSHOT的应用程序部署到Heroku

InP*_*uit 6 heroku playframework

我有一个基于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
Run Code Online (Sandbox Code Playgroud)

属性.

我的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")
Run Code Online (Sandbox Code Playgroud)

目录"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
Run Code Online (Sandbox Code Playgroud)

在本地运行命令"play stage"成功完成.

ara*_*i01 8

另一种方法是,如果您不想使用本地文件仓库,请将Typesafe ivy-snapshots存储库添加为插件解析程序.

project/plugins.sbt中:

resolvers += Resolver.url("Typesafe Ivy Snapshots", url("http://repo.typesafe.com/typesafe/ivy-snapshots/"))(Resolver.ivyStylePatterns)
Run Code Online (Sandbox Code Playgroud)


InP*_*uit 6

发现了这个问题.我需要通过在文件解析器之后添加"Resolver.ivyStylePatterns"来声明"我的存储库"作为Ivy存储库,如下所示:

Resolver.file("My Repository", file( "repository/local/") )(Resolver.ivyStylePatterns)
Run Code Online (Sandbox Code Playgroud)