2

当我在我的项目中使用 sbt 命令时

$sbt

我所有的插件都没有找到。这是我的项目/plugins.sbt 的内容

addSbtPlugin("com.eed3si9n" % "sbt-assembly" % "0.10.1")

addSbtPlugin("org.xerial.sbt" % "sbt-pack" % "0.3.1")

addSbtPlugin("com.typesafe.sbt" % "sbt-scalariform" % "1.2.1")

addSbtPlugin("com.typesafe.sbt" % "sbt-native-packager" % "0.6.4")

错误如下:

[warn]  ::::::::::::::::::::::::::::::::::::::::::::::
[warn]  ::          UNRESOLVED DEPENDENCIES         ::
[warn]  ::::::::::::::::::::::::::::::::::::::::::::::
[warn]  :: com.eed3si9n#sbt-assembly;0.11.2: not found
[warn]  :: org.xerial.sbt#sbt-pack;0.3.1: not found
[warn]  :: com.typesafe.sbt#sbt-scalariform;1.2.1: not found
[warn]  :: com.typesafe.sbt#sbt-native-packager;0.6.4: not found
[warn]  ::::::::::::::::::::::::::::::::::::::::::::::

看起来我在配置 sbt 或获取我的插件时缺少一个非常基本的步骤。

完整输出:

> tarting sbt: invoke with -help for other options [info] Loading
> project definition from
> /home/vincent/Documents/École/PredictionIO/PredictionIO/project [info]
> Updating
> {file:/home/vincent/Documents/%C3%89cole/PredictionIO/PredictionIO/project/}default-5bb8ef...
> [info] Resolving com.eed3si9n#sbt-assembly;0.11.2 ... [warn]  module
> not found: com.eed3si9n#sbt-assembly;0.11.2 [warn] ====
> typesafe-ivy-releases: tried [warn]  
> http://repo.typesafe.com/typesafe/ivy-releases/com.eed3si9n/sbt-assembly/scala_2.9.1/sbt_0.11.3/0.11.2/ivys/ivy.xml
> [warn] ==== local: tried [warn]  
> /root/.ivy2/local/com.eed3si9n/sbt-assembly/scala_2.9.1/sbt_0.11.3/0.11.2/ivys/ivy.xml
> [warn] ==== public: tried [warn]  
> http://repo1.maven.org/maven2/com/eed3si9n/sbt-assembly_2.9.1_0.11.3/0.11.2/sbt-assembly-0.11.2.pom
> [info] Resolving org.xerial.sbt#sbt-pack;0.3.1 ... [warn]     module not
> found: org.xerial.sbt#sbt-pack;0.3.1 [warn] ====
> typesafe-ivy-releases: tried [warn]  
> http://repo.typesafe.com/typesafe/ivy-releases/org.xerial.sbt/sbt-pack/scala_2.9.1/sbt_0.11.3/0.3.1/ivys/ivy.xml
> [warn] ==== local: tried [warn]  
> /root/.ivy2/local/org.xerial.sbt/sbt-pack/scala_2.9.1/sbt_0.11.3/0.3.1/ivys/ivy.xml
> [warn] ==== public: tried [warn]  
> http://repo1.maven.org/maven2/org/xerial/sbt/sbt-pack_2.9.1_0.11.3/0.3.1/sbt-pack-0.3.1.pom
> [info] Resolving com.typesafe.sbt#sbt-scalariform;1.2.1 ... [warn]
>   module not found: com.typesafe.sbt#sbt-scalariform;1.2.1 [warn] ====
> typesafe-ivy-releases: tried [warn]  
> http://repo.typesafe.com/typesafe/ivy-releases/com.typesafe.sbt/sbt-scalariform/scala_2.9.1/sbt_0.11.3/1.2.1/ivys/ivy.xml
> [warn] ==== local: tried [warn]  
> /root/.ivy2/local/com.typesafe.sbt/sbt-scalariform/scala_2.9.1/sbt_0.11.3/1.2.1/ivys/ivy.xml
> [warn] ==== public: tried [warn]  
> http://repo1.maven.org/maven2/com/typesafe/sbt/sbt-scalariform_2.9.1_0.11.3/1.2.1/sbt-scalariform-1.2.1.pom
> [info] Resolving com.typesafe.sbt#sbt-native-packager;0.6.4 ... [warn]
>   module not found: com.typesafe.sbt#sbt-native-packager;0.6.4 [warn]
> ==== typesafe-ivy-releases: tried [warn]   http://repo.typesafe.com/typesafe/ivy-releases/com.typesafe.sbt/sbt-native-packager/scala_2.9.1/sbt_0.11.3/0.6.4/ivys/ivy.xml
> [warn] ==== local: tried [warn]  
> /root/.ivy2/local/com.typesafe.sbt/sbt-native-packager/scala_2.9.1/sbt_0.11.3/0.6.4/ivys/ivy.xml
> [warn] ==== public: tried [warn]  
> http://repo1.maven.org/maven2/com/typesafe/sbt/sbt-native-packager_2.9.1_0.11.3/0.6.4/sbt-native-packager-0.6.4.pom
> [info] Resolving org.scala-sbt#sbt_2.9.1;0.11.3 ... [info] Resolving
> org.scala-sbt#main_2.9.1;0.11.3 ... [info] Resolving
> org.scala-sbt#actions_2.9.1;0.11.3 ... [info] Resolving
> org.scala-sbt#classfile_2.9.1;0.11.3 ... [info] Resolving
> org.scala-sbt#io_2.9.1;0.11.3 ... [info] Resolving
> org.scala-sbt#control_2.9.1;0.11.3 ... [info] Resolving
> org.scala-lang#scala-library;2.9.1 ... [info] Resolving
> org.scala-sbt#interface;0.11.3 ... [info] Resolving
> org.scala-sbt#logging_2.9.1;0.11.3 ... [info] Resolving
> org.scala-sbt#process_2.9.1;0.11.3 ... [info] Resolving
> org.scala-sbt#classpath_2.9.1;0.11.3 ... [info] Resolving
> org.scala-sbt#launcher-interface_2.9.1;0.11.3 ... [info] Resolving
> org.scala-lang#scala-compiler;2.9.1 ... [info] Resolving
> org.scala-sbt#incremental-compiler_2.9.1;0.11.3 ... [info] Resolving
> org.scala-sbt#collections_2.9.1;0.11.3 ... [info] Resolving
> org.scala-sbt#api_2.9.1;0.11.3 ... [info] Resolving
> org.scala-sbt#persist_2.9.1;0.11.3 ... [info] Resolving
> org.scala-tools.sbinary#sbinary_2.9.0;0.4.0 ... [info] Resolving
> org.scala-sbt#compile_2.9.1;0.11.3 ... [info] Resolving
> org.scala-sbt#ivy_2.9.1;0.11.3 ... [info] Resolving
> org.apache.ivy#ivy;2.2.0 ... [info] Resolving com.jcraft#jsch;0.1.46
> ... [info] Resolving commons-httpclient#commons-httpclient;3.1 ...
> [info] Resolving commons-logging#commons-logging;1.0.4 ... [info]
> Resolving commons-codec#commons-codec;1.2 ... [info] Resolving
> org.scala-sbt#completion_2.9.1;0.11.3 ... [info] Resolving
> jline#jline;0.9.94 ... [info] Resolving org.scala-sbt#run_2.9.1;0.11.3
> ... [info] Resolving org.scala-sbt#task-system_2.9.1;0.11.3 ... [info]
> Resolving org.scala-sbt#tasks_2.9.1;0.11.3 ... [info] Resolving
> org.scala-sbt#tracking_2.9.1;0.11.3 ... [info] Resolving
> org.scala-sbt#cache_2.9.1;0.11.3 ... [info] Resolving
> org.scala-sbt#testing_2.9.1;0.11.3 ... [info] Resolving
> org.scala-tools.testing#test-interface;0.5 ... [info] Resolving
> org.scala-sbt#compiler-interface;0.11.3 ... [info] Resolving
> org.scala-sbt#precompiled-2_8_2;0.11.3 ... [info] Resolving
> org.scala-sbt#precompiled-2_8_1;0.11.3 ... [info] Resolving
> org.scala-sbt#precompiled-2_9_2;0.11.3 ... [warn]
>   :::::::::::::::::::::::::::::::::::::::::::::: [warn]   ::         
> UNRESOLVED DEPENDENCIES         :: [warn]
>   :::::::::::::::::::::::::::::::::::::::::::::: [warn]   ::
> com.eed3si9n#sbt-assembly;0.11.2: not found [warn]    ::
> org.xerial.sbt#sbt-pack;0.3.1: not found [warn]   ::
> com.typesafe.sbt#sbt-scalariform;1.2.1: not found [warn]  ::
> com.typesafe.sbt#sbt-native-packager;0.6.4: not found [warn]
>   :::::::::::::::::::::::::::::::::::::::::::::: [warn]  [warn]   Note:
> Some unresolved dependencies have extra attributes.  Check that these
> dependencies exist with the requested attributes. [warn]
>       com.eed3si9n:sbt-assembly:0.11.2 (sbtVersion=0.11.3,
> scalaVersion=2.9.1) [warn]        org.xerial.sbt:sbt-pack:0.3.1
> (sbtVersion=0.11.3, scalaVersion=2.9.1) [warn]
>       com.typesafe.sbt:sbt-scalariform:1.2.1 (sbtVersion=0.11.3,
> scalaVersion=2.9.1) [warn]
>       com.typesafe.sbt:sbt-native-packager:0.6.4 (sbtVersion=0.11.3,
> scalaVersion=2.9.1) [warn]  [error]
> {file:/home/vincent/Documents/%C3%89cole/PredictionIO/PredictionIO/project/}default-5bb8ef/*:update:
> sbt.ResolveException: unresolved dependency:
> com.eed3si9n#sbt-assembly;0.11.2: not found [error] unresolved
> dependency: org.xerial.sbt#sbt-pack;0.3.1: not found [error]
> unresolved dependency: com.typesafe.sbt#sbt-scalariform;1.2.1: not
> found [error] unresolved dependency:
> com.typesafe.sbt#sbt-native-packager;0.6.4: not found Project loading
> failed: (r)etry, (q)uit, (l)ast, or (i)gnore? i [warn] Ignoring load
> failure: no project loaded.
4

1 回答 1

0

我的 sbt 版本是 sbt 0.11.3。这是我第一个使用 sbt 的项目。

前往scala-sbt.org找到最新的稳定版本(截至 2014 年 4 月,它是 0.13.2)。

如果由于某种原因您必须使用 sbt 0.11.3,您可以尝试以下插件版本:

addSbtPlugin("com.eed3si9n" % "sbt-assembly" % "0.8.7")

addSbtPlugin("com.typesafe.sbt" % "sbt-scalariform" % "1.0.0")

我找不到 sbt 0.11.3 的其他插件。不确定它们当时是否存在。

于 2014-04-23T04:17:45.840 回答