com.eed3si9n#sbt-assembly;0.13.0 的 libraryDependencies: 未找到 [英] libraryDependencies for com.eed3si9n#sbt-assembly;0.13.0: not found
问题描述
我正在构建一个 sbt 插件并希望在 sbt-assembly 插件中引用程序集任务(取决于我的任务)
I am building a sbt plugin and want to reference assembly task in the sbt-assembly plugin ( to be dependent on my task)
要做到这一点,我需要将它引用为一个库(而不是一个插件),但不知何故 sbt 无法将其解析为 libraryDepdendencies
to do this i need to reference it as a library ( as opposed to a plugin), and somehow sbt is not able to resolve it as a libraryDepdendencies
这就是我的 sbt 的样子
this is what my sbt looks like
sbtPlugin := true
name := "my-sbt-plugin"
scalaVersion := "2.10.6"
sbtVersion := "0.13.0"
resolvers ++= Seq(Resolver.sbtPluginRepo("releases"), Resolver.sbtPluginRepo("snapshots"))
libraryDependencies ++= Seq(
"com.eed3si9n" % "sbt-assembly" % "0.13.0")
输出看起来像
Resolving com.eed3si9n#sbt-assembly;0.13.0 ...
[warn] module not found: com.eed3si9n#sbt-assembly;0.13.0
[warn] ==== typesafe-ivy-releases: tried
[warn] https://repo.typesafe.com/typesafe/ivy-releases/com.eed3si9n/sbt-assembly/0.13.0/ivys/ivy.xml
[warn] ==== sbt-plugin-releases: tried
[warn] https://repo.scala-sbt.org/scalasbt/sbt-plugin-releases/com.eed3si9n/sbt-assembly/0.13.0/ivys/ivy.xml
[warn] ==== local: tried
[warn] /Users/myuser/.ivy2/local/com.eed3si9n/sbt-assembly/0.13.0/ivys/ivy.xml
[warn] ==== public: tried
[warn] https://repo1.maven.org/maven2/com/eed3si9n/sbt-assembly/0.13.0/sbt-assembly-0.13.0.pom
[warn] ==== sbt-plugin-releases: tried
[warn] https://repo.scala-sbt.org/scalasbt/sbt-plugin-releases/com.eed3si9n/sbt-assembly/0.13.0/ivys/ivy.xml
[warn] ==== sbt-plugin-snapshots: tried
[warn] https://repo.scala-sbt.org/scalasbt/sbt-plugin-snapshots/com.eed3si9n/sbt-assembly/0.13.0/ivys/ivy.xml
[info] Resolving org.fusesource.jansi#jansi;1.4 ...
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn] :: UNRESOLVED DEPENDENCIES ::
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn] :: com.eed3si9n#sbt-assembly;0.13.0: not found
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
推荐答案
无法解决,因为您没有指定 Scala 版本.它应该是这样的:
It is not resolving because you did not specify a scala version. It should be something like:
libraryDependencies ++= Seq(
"com.eed3si9n" % "sbt-assembly_2.11" % "0.13.0"
)
或者,自动获取项目中使用的scala版本:
Or, to automatically get the scala version used in project:
libraryDependencies ++= Seq(
// notice the double %% here
"com.eed3si9n" %% "sbt-assembly" % "0.13.0"
)
但是,sbt-assembly 不应该这样安装.文档显示您必须将以下行添加到您的项目/插件中.sbt
代替:
But, sbt-assembly is not supposed to be installed that way. The docs show that you must add the following line to your project/plugins.sbt
instead:
addSbtPlugin("com.eed3si9n" % "sbt-assembly" % "0.14.2")
<小时>
如果开发 sbt 插件,addSbtPlugin
行必须直接进入 ./build.sbt
.
这篇关于com.eed3si9n#sbt-assembly;0.13.0 的 libraryDependencies: 未找到的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!