我试图跟随基本的游戏书。
我在本书的这一部分:git。
我在这一点上的理解是我应该运行./sbt.sh来安装所需的所有软件包(这适用于第1章)。但是,这是输出:
./sbt.sh
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=512m; support was removed in 8.0
[info] Loading project definition from /Users/me/Dropbox/essential-play-code/chapter2-time/project
[info] Updating {file:/Users/me/Dropbox/essential-play-code/chapter2-time/project/}chapter2-time-build...
[info] Resolving com.typesafe.play#build-link;2.3.6 ...
[warn] module not found: com.typesafe.play#build-link;2.3.6
[warn] ==== typesafe-ivy-releases: tried
[warn] https://repo.typesafe.com/typesafe/ivy-releases/com.typesafe.play/build-link/2.3.6/ivys/ivy.xml
[warn] ==== sbt-plugin-releases: tried
[warn] https://repo.scala-sbt.org/scalasbt/sbt-plugin-releases/com.typesafe.play/build-link/2.3.6/ivys/ivy.xml
[warn] ==== local: tried
[warn] /Users/me/.ivy2/local/com.typesafe.play/build-link/2.3.6/ivys/ivy.xml
[warn] ==== public: tried
[warn] https://repo1.maven.org/maven2/com/typesafe/play/build-link/2.3.6/build-link-2.3.6.pom
[info] Resolving com.typesafe.play#play-exceptions;2.3.6 ...
[warn] module not found: com.typesafe.play#play-exceptions;2.3.6
[warn] ==== typesafe-ivy-releases: tried
[warn] https://repo.typesafe.com/typesafe/ivy-releases/com.typesafe.play/play-exceptions/2.3.6/ivys/ivy.xml
[warn] ==== sbt-plugin-releases: tried
[warn] https://repo.scala-sbt.org/scalasbt/sbt-plugin-releases/com.typesafe.play/play-exceptions/2.3.6/ivys/ivy.xml
[warn] ==== local: tried
[warn] /Users/me/.ivy2/local/com.typesafe.play/play-exceptions/2.3.6/ivys/ivy.xml
[warn] ==== public: tried
[warn] https://repo1.maven.org/maven2/com/typesafe/play/play-exceptions/2.3.6/play-exceptions-2.3.6.pom
[info] Resolving com.typesafe.play#routes-compiler_2.10;2.3.6 ...
[warn] module not found: com.typesafe.play#routes-compiler_2.10;2.3.6
[warn] ==== typesafe-ivy-releases: tried
[warn] https://repo.typesafe.com/typesafe/ivy-releases/com.typesafe.play/routes-compiler_2.10/2.3.6/ivys/ivy.xml
[warn] ==== sbt-plugin-releases: tried
[warn] https://repo.scala-sbt.org/scalasbt/sbt-plugin-releases/com.typesafe.play/routes-compiler_2.10/2.3.6/ivys/ivy.xml
[warn] ==== local: tried
[warn] /Users/me/.ivy2/local/com.typesafe.play/routes-compiler_2.10/2.3.6/ivys/ivy.xml
[warn] ==== public: tried
[warn] https://repo1.maven.org/maven2/com/typesafe/play/routes-compiler_2.10/2.3.6/routes-compiler_2.10-2.3.6.pom
[info] Resolving com.typesafe.play#sbt-run-support-210_2.10;2.3.6 ...
[warn] module not found: com.typesafe.play#sbt-run-support-210_2.10;2.3.6
[warn] ==== typesafe-ivy-releases: tried
[warn] https://repo.typesafe.com/typesafe/ivy-releases/com.typesafe.play/sbt-run-support-210_2.10/2.3.6/ivys/ivy.xml
[warn] ==== sbt-plugin-releases: tried
[warn] https://repo.scala-sbt.org/scalasbt/sbt-plugin-releases/com.typesafe.play/sbt-run-support-210_2.10/2.3.6/ivys/ivy.xml
[warn] ==== local: tried
[warn] /Users/me/.ivy2/local/com.typesafe.play/sbt-run-support-210_2.10/2.3.6/ivys/ivy.xml
[warn] ==== public: tried
[warn] https://repo1.maven.org/maven2/com/typesafe/play/sbt-run-support-210_2.10/2.3.6/sbt-run-support-210_2.10-2.3.6.pom
[info] Resolving org.scala-sbt.ivy#ivy;2.3.0-sbt-2cc8d2761242b072cedb0a04cb39435[info] Resolving org.fusesource.jansi#jansi;1.4 ...
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn] :: UNRESOLVED DEPENDENCIES ::
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn] :: com.typesafe.play#build-link;2.3.6: not found
[warn] :: com.typesafe.play#play-exceptions;2.3.6: not found
[warn] :: com.typesafe.play#routes-compiler_2.10;2.3.6: not found
[warn] :: com.typesafe.play#sbt-run-support-210_2.10;2.3.6: not found
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn]
[warn] Note: Unresolved dependencies path:
[warn] com.typesafe.play:build-link:2.3.6
[warn] +- com.typesafe.play:sbt-plugin:2.3.6 (scalaVersion=2.10, sbtVersion=0.13) (/Users/me/Dropbox/essential-play-code/chapter2-time/project/plugins.sbt#L1-2)
[warn] +- default:chapter2-time-build:0.1-SNAPSHOT (scalaVersion=2.10, sbtVersion=0.13)
[warn] com.typesafe.play:play-exceptions:2.3.6
[warn] +- com.typesafe.play:sbt-plugin:2.3.6 (scalaVersion=2.10, sbtVersion=0.13) (/Users/me/Dropbox/essential-play-code/chapter2-time/project/plugins.sbt#L1-2)
[warn] +- default:chapter2-time-build:0.1-SNAPSHOT (scalaVersion=2.10, sbtVersion=0.13)
[warn] com.typesafe.play:routes-compiler_2.10:2.3.6
[warn] +- com.typesafe.play:sbt-plugin:2.3.6 (scalaVersion=2.10, sbtVersion=0.13) (/Users/me/Dropbox/essential-play-code/chapter2-time/project/plugins.sbt#L1-2)
[warn] +- default:chapter2-time-build:0.1-SNAPSHOT (scalaVersion=2.10, sbtVersion=0.13)
[warn] com.typesafe.play:sbt-run-support-210_2.10:2.3.6
[warn] +- com.typesafe.play:sbt-plugin:2.3.6 (scalaVersion=2.10, sbtVersion=0.13) (/Users/me/Dropbox/essential-play-code/chapter2-time/project/plugins.sbt#L1-2)
[warn] +- default:chapter2-time-build:0.1-SNAPSHOT (scalaVersion=2.10, sbtVersion=0.13)
sbt.ResolveException: unresolved dependency: com.typesafe.play#build-link;2.3.6: not found
unresolved dependency: com.typesafe.play#play-exceptions;2.3.6: not found
unresolved dependency: com.typesafe.play#routes-compiler_2.10;2.3.6: not found
unresolved dependency: com.typesafe.play#sbt-run-support-210_2.10;2.3.6: not found
at sbt.IvyActions$.sbt$IvyActions$$resolve(IvyActions.scala:313)
at sbt.IvyActions$$anonfun$updateEither$1.apply(IvyActions.scala:191)
at sbt.IvyActions$$anonfun$updateEither$1.apply(IvyActions.scala:168)
at sbt.IvySbt$Module$$anonfun$withModule$1.apply(Ivy.scala:156)
at sbt.IvySbt$Module$$anonfun$withModule$1.apply(Ivy.scala:156)
at sbt.IvySbt$$anonfun$withIvy$1.apply(Ivy.scala:133)
at sbt.IvySbt.sbt$IvySbt$$action$1(Ivy.scala:57)
at sbt.IvySbt$$anon$4.call(Ivy.scala:65)
at xsbt.boot.Locks$GlobalLock.withChannel$1(Locks.scala:98)
at xsbt.boot.Locks$GlobalLock.xsbt$boot$Locks$GlobalLock$$withChannelRetries$1(Locks.scala:81)
at xsbt.boot.Locks$GlobalLock$$anonfun$withFileLock$1.apply(Locks.scala:102)
at xsbt.boot.Using$.withResource(Using.scala:11)
at xsbt.boot.Using$.apply(Using.scala:10)
at xsbt.boot.Locks$GlobalLock.ignoringDeadlockAvoided(Locks.scala:62)
at xsbt.boot.Locks$GlobalLock.withLock(Locks.scala:52)
at xsbt.boot.Locks$.apply0(Locks.scala:31)
at xsbt.boot.Locks$.apply(Locks.scala:28)
at sbt.IvySbt.withDefaultLogger(Ivy.scala:65)
at sbt.IvySbt.withIvy(Ivy.scala:128)
at sbt.IvySbt.withIvy(Ivy.scala:125)
at sbt.IvySbt$Module.withModule(Ivy.scala:156)
at sbt.IvyActions$.updateEither(IvyActions.scala:168)
at sbt.Classpaths$$anonfun$sbt$Classpaths$$work$1$1.apply(Defaults.scala:1439)
at sbt.Classpaths$$anonfun$sbt$Classpaths$$work$1$1.apply(Defaults.scala:1435)
at sbt.Classpaths$$anonfun$doWork$1$1$$anonfun$90.apply(Defaults.scala:1470)
at sbt.Classpaths$$anonfun$doWork$1$1$$anonfun$90.apply(Defaults.scala:1468)
at sbt.Tracked$$anonfun$lastOutput$1.apply(Tracked.scala:37)
at sbt.Classpaths$$anonfun$doWork$1$1.apply(Defaults.scala:1473)
at sbt.Classpaths$$anonfun$doWork$1$1.apply(Defaults.scala:1467)
at sbt.Tracked$$anonfun$inputChanged$1.apply(Tracked.scala:60)
at sbt.Classpaths$.cachedUpdate(Defaults.scala:1490)
at sbt.Classpaths$$anonfun$updateTask$1.apply(Defaults.scala:1417)
at sbt.Classpaths$$anonfun$updateTask$1.apply(Defaults.scala:1369)
at scala.Function1$$anonfun$compose$1.apply(Function1.scala:47)
at sbt.$tilde$greater$$anonfun$$u2219$1.apply(TypeFunctions.scala:40)
at sbt.std.Transform$$anon$4.work(System.scala:63)
at sbt.Execute$$anonfun$submit$1$$anonfun$apply$1.apply(Execute.scala:228)
at sbt.Execute$$anonfun$submit$1$$anonfun$apply$1.apply(Execute.scala:228)
at sbt.ErrorHandling$.wideConvert(ErrorHandling.scala:17)
at sbt.Execute.work(Execute.scala:237)
at sbt.Execute$$anonfun$submit$1.apply(Execute.scala:228)
at sbt.Execute$$anonfun$submit$1.apply(Execute.scala:228)
at sbt.ConcurrentRestrictions$$anon$4$$anonfun$1.apply(ConcurrentRestrictions.scala:159)
at sbt.CompletionService$$anon$2.call(CompletionService.scala:28)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
[error] (*:update) sbt.ResolveException: unresolved dependency: com.typesafe.play#build-link;2.3.6: not found
[error] unresolved dependency: com.typesafe.play#play-exceptions;2.3.6: not found
[error] unresolved dependency: com.typesafe.play#routes-compiler_2.10;2.3.6: not found
[error] unresolved dependency: com.typesafe.play#sbt-run-support-210_2.10;2.3.6: not found
Project loading failed: (r)etry, (q)uit, (l)ast, or (i)gnore?
这些选项中没有一个看起来有用(我上次尝试过它并没有起作用)。
我该怎么办?谢谢!
答案 0 :(得分:0)
似乎sbt不知道在哪里可以找到编译项目所需的一些库。 您需要将解析器添加到build.sbt:
resolvers ++=
Seq("Typesafe repository" at "http://repo.typesafe.com/typesafe/releases/",
"Typesafe maven releases" at "http://repo.typesafe.com/typesafe/maven-releases/")