1

新建文件夹

mkdir akkademo
sbt
set name := “akkademo”
set version := “1.0”
set scalaVersion := “2.10.2”
session save
exit

设置build.sbt

vim build.sbt
libraryDependencies ++= Seq(
  "com.typesafe.akka" %% "akka-actor" % "2.2.1",
  "com.typesafe.akka" %% "akka-testkit" % "2.2.1",
  "org.scalatest" %% "scalatest" % "1.9.1" % "test",
  "junit" % "junit" % "4.11" % "test",
  "com.novocode" % "junit-interface" % "0.10" % "test"
)
testOptions += Tests.Argument(TestFrameworks.JUnit, "-v”)

设置plugins.sbt

cd project
vim plugins.sbt
addSbtPlugin("com.github.mpeltonen" % "sbt-idea" % "1.5.2”)
addSbtPlugin("com.typesafe.sbteclipse" % "sbteclipse-plugin" % "2.4.0”)

生成idea或eclipse支持

sbt gen-idea
sbt eclipse  (得有eclipse才能生成maven一样的项目组织结构)

codecraft
11.9k 声望2k 粉丝

当一个代码的工匠回首往事时,不因虚度年华而悔恨,也不因碌碌无为而羞愧,这样,当他老的时候,可以很自豪告诉世人,我曾经将代码注入生命去打造互联网的浪潮之巅,那是个很疯狂的时代,我在一波波的浪潮上留下...


引用和评论

0 条评论