如何用sbt新建akka项目

 2023-09-05 阅读 31 评论 0

摘要:新建文件夹 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&

新建文件夹

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一样的项目组织结构)

版权声明:本站所有资料均为网友推荐收集整理而来,仅供学习和研究交流使用。

原文链接:https://hbdhgg.com/1/1267.html

发表评论:

本站为非赢利网站,部分文章来源或改编自互联网及其他公众平台,主要目的在于分享信息,版权归原作者所有,内容仅供读者参考,如有侵权请联系我们删除!

Copyright © 2022 匯編語言學習筆記 Inc. 保留所有权利。

底部版权信息