向我的项目添加addSbtPlugin(“org.xerial.sbt”%”sbt sonatype“%”1.1)失败,出现“未解决的依赖项”
我正在尝试将我的邮件发布到mvnrepository。我将按照以下链接的说明进行操作: ,及 将xerial sbt sonatype插件添加到build.sbt文件时: 编译器给了我以下错误:向我的项目添加addSbtPlugin(“org.xerial.sbt”%”sbt sonatype“%”1.1)失败,出现“未解决的依赖项”,sbt,sonatype,Sbt,Sonatype,我正在尝试将我的邮件发布到mvnrepository。我将按照以下链接的说明进行操作: ,及 将xerial sbt sonatype插件添加到build.sbt文件时: 编译器给了我以下错误: UNRESOLVED DEPENDENCIES org.xerial.sbt#sbt-sonatype;1.1 not found Note: Some unresolved dependencies have extra attributes. Check that these depende
UNRESOLVED DEPENDENCIES
org.xerial.sbt#sbt-sonatype;1.1 not found
Note: Some unresolved dependencies have extra attributes. Check that these dependencies exist with the requested attributes.
[warn] org.xerial.sbt:sbt-sonatype:1.1 (scalaVersion=2.11, sbtVersion=0.13)
[warn]
[warn] Note: Unresolved dependencies path:
[warn] org.xerial.sbt:sbt-sonatype:1.1 (scalaVersion=2.11, sbtVersion=0.13) (/richstat/build.sbt#L56-57)
[warn] +- com.github.shafiquejamal:richstat_2.11:0.0.1
我的SBT版本是0.13,我使用的是Scala 2.11。我怎样才能解决这个问题?谢谢 您必须在project/plugins.sbt中添加插件,因为插件是元项目的依赖项,而不是您的库/应用程序 检查sbt文档: 同样关于sbt版本和Scala版本:在您的案例中,Scala版本用于编译项目代码2.11,而sbt本身也使用Scala版本。后者由sbt版本决定:sbt-0.13使用Scala 2.10,sbt-1.0使用Scala 2.12
另外,我建议您更新到sbt-1.0.2:只需在project/build.properties中更改版本并使用sbt sonatype 2.0。顺便说一句,我现在看到您遵循了参考说明,我想他们只是提交了一个打字错误。谢谢-这很有效。是的,我完全按照指示去做。此链接:https://github.com/xerial/sbt-sonatype 实际上具有插件的正确路径。此外,addSbtPluginorg.xerial.sbt%sbt sonatype%1.1应改为addSbtPluginorg.xerial.sbt%sbt sonatype%2.3或2.1或2.2-可在此处找到版本列表:
UNRESOLVED DEPENDENCIES
org.xerial.sbt#sbt-sonatype;1.1 not found
Note: Some unresolved dependencies have extra attributes. Check that these dependencies exist with the requested attributes.
[warn] org.xerial.sbt:sbt-sonatype:1.1 (scalaVersion=2.11, sbtVersion=0.13)
[warn]
[warn] Note: Unresolved dependencies path:
[warn] org.xerial.sbt:sbt-sonatype:1.1 (scalaVersion=2.11, sbtVersion=0.13) (/richstat/build.sbt#L56-57)
[warn] +- com.github.shafiquejamal:richstat_2.11:0.0.1