thopaw
thopaw

Reputation: 4054

No aux-compile task in sbt console in scalatra project

I want to play a little bit with the Scalatra framework but run into problem that my sbt console does not know the aux-compile task. As suggested here, auto code reloading can be enabled with

~ ;copy-resources;aux-compile

I setted up my project with the following build.sbt file

name := "scalatra-app"

version := "0.1.0-SNAPSHOT"

scalaVersion := "2.11.2"

lazy val root = (project in file(".")).enablePlugins(SbtTwirl)

jetty()

libraryDependencies ++= Seq(
    "org.scalatra" %% "scalatra" % "2.3.0",
    //"org.scalatra" %% "scalatra-scalate" % "2.3.0",
    "org.scalatra" %% "scalatra-specs2" % "2.3.0" % "test",
    "org.slf4j" % "log4j-over-slf4j" % "1.6.1",
    "ch.qos.logback" % "logback-classic" % "1.1.2" % "runtime",
    "org.eclipse.jetty" % "jetty-webapp" % "9.2.1.v20140609" % "container",
    "javax.servlet" % "javax.servlet-api" % "3.1.0" % "provided"
)

and use these plugins

addSbtPlugin("com.typesafe.sbteclipse" % "sbteclipse-plugin" % "2.4.0")

addSbtPlugin("com.earldouglas" % "xsbt-web-plugin" % "1.0.0")

addSbtPlugin("com.typesafe.sbt" % "sbt-twirl" % "1.0.4")

My sbt version is 0.13.7.

What am I missing? What should I do to use the aux-compile task?

Upvotes: 2

Views: 180

Answers (2)

Olya Piatrova
Olya Piatrova

Reputation: 76

That looks like doc bit rot. aux-compile went away with xsbt-web-plugin 1.0. It has been simplified by the plugin:

~container:start

This starts the container, then monitors the sources, resources, and webapp directories for changes, which triggers a container restart.

Here is this issue on Github.

Upvotes: 2

Ron Groth
Ron Groth

Reputation: 1

I had trouble with aux-compile as well. I then tried container:start and it was not able to load my main class. I then stumbled across jetty:start and it works beautifully.

Upvotes: 0

Related Questions