2012-05-17 63 views
6

我有一個運行在本地罰款播放2.1快照基於應用程序,但是當我嘗試部署到Heroku的我得到以下錯誤:部署Play根據2.1快照應用程序的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 

attributes.

我plugins.sbt文件指向包含2.1快照依賴本地資源庫:

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") 

目錄「資源庫/本地」簽入我的Git倉庫。它看起來像自「未解決的依賴」的錯誤,我看到下面的警告之前SBT在Heroku是尋找本地資源庫中:

[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 

運行命令「遊戲臺」局部成功完成。

+0

我認爲另一種方法是添加CloudBees CI快照回購,而不是使用本地文件回購。 –

回答

6

發現此問題。我需要聲明「我的倉庫」作爲常春藤庫由文件解析器這樣之後加入「Resolver.ivyStylePatterns」:

Resolver.file("My Repository", file("repository/local/"))(Resolver.ivyStylePatterns) 
8

另一種方法是,如果你願意的類型安全ivy-snapshots庫添加爲一個插件解析器更喜歡不使用本地文件回購。

項目/ plugins.sbt

resolvers += Resolver.url("Typesafe Ivy Snapshots", url("http://repo.typesafe.com/typesafe/ivy-snapshots/"))(Resolver.ivyStylePatterns) 
0

http://repo.typesafe.com/typesafe/ivy-snapshots/似乎不再有效,下面的配置工作對我來說:

在plugins.sbt:

//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") 

in your build.sbt

//play snapshot 

resolvers += "Sonatype snapshots" at "https://oss.sonatype.org/content/repositories/snapshots/"