我想建立 Akka 项目。
所以,我在项目的根文件夹中创建了build.sbt 文件,如下所示:
name := "Akka Sample"
version := "1.0"
scalaVersion := "2.10.1"
resolvers += "Typesafe Repository" at "http://repo.typesafe.com/typesafe/releases/"
libraryDependencies += "com.typesafe.akka" %% "akka-actor" % "2.2-SNAPSHOT"
并在控制台线上输入。
结果是
C:\scala\work\AkkaSample>sbt update
C:\scala\work\AkkaSample>set SCRIPT_DIR=C:\sbt\
C:\scala\work\AkkaSample>java -Xmx512M -jar "C:\sbt\sbt-launch.jar" update
[info] Building project AkkaSamples 1.0 against Scala 2.9.0
[info] using sbt.DefaultProject with sbt 0.7.7 and Scala 2.7.7
[info]
[info] == update ==
[warn] No dependency configuration found, using defaults.
[info] :: retrieving :: com.dohyeon#akkasamples_2.9.0 [sync]
[info] confs: [default]
[info] 0 artifacts copied, 0 already retrieved (0kB/51ms)
[info] == update ==
[success] Successful.
[info]
[info] Total time: 1 s, completed 2013. 6. 13 오후 6:30:51
[info]
[info] Total session time: 1 s, completed 2013. 6. 13 오후 6:30:51
[success] Build completed successfully.
您可能注意到我将 scalaVersion 设置为 2.10.1,但 sbt 构建了 Sacla 2.9.0
似乎 sbt 工具无法正常工作。
我试图找到一个解决方案,但由于我不是以英语为母语的人,而且我不熟悉英语,所以我找不到解决方案......
求解答,谢谢。
祝你今天过得愉快!