Scala 2.10.2和SBT 0.13
我正在尝试使用np插件,并在../0.13/np.sbt中添加了以下行
seq(npSettings:_*)
(NpKeys.defaults in (Compile, NpKeys.np)) ~= {
_.copy(org="me.lessis", version="0.1.0-SNAPSHOT")
}这是给<home-directory>/.sbt/plugins.sbt的
addSbtPlugin("me.lessis" % "np" % "0.2.0")
resolvers += Resolver.url("sbt-plugin-releases",url("http://scalasbt.artifactoryonline.com/scalasbt/sbt-plugin-releases/"))(Resolver.ivyStylePatterns)当我执行sbt run时,我得到:
[info] Updating {file:/home/Projects/helloSbt/}default-310e5b...
[info] Resolving me.lessis#np;0.2.0 ...
[warn] module not found: me.lessis#np;0.2.0
[warn] ==== local: tried
[warn] /home/.ivy2/local/me.lessis/np/scala_2.10/sbt_0.12/0.2.0/ivys/ivy.xml
[warn] ==== sbt-plugin-releases: tried
[warn] http://scalasbt.artifactoryonline.com/scalasbt/sbt-plugin-releases/me.lessis/np/scala_2.10/sbt_0.12/0.2.0/ivys/ivy.xml
[warn] ==== public: tried
[warn] http://repo1.maven.org/maven2/me/lessis/np_2.10_0.12/0.2.0/np-0.2.0.pom
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn] :: UNRESOLVED DEPENDENCIES ::
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn] :: me.lessis#np;0.2.0: not found
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn]
[warn] Note: Some unresolved dependencies have extra attributes. Check that these dependencies exist with the requested attributes.
[warn] me.lessis:np:0.2.0 (sbtVersion=0.12, scalaVersion=2.10)
[warn]
[trace] Stack trace suppressed: run last *:update for the full output.
[error] (*:update) sbt.ResolveException: unresolved dependency: me.lessis#np;0.2.0: not found
[error] Total time: 3 s, completed Feb 6, 2014 9:23:17 AM我做错什么了?
发布于 2014-02-06 08:03:02
对于Scala2.10,您必须使用SBT0.13。我试过用sbt 0.13
打开浏览器链接:2.10/
只有:
sbt_0.13/
对于Scala2.9.2,您需要使用SBT0.12
==========================
更新:
sbt test或其他命令发布于 2014-02-06 14:35:38
使用.sbt/0.13/plugins/plugins.sbt (请注意路径中的0.13/ plugins ),或者更好地快速扫描安装的插件,使用.sbt/0.13/plugins/np.sbt,这样就可以从文件名中清楚地看到插件。
还请注意,从问题中可以看出,您使用的是SBT 0.12
方法:np:0.2.0 (sbtVersion=0.12,scalaVersion=2.10)
将project/build.properties添加到helloSbt下面,并在下面一行中使用0.13:
sbt.version=0.13.1https://stackoverflow.com/questions/21596915
复制相似问题