Scala / SBT:未解决的依赖关系

时间:2014-03-01 00:49:26

标签: heroku playframework

我正在尝试将我的Pl​​ay应用程序推送到heroku,这在开发中运行良好,但是Heroku抱怨它找不到这个库:AWSScala。我做错了什么?怎样才能解决这个问题?

Build.sbt:

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

    libraryDependencies ++= Seq(
      "com.github.seratch" %% "awscala" % "[0.2,)"
    ) 

完整错误:

sbt.ResolveException: unresolved dependency: com.github.seratch#awscala_2.10;[0.2,): not found

1 个答案:

答案 0 :(得分:0)

该工件不在reposiroty Sonatype OSS快照上:请参阅http://oss.sonatype.org/content/repositories/snapshots/com/github/seratch/awscala_2.10/

但它在http://repo1.maven.org/maven2/com/github/seratch/awscala_2.10/0.2.0

所以,一个工作的构建文件(来自新的Play框架项目的buit.sbt):

    $ cat build.sbt
    name := "foo"

    version := "1.0-SNAPSHOT"

    libraryDependencies ++= Seq(
      jdbc,
      anorm,
      cache,
      "com.github.seratch" %% "awscala" % "[0.2,)"
    )

    play.Project.playScalaSettings

解析器repo1.maven.org默认包含在sbt中:请参阅http://www.scala-sbt.org/release/docs/Detailed-Topics/Resolvers.html#predefined