Question

I am using sbt console to debug some web application, written with Lift Framework.

Every time running it, I run some commands to initialize framework.

import bootstrap.liftweb.Boot
(new Boot).boot
import ...some frequently used models from my app...

I want sbt to do this boilerplate every time I start it.

How to do this?

Was it helpful?

Solution

The simple way to do that, is put "initialCommands" rule in build.sbt.

This example:

initialCommands in console := """println("Hello from console")"""

will print in console, after initialization

Hello from console

Provided by https://stackoverflow.com/a/12703977/225767

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top