Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
A Scala sbt web project skeleton with ScalaIDE suppot
Scala
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
project
README.textile
build.sbt

README.textile

Scala sbt web project skeleton

Introduction

I have been asked many times by people about how to create a Scala web project and integrate it with ScalaIDE. So I decided to create this skeleton project that everyone can use.
This project uses sbt as the build tool.

Usage:

Source directories

The first time you will need to create the source directories


$ sbt src

Dependencies

Dependencies are managed by SBT. The project comes with a few default dependencies that can be removed.


libraryDependencies ++= Seq(“org.slf4j” % “slf4j-api” % “1.6.2” % “runtime” withSources,
“ch.qos.logback” % “logback-classic” % “0.9.30”,
“javax.servlet” % “servlet-api” % “2.5” % “provided”,
“org.eclipse.jetty” % “jetty-webapp” % “8.0.4.v20111024” % “container”)

The jetty-webapp dependency is required by the sbt web plugin in order to run integration tests with embedded jetty. The servlet-api is required for compilation. Using the key "provided will not package it since it already bundled in our runtime web server.

eclipse integration

The project comes with the sbteclipse plugin.
Every time the dependencies change, we need to tell eclipse about it.


$ sbt eclipse with-sources same-targets

This command updates the eclipse configuration files. After we run it we need to refresh the project from within eclipse.

Packaging

Since this is a web project running the package task will create a war file that can be deployed on every servlet container.


$ sbt package

Something went wrong with that request. Please try again.