scala工程创建

akka和scala学习。

都推荐使用sbt来进行管理。

sbt是一个类似maven的scala工具。

在项目目录下创建文件: build.sbt

至少要包含以下内容:

name := "hello"

version := "1.0"

scalaVersion := "2.10.3"

运行sbt,会自动在该目录下创建project文件夹:

在project文件夹下创建文件: plugins.sbt

addSbtPlugin("com.typesafe.sbteclipse" % "sbteclipse-plugin" % "2.4.0")

重新运行sbt.

输入:eclipse

会自动将项目转为eclipse项目。

可以使用eclipse中的import功能导入项目,并且项目目录已经自动创建好了。

如果要改为akka项目,在build.sbt中添加以下两行:

resolvers += "Typesafe Repository" at "http://search.maven.org/"

libraryDependencies += "com.typesafe.akka" % "akka-actor_2.10" % "2.3.0"
发表评论?

0 条评论。

发表评论


注意 - 你可以用以下 HTML tags and attributes:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>


Warning: Use of undefined constant XML - assumed 'XML' (this will throw an Error in a future version of PHP) in /opt/wordpress/wp-content/plugins/wp-syntaxhighlighter/wp-syntaxhighlighter.php on line 1048