3

我已经阅读了所有类似的问题,但这些建议都没有解决我的问题。也许我无法看到它。

问题是我有 project/plugins.sbt 并且当我尝试添加例如

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

它给了我

[error] (*:update) sbt.ResolveException: 
unresolved dependency: com.eed3si9n#sbt-assembly;0.11.2: not found

然后我添加

resolvers += "sonatype-releases" at "https://oss.sonatype.org/content/repositories/releases/"

但错误是一样的

我的 sbt 版本是

sbt launcher version 0.13.8

和斯卡拉版本是

Scala code runner version 2.11.6 -- Copyright 2002-2013, LAMP/EPFL

也许有人可以为我指出正确的方向。提前致谢。

编辑:当我把

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

到 project/assembly.sbt 我得到了同样的错误

实际上我不认为错误是针对 sbt-assembly 当我尝试添加其他插件时它给出了同样的错误

[info] Resolving com.eed3si9n#sbt-assembly;0.13.0 ...
[warn]  module not found: com.eed3si9n#sbt-assembly;0.13.0
[warn] ==== local: tried
[warn]   .ivy2/local/com.eed3si9n/sbt-assembly/scala_2.11/sbt_0.13/0.13.0/ivys/ivy.xml
[warn] ==== public: tried
[warn]   https://repo1.maven.org/maven2/com/eed3si9n/sbt-assembly_2.11_0.13/0.13.0/sbt-assembly-0.13.0.pom
[warn] ==== Typesafe Repository: tried
[warn]   http://repo.typesafe.com/typesafe/releases/com/eed3si9n/sbt-assembly_2.11_0.13/0.13.0/sbt-assembly-0.13.0.pom
[info] Resolving jline#jline;2.12.1 ...
[warn]  ::::::::::::::::::::::::::::::::::::::::::::::
[warn]  ::          UNRESOLVED DEPENDENCIES         ::
[warn]  ::::::::::::::::::::::::::::::::::::::::::::::
[warn]  :: com.eed3si9n#sbt-assembly;0.13.0: 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.13.0 (sbtVersion=0.13, scalaVersion=2.11)
[warn] 
[warn]  Note: Unresolved dependencies path:
[warn]      com.eed3si9n:sbt-assembly:0.13.0 (sbtVersion=0.13, scalaVersion=2.11) (assembly.sbt#L2-3)
1.0

编辑

好吧,对于像我这样粗心的其他人来说,它说的所有文档都像 project/plugins.sbt 或 project/assembly.sbt 等...实际上我认为“项目”应该是应用程序的项目文件夹,但它是[your_project_name]/project :( 所以所有提到的 conf 都应该放在那个目录中。

非常感谢回复。。

4

2 回答 2

0

sbt 组装

对于 sbt 0.13.6+ 添加 sbt-assembly 作为依赖项 project/assembly.sbt

addSbtPlugin("com.eed3si9n" % "sbt-assembly" % "0.13.0")
于 2015-06-09T20:02:26.393 回答
0

也许问题出在您要使用的插件版本上?

尝试这个:

addSbtPlugin("com.eed3si9n" % "sbt-assembly" % "0.13.0")
于 2015-06-09T20:07:11.940 回答