I have recently started working with scala. SBT is the tool of choice for Scala based projects. Let us see how to get it working on windows.
Installing SBT for Windows
Create a batch file sbt.bat which contains following script
$ set SCRIPT_DIR=%~dp0 $ java -Xmx512M -jar "%SCRIPT_DIR%sbt-launch.jar" %*
Now, put the sbt-launch.jar file in same directory where you put sbt.bat file.Put sbt.bat on your path so that you can launch sbt in any directory by typing sbt at the command prompt.
After installing SBT if we type in sbt in the command prompt in an empty directory, this is what we are likely to see
D:\hello>sbt [info] Set current project to default-30dbd1 (in build file:/D:/hello/)
In order to create project execute the following commands in the sbt session.
> set name :="hello" [info] Reapplying settings... [info] Set current project to hello (in build file:/D:/hello/) > > set scalaVersion :="2.9.2" [info] Reapplying settings... [info] Set current project to hello (in build file:/D:/hello/) > set version :="1.0" [info] Reapplying settings... [info] Set current project to hello (in build file:/D:/hello/) > session save [info] Reapplying settings... [info] Set current project to hello (in build file:/D:/hello/) > exit
SBT creates files and directories when we executed the commands. It creates build.sbt and it contains the same values we typed in sbt session. Other directories like target and project are of little consequence to us.
My project directory contains following sub directories

This is how my my build.sbt files looks like after executing the commands in sbt session
name :="hello" scalaVersion :="2.9.2" version :="1.0"
One thing that has also changed from the past is that the src directories are not created by default. I used the sbteclipse plugin to do it for me.
Create file plugins.sbt inside project and add the following contents :
addSbtPlugin("com.typesafe.sbteclipse" % "sbteclipse-plugin" % "2.0.0")
Execute the following command.
D:\hello>sbt eclipse
After execute eclipse command, following directory created as following

It creates common source directories like src/main/scala, src/main/test, etc and also eclipse project files.
D:\hello\src>dir
Volume in drive D is New Volume
Volume Serial Number is A83C-E41D
Directory of D:\hello\src
01/21/2013 03:36 PM <DIR> .
01/21/2013 03:36 PM <DIR> ..
01/21/2013 03:36 PM <DIR> main
01/21/2013 03:36 PM <DIR> test
0 File(s) 0 bytes
4 Dir(s) 5,875,458,048 bytes free
The project is ready to imported in Eclipse IDE.That is all we need for creating Scala project using the latest SBT. We now know how to create an Scala project using SBT.






Pingback: Multi Project Builds with SBT 0.12 for Scala Project | Knoldus
thanks , that was helpful