7

这个过程过去在 0.11.2 中运行良好,但最近对 sbt 组 ID 的更改更改为 org.scala-sbt(来自 org.scala-tools.sbt)似乎打破了依赖关系。

我有一台 10.04 LTS 机器,我使用 deb 包文件向其中添加了 Typesafe deb 存储库,如下所述:https ://github.com/harrah/xsbt/wiki/Getting-Started-Setup 。

当我尝试从 repo 安装时,我得到:

[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn] :: UNRESOLVED DEPENDENCIES ::
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn] :: org.scala-tools.sbt#scripted-plugin_2.9.1;0.11.3: not found
[warn] ::::::::::::::::::::::::::::::::::::::::::::::

[warn] module not found: org.scala-tools.sbt#scripted-plugin_2.9.1;0.11.3
[warn] ==== typesafe-ivy-releases: tried
[warn] http://repo.typesafe.com/typesafe/ivy-releases/org.scala-tools.sbt/scripted-plugin_2.9.1/0.11.3/ivys/ivy.xml
[warn] ==== local: tried
[warn] /home/jasonmaclulich/.ivy2/local/org.scala-tools.sbt/scripted-plugin_2.9.1/0.11.3/ivys/ivy.xml
[warn] ==== Typesafe Repo: tried
[warn] http://repo.typesafe.com/typesafe/ivy-releases/org.scala-tools.sbt/scripted- plugin_2.9.1/0.11.3/ivys/ivy.xml
[warn] ==== public: tried
[warn] http://repo1.maven.org/maven2/org/scala-tools/sbt/scripted-plugin_2.9.1/0.11.3/scripted-plugin_2.9.1-0.11.3.pom

如何指示 sbt 在正确的组 id 处查找脚本插件?

我还尝试使用此启动器进行手动安装(遵循 UNIX 安装说明):

//typesafe.artifactoryonline.com/typesafe/ivy-releases/org.scala-sbt/sbt-launch/0.11.3-2/sbt-launch.jar

而且我仍然得到以下未解决的依赖项:

[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn] :: UNRESOLVED DEPENDENCIES ::
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn] :: org.scala-tools.sbt#scripted-plugin_2.9.1;0.11.3: not found
[warn] ::::::::::::::::::::::::::::::::::::::::::::::

想法?

谢谢,杰森。

4

3 回答 3

2

如果我在我的 project/build.properties 文件中将 sbt 的版本明确设置为 0.11.2,我想我会用我的解决方法来更新它,即sbt.version=0.11.2.

Detected sbt version 0.11.2
Cannot find sbt launcher 0.11.2
Please download: 
  From  http://typesafe.artifactoryonline.com/typesafe/ivy-releases/org.scala-tools.sbt/sbt-launch/0.11.2/sbt-launch.jar
     To  /home/<username>/.sbt/.lib/0.11.2/sbt-launch.jar

然后我安装了所需的文件,并且能够像以前一样继续编译。

虽然这不是一个直接的解决方案,但它确实让我继续工作。

于 2012-06-14T07:13:43.910 回答
0

By now, sbt-0.11.3-build-0100 is available (http://apt.typesafe.com/pool/pool/main/s/sbt/), so you should be able to simply upgrade to solve your problem. If that doesn't work or if you're curious about the original problem, here's my diagnosis.

As you tried to do, you do need to use a new launcher for SBT 0.11.3 to use the new group ID, org.scala-sbt. Your second error message still shows a failure which refers to org.scala-tools.sbt - that's bad, and suggests you're in fact still using the old launcher.

Could you make sure that when you're launching sbt, you're launching the script you created and not the one from the Debian package? Please try using the full path for launching sbt, for instance ~/bin/sbt.

If that helps, you should fix the PATH so that ~/bin (or wherever you installed your script) comes before the directory where the system SBT is installed, which (I would say, but it's a matter of opinion) is generally useful.

于 2012-06-30T00:50:36.710 回答
0

我已经在 Ubuntu 上成功安装了最新的 SBT,但间接地,通过安装 Typesafe Stack。

于 2012-06-12T04:18:14.550 回答