用sbt创建eclipseIDE项目

来源:互联网 发布:淘宝一元秒杀网 编辑:程序博客网 时间:2024/04/29 02:37
分为两个步骤:
  1. 手工建立build.sbt,用sbt compile建立sbt项目;
  2. 手工建立 .\project\plugins.sbt,用sbt eclipse建立eclipse项目
  3. 手工建立 .\project\assembly.sbt
eclipseIDE下导入文件类项目
具体文件如下:
1. build.sbt
name := "amtf"

version := "1.0"

scalaVersion := "2.11.1"

scalacOptions += "-deprecation"

libraryDependencies <+= (scalaVersion)("org.scala-lang" % "scala-compiler" % _)

resolvers := Seq(
"Typesafe Releases" at "http://repo.typesafe.com/typesafe/maven-releases/",
"Unidata Repository" at "https://artifacts.unidata.ucar.edu/content/repositories/unidata-releases",
MavenRepository("geotools","http://download.osgeo.org/webdav/geotools"),
"nscala-time" at "http://mvnrepository.com/artifact/com.github.nscala-time/nscala-time_2.10"
)

libraryDependencies ++= Seq(
"com.typesafe.akka" %% "akka-actor" % "2.3.3"
)

2. plugins.sbt
addSbtPlugin("com.typesafe.sbteclipse" % "sbteclipse-plugin" % "2.5.0")

3. assembly.sbt
addSbtPlugin("com.eed3si9n" % "sbt-assembly" % "0.11.2")
0 0
原创粉丝点击