Skip to content

Instantly share code, notes, and snippets.

@yankov
Last active October 13, 2015 17:28
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save yankov/4230948 to your computer and use it in GitHub Desktop.
Save yankov/4230948 to your computer and use it in GitHub Desktop.
Creating new Scala project with sbt
mkdir project1
cd project1
sbt
set name := "project1"
set version := "1.0"
set scalaVersion := "2.9.3"
session save
exit
// in build.sbt add:
// make sure the latest version is used otherwise it'll fail o_O
// also it perhaps should be added in ~/.sbt/plugins/build.sbt
// not in the project itself. Craziness.
addSbtPlugin("com.typesafe.sbteclipse" % "sbteclipse-plugin" % "2.1.2")
sbt
eclipse with-source=true
//Then import project in eclipse.
// When you need to add a dependency, add it to build.sbt like this
libraryDependencies += "redis.clients" % "jedis" % "2.1.0"
// Then in sbt
reload
eclipse with-source=true
// And hit F5 on project folder in eclipse to make it pick up new lib
@tovbinm
Copy link

tovbinm commented Dec 7, 2012

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment