Last active
October 13, 2015 17:28
-
-
Save yankov/4230948 to your computer and use it in GitHub Desktop.
Creating new Scala project with sbt
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
LGTM