Skip to content

Developing the Library

henrikerola edited this page Feb 23, 2013 · 5 revisions

Developing the library

Needed Tools

Generating Eclipse project files

$ sbt eclipse

OR

$ sbt
> eclipse
[info] Successfully created Eclipse project files. Please select the appropriate Eclipse plugin for Scala 2.9.0-1!
>

After the above commands, it's possible to import scala-wrappers and scala-wrappers-demo projects into Eclipse.

Generating IntelliJ IDEA project files

Add sbt-idea as a global plugin by adding the following line to ~/.sbt/plugins/plugins.sbt:

addSbtPlugin("com.github.mpeltonen" % "sbt-idea" % "1.2.0")

After that needed files can be generated by saying

$ sbt gen-idea

and you can import the project into IntelliJ IDEA.

Running tests

While developing the library it's a good idea to run tests continuously in a console window:

$ sbt ~test

Running the demo application

$ sbt "project demo" container:start ~aux-compile

OR

$ sbt
> project demo
> container:start
> ~aux-compile

Now the application is accessible in http://localhost:8080. Jetty will also redeploy the application when changes are detected. You may also need to increase the amount of permgen memory available to SBT. The simplest way to do this is to edit the script that launches SBT.

Packaging jar

$ sbt package

Packaging war

$ sbt "project demo" package-war