Parts Database Web App
This project uses sbt 0.11.x to build.
Integration with eclipse is done via eclipsesbt.
In order to update the project configuration do the following:
eclipse from the sbt prompt in the root project to generate the eclipse
.classpath files for each code project.
1. Open Eclipse and add a dependency on the db project to the lift project. See this sbteclipse issue.
- Right click on the lift project: 'Properties -> Java Build Path -> Projects -> Add... -> Select db project -> Ok`
As the sbt configuration is used as the master configuration for the eclipse build settings, and the settings file is used to store formatting, import managementand other settings as well as the build settings we need to set the non compiler settings in Eclipse as global configuration. See this sbteclipse issue.
The Scala formatter settings can be left as is, with the exception of ensuring that
Use Compact Control Readability Style is checked in the
These are entirely up to you.
Anything you want set here should be configured in the
scalacOptions for the project build and will be added by
sbteclipse when the
eclipse task is run.
- Set the
collapse into single import statement option
- Add the following to the Always use wildcard imports... area:
- com.mongodb.casbah.Imports (soon to be removed)
Building the Project
In order to build the project, simply run
sbt.bat to enter the sbt prompt. From there run
test to run the project tests. To run the jetty webapp enter the following:
This is required as you need to run the
container:start task from within the
lift project. This is done by the
project lift command.
Alternatively, use the
There are aliases to the following tasks that can be run from within any project context:
- start-webapp (or run-webapp) - This will start the web container if it is not already running
- stop-webapp - Stops a running webapp
- restart-webapp - Can you guess :)
- test-core, test-db, test-lift - Run the tests in the particular project
- test-clean-core, test-clean-db, test-clean-lift - Clean and then run the tests in the given project.
Project Scaladoc can be found at http://randomcoding.github.com/PartsDbWebApp/scaladoc/current/