Hi,
I'm fairly new to sbt and I like what I've seen so far, but I've come
across the following problem when I upgraded to version 0.5.4 to get
around issue 35 <
http://code.google.com/p/simple-build-tool/issues/
detail?id=35>.
When I try to run jetty from sbt now, it has problems picking up the
managed Jetty dependencies and I get a message saying that I need to
add Jetty to the test classpath. When I revert back to 0.5.2, jetty-
run works as normal.
Has anything changed with how I should configure the project, or is it
really just a case of now having to add the Jetty jars to the test
classpath?
My project file looks like this:
import sbt._
class MyProject(info:ProjectInfo) extends DefaultWebProject(info) {
val jetty6 = "org.mortbay.jetty" % "jetty-ajp" % "6.1.14"
override def webappPath = "web"
override def jettyWebappPath = webappPath
override def scanDirectories = mainCompilePath ::
testCompilePath :: Nil
}
The relevant versions in my build.properties file are:
sbt.version=0.5.4
scala.version=2.7.5
I am running Java 1.5.0_19 on Mac OSX 10.5.8
This is the error I get when I try to run jetty from the sbt prompt:
> jetty-run
[info]
[info] == compile ==
[info] Source analysis: 0 new/modified, 0 indirectly invalidated, 0
removed.
[info] Compiling main sources...
[info] Nothing to compile.
[info] Post-analysis: 131 classes.
[info] == compile ==
[info]
[info] == copy-resources ==
[info] == copy-resources ==
[info]
[info] == prepare-webapp ==
[info] == prepare-webapp ==
[info]
[info] == jetty-run ==
java.lang.NoClassDefFoundError: org/mortbay/log/Logger
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:242)
at sbt.ModuleUtilities$.getObject(ModuleUtilities.scala:10)
at sbt.JettyRunner.runJetty$1(WebApp.scala:37)
....
[info] == jetty-run ==
[error] Error running jetty-run: Jetty and its dependencies must be on
the test classpath: java.lang.NoClassDefFoundError: org/mortbay/log/
Logger
[info]
Cheers,
Kristian.