Skip to content

Latest commit

 

History

History
41 lines (29 loc) · 1.61 KB

README.textile

File metadata and controls

41 lines (29 loc) · 1.61 KB

sbteclipse

This project is a plugin for SBT 0.10 providing a command to create Eclipse project files from a SBT project (possibly containing subprojects).

Usage

  • First add the plugin to your global plugins project ~/.sbt/plugins. Pay attention to add the resolver and libraryDependency like shown below!
  • Then create a SBT project
  • Now you can use the command eclipse to create Eclipse project files
  • Finally you can import the project in Eclipse unsing the “Import Wizard”

Adding the plugin

resolvers += {
  val typesafeRepoUrl = new java.net.URL("http://repo.typesafe.com/typesafe/releases")
  val pattern = Patterns(false, "[organisation]/[module]/[sbtversion]/[revision]/[type]s/[module](-[classifier])-[revision].[ext]")
  Resolver.url("Typesafe Repository", typesafeRepoUrl)(pattern)
}

libraryDependencies <<= (libraryDependencies, sbtVersion) { (deps, version) => 
  deps :+ ("com.typesafe.sbteclipse" %% "sbteclipse" % "1.1" extra("sbtversion" -> version))
}

Options

  • create-src to create the common source directories, e.g. src/main/scala, src/main/test, etc.
  • skip-root to skip project creation for the root project

Example

tmp$ mkdir test
tmp$ cd test
test$ sbt
> eclipse create-src skip-root
[info] Successfully created Eclipse project files. Please select the appropriate Eclipse plugin for Scala 2.8.1!

License

sbteclipse is open source software licensed under the Apache 2.0 License. If you like it, feel free use it!