Sbt-assembly 未解决的依赖关系,Scala
Sbt-assembly unresolved dependency, Scala
我正在安装 Sbt-Assembly,但现在卡住了。
Sbt Version (from 'sbt about'): 0.13.8
Current project is built against scala 2.11.6
Sbt, sbt plugins, and build definitions are using Scala 2.10.4
project/assembly.sbt
addSbtPlugin("com.eed3si9n" % "sbt-assembly" % "0.14.0")
resolvers += Resolver.url("bintray-sbt-plugins", url("http://dl.bintray.com/sbt/sbt-plugin-releases"))(Resolver.ivyStylePatterns)
build.sbt
scalaVersion in ThisBuild := "2.11.6"
~/.sbt/0.13/global.sbt
scalaVersion := "2.11.6"
我知道 sbt-assembly 适用于 scala 2.10。如果我将我的项目更改为 scala 2.10,我将有新的不可用的 2.10 依赖项,这是不可取的。有没有办法将我的项目配置为仅将 2.10 用于程序集插件?
==== bintray-sbt-plugins: tried
http://dl.bintray.com/sbt/sbt-plugin-releases/com.eed3si9n/sbt-assembly/scala_2.11/sbt_0.13/0.14.0/ivys/ivy.xml
::::::::::::::::::::::::::::::::::::::::::::::
:: UNRESOLVED DEPENDENCIES ::
::::::::::::::::::::::::::::::::::::::::::::::
:: com.eed3si9n#sbt-assembly;0.14.0: not found
::::::::::::::::::::::::::::::::::::::::::::::
Note: Some unresolved dependencies have extra attributes.
Check that these dependencies exist with the requested attributes.
com.eed3si9n:sbt-assembly:0.14.0 (scalaVersion=2.11, sbtVersion=0.13)
只需从 global.sbt
中删除 scalaVersion
。
因为 SBT is recursive 它在构建构建文件时使用了 global.sbt
中的这个 scalaVersion
,这失败了,因为 SBT 0.13 是用 Scala 2.10 构建的,所有 SBT 插件也是如此。
我有一个类似的问题,有用的是将 addSbtPlugin("com.eed3si9n" % "sbt-assembly" % "0.14.3")
添加到 project/plugins.sbt
而不是我项目根目录中的 plugins.sbt
。
我有类似的错误。更改 sbt-assembly 版本(从 0.14.3 到 0.14.5)有效。我的 sbt 版本是 1.0.3,我用过:
addSbtPlugin("com.eed3si9n" % "sbt-assembly" % "0.14.5")
根本不要使用 sbt-assembly! :) Flat-jars 在合并期间会导致冲突,需要使用 assemblyMergeStrategy 解决。
使用 sbt 提供的 binary distribution 格式插件,它使您能够以二进制脚本、dmg、msi 和 tar.gz.
进行分发
我正在安装 Sbt-Assembly,但现在卡住了。
Sbt Version (from 'sbt about'): 0.13.8
Current project is built against scala 2.11.6
Sbt, sbt plugins, and build definitions are using Scala 2.10.4
project/assembly.sbt
addSbtPlugin("com.eed3si9n" % "sbt-assembly" % "0.14.0")
resolvers += Resolver.url("bintray-sbt-plugins", url("http://dl.bintray.com/sbt/sbt-plugin-releases"))(Resolver.ivyStylePatterns)
build.sbt
scalaVersion in ThisBuild := "2.11.6"
~/.sbt/0.13/global.sbt
scalaVersion := "2.11.6"
我知道 sbt-assembly 适用于 scala 2.10。如果我将我的项目更改为 scala 2.10,我将有新的不可用的 2.10 依赖项,这是不可取的。有没有办法将我的项目配置为仅将 2.10 用于程序集插件?
==== bintray-sbt-plugins: tried
http://dl.bintray.com/sbt/sbt-plugin-releases/com.eed3si9n/sbt-assembly/scala_2.11/sbt_0.13/0.14.0/ivys/ivy.xml
::::::::::::::::::::::::::::::::::::::::::::::
:: UNRESOLVED DEPENDENCIES ::
::::::::::::::::::::::::::::::::::::::::::::::
:: com.eed3si9n#sbt-assembly;0.14.0: not found
::::::::::::::::::::::::::::::::::::::::::::::
Note: Some unresolved dependencies have extra attributes.
Check that these dependencies exist with the requested attributes.
com.eed3si9n:sbt-assembly:0.14.0 (scalaVersion=2.11, sbtVersion=0.13)
只需从 global.sbt
中删除 scalaVersion
。
因为 SBT is recursive 它在构建构建文件时使用了 global.sbt
中的这个 scalaVersion
,这失败了,因为 SBT 0.13 是用 Scala 2.10 构建的,所有 SBT 插件也是如此。
我有一个类似的问题,有用的是将 addSbtPlugin("com.eed3si9n" % "sbt-assembly" % "0.14.3")
添加到 project/plugins.sbt
而不是我项目根目录中的 plugins.sbt
。
我有类似的错误。更改 sbt-assembly 版本(从 0.14.3 到 0.14.5)有效。我的 sbt 版本是 1.0.3,我用过: addSbtPlugin("com.eed3si9n" % "sbt-assembly" % "0.14.5")
根本不要使用 sbt-assembly! :) Flat-jars 在合并期间会导致冲突,需要使用 assemblyMergeStrategy 解决。 使用 sbt 提供的 binary distribution 格式插件,它使您能够以二进制脚本、dmg、msi 和 tar.gz.
进行分发