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
我做错了什么?
答案 0 :(得分:2)
对于scala 2.10,你必须使用sbt 0.13。我试过用sbt 0.13
在浏览器链接中打开: http://dl.bintray.com/sbt/sbt-plugin-releases/me.lessis/np/scala_2.10/
只有:
sbt_0.13/
对于scala 2.9.2,您需要使用sbt 0.12
==========================
<强>更新强>
sbt test
或其他命令答案 1 :(得分:2)
使用.sbt/0.13/plugins/plugins.sbt
(请注意路径中的 0.13 / plugins )或者更好地快速扫描已安装的插件,使用.sbt/0.13/plugins/np.sbt
以便从文件名中清楚地看到(s)关于插件。
请注意,从问题看来,您使用的是SBT 0.12 :
me.lessis:np:0.2.0(sbtVersion = 0.12,scalaVersion = 2.10)
使用以下行在project/build.properties
下添加helloSbt
以使 0.13 正在使用中:
sbt.version=0.13.1