scala SBT 未解决的依赖关系

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/29933258/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-10-22 07:06:06  来源:igfitidea点击:

SBT Unresolved Dependencies

scalasbt

提问by Knows Not Much

This is an SBT build file which I have written

这是我编写的 SBT 构建文件

name := "Introduction"

version := "1.0"

scalaVersion := "2.11.2"

resolvers ++= Seq(
    "snapshots" at "http://oss.sonatype.org/content/repositories/snapshots",
    "releases" at "http://oss.sonatype.org/content/repositories/releases"
    )

libraryDependencies ++= Seq("org.specs2" %% "specs2" % "1.12.3" % "test")

when I run sbt compileI get error message

当我运行时,sbt compile我收到错误消息

[info] Resolving org.specs2#spec2_2.11;1.12.3 ...
[warn]  module not found: org.specs2#spec2_2.11;1.12.3
[warn] ==== local: tried
[warn]   C:\Users\Abhishek\.ivy2\local\org.specs2\spec2_2.11.12.3\ivys\ivy.xml
[warn] ==== public: tried
[warn]   https://repo1.maven.org/maven2/org/specs2/spec2_2.11/1.12.3/spec2_2.11-1.12.3.pom
[warn] ==== snapshots: tried
[warn]   http://oss.sonatype.org/content/repositories/snapshots/org/specs2/spec2_2.11/1.12.3/spec2_2.11-1.12.3.pom
[warn] ==== releases: tried
[warn]   http://oss.sonatype.org/content/repositories/releases/org/specs2/spec2_2.11/1.12.3/spec2_2.11-1.12.3.pom
[info] Resolving jline#jline;2.12 ...
[info] downloading https://repo1.maven.org/maven2/org/scala-lang/scala-library/2.11.2/scala-library-2.11.2.jar ...
[info]  [SUCCESSFUL ] org.scala-lang#scala-library;2.11.2!scala-library.jar (1827ms)
[info] downloading https://repo1.maven.org/maven2/org/scala-lang/scala-compiler/2.11.2/scala-compiler-2.11.2.jar ...
[info]  [SUCCESSFUL ] org.scala-lang#scala-compiler;2.11.2!scala-compiler.jar (3875ms)
[info] downloading https://repo1.maven.org/maven2/org/scala-lang/scala-reflect/2.11.2/scala-reflect-2.11.2.jar ...
[info]  [SUCCESSFUL ] org.scala-lang#scala-reflect;2.11.2!scala-reflect.jar (1375ms)
[warn]  ::::::::::::::::::::::::::::::::::::::::::::::
[warn]  ::          UNRESOLVED DEPENDENCIES         ::
[warn]  ::::::::::::::::::::::::::::::::::::::::::::::
[warn]  :: org.specs2#spec2_2.11;1.12.3: not found
[warn]  ::::::::::::::::::::::::::::::::::::::::::::::
[warn]
[warn]  Note: Unresolved dependencies path:
[warn]          org.specs2:spec2_2.11:1.12.3 (D:\myapps\Scala\hw\build.sbt#L12-13)
[warn]            +- introduction:introduction_2.11:1.0

采纳答案by chengpohi

use:

利用:

libraryDependencies += "org.specs2" % "specs2_2.11.0-RC3" % "2.3.10"