简单构建工具:我如何知道哪些版本的 Scala 和依赖项可用?
我对简单构建工具完全陌生,所以请原谅我的初学者问题。
我正在尝试设置 SBT(版本 0.10.1)来编译我的 Scala 项目。我让大多数东西都运行起来,甚至更改了一些设置以适应我的目录结构等。所有这一切中最痛苦的部分是设置 Scala 和我使用的每个库的确切版本。例如(来自我的 build.sbt
文件):
scalaVersion := "2.9.0-1"
libraryDependencies += "org.scalatest" % "scalatest_2.9.0" % "1.6.1"
我到底如何知道 Scala 版本必须是“2.9.0-1”而不是“2.9.0.1”?有什么办法可以请求所有可用版本吗? (我想整个事情的工作方式或多或少就像 Linux 发行版中的存储库,对吧?)。当然,如果知道这些存储库中还存在其他内容,那就太好了。
所以总而言之,我的问题是:如何请求 SBT 使用的存储库的内容?
I'm completely new to Simple Build Tool, so please pardon my beginner question.
I'm trying to setup SBT (version 0.10.1) to compile my Scala project. I got most things running and even changed some settings to fit my directory structure, etc. The most painful part in all of this was setting the exact versions of Scala and every library I use. For example (from my build.sbt
file):
scalaVersion := "2.9.0-1"
libraryDependencies += "org.scalatest" % "scalatest_2.9.0" % "1.6.1"
How in the world am I supposed to know that Scala version must be "2.9.0-1" and not "2.9.0.1"? Is there any way to request all versions available? (I imagine the whole thing works more or less like repositories in Linux distributions, right?). Off course, it would also be very nice to know what else lives in those repositories.
So in conlusion, my question is this: How do I request the contents of the repositories used by SBT?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
要了解有哪些 Scala 版本可用,您可以查看
Scala 释放 Maven 存储库。
所以你提到的版本位于:
http://main.scala-tools.org/repo-releases/org/scala-lang/scala-compiler/2.9.0-1/
http://main.scala-tools.org/repo-releases/org/scala-lang/scala-library/2.9.0-1/
你的依赖项支持什么Scala版本可以用类似的方式回答。在 Maven 存储库中,Scala 库可以在名称中使用 Scala 版本,例如 Scalatest 库如下所示:
1.6.1 版本仅适用于 Scala 2.9.0 和 1.5.1 仅适用于 2.8.1。 但我不知道版本之间的兼容性,2.8.1库是否可以与2.9.0一起使用
to know what Scala Versions are available you can take a look at the
Scala Realeases Maven Repository.
So your mentioned version is under:
h t t p://main.scala-tools.org/repo-releases/org/scala-lang/scala-compiler/2.9.0-1/
h t t p://main.scala-tools.org/repo-releases/org/scala-lang/scala-library/2.9.0-1/
What Scala version your dependencies support can be answered in a similar way. In the Maven repository a Scala library can use the Scala version in the name, e.g. the Scalatest library looks like this:
The 1.6.1 version in only available for Scala 2.9.0 and 1.5.1 only for 2.8.1. But I do not know about the compatibility between the versions, if a 2.8.1 library can be used with 2.9.0