sbt中未解决的依赖项 [英] Unresolved Dependencies in sbt

查看:146
本文介绍了sbt中未解决的依赖项的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

运行我的sbt构建,会得到以下未解决的依赖项.

Running my sbt build, I get the following unresolved dependencies.

[warn]  ::::::::::::::::::::::::::::::::::::::::::::::
[warn]  ::          UNRESOLVED DEPENDENCIES         ::
[warn]  ::::::::::::::::::::::::::::::::::::::::::::::
[warn]  :: com.typesafe.play#sbt-link;2.2.0: not found
[warn]  :: com.typesafe.play#play-exceptions;2.2.0: not found
[warn]  :: com.typesafe.play#routes-compiler_2.10;2.2.0: not found
[warn]  :: com.typesafe.play#templates-compiler_2.10;2.2.0: not found
[warn]  :: com.typesafe.play#console_2.10;2.2.0: not found
[warn]  :: net.contentobjects.jnotify#jnotify;0.94: not found
[warn]  ::::::::::::::::::::::::::::::::::::::::::::::

我的项目结构如下:

parent
 |
  --> sbtApp1
  --> playApp
  --> sbtApp2
  --> project
      --> Build.scala
      --> plugins.sbt
  --> build.sbt

我的parent/project/plugins.sbt具有以下内容: addSbtPlugin("com.typesafe.play" % "sbt-plugin" % "2.2.0")

My parent/project/plugins.sbt has the following: addSbtPlugin("com.typesafe.play" % "sbt-plugin" % "2.2.0")

我在parent/build.sbt中添加了以下行,但是仍然遇到编译时失败.

I added the following line to parent/build.sbt, but I'm still getting the compile-time failure.

libraryDependencies += "play" % "play_2.10" % "2.1.0"

推荐答案

将此行添加到parent/project/plugins.sbt:

resolvers += "Typesafe repository" at "http://repo.typesafe.com/typesafe/releases/"

Voilà. (我怎么知道?因为Play 2.2入门指南"是这样说的,所以 http://www.playframework. com/documentation/2.2.x/NewApplication .)

Voilà. (How did I know? Because the Play 2.2 "Getting Started Guide" says so, http://www.playframework.com/documentation/2.2.x/NewApplication.)

我认为您不需要libraryDependencies东西.

这篇关于sbt中未解决的依赖项的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆