sbt: "test" works "test:run" not
Posted
by
Martin
on Stack Overflow
See other posts from Stack Overflow
or by Martin
Published on 2012-06-28T15:13:55Z
Indexed on
2012/06/28
15:15 UTC
Read the original article
Hit count: 271
I try to establish a build pipeline on Jenkins with a Play(2.0.2) project.
As I want to just build the sources once and use the classes for downstream builds, I now have created a "compile"-job, that runs "sbt test:compile". That works so far.
The next job should then just run the compiled tests. If I use "sbt test" it works as expected, but compiles the sources again.
But if I try to run "sbt test:run" it says:
[info] Loading project definition from ~/myproject/project
[info] Set current project to myproject (in build file: ~/myproject/)
java.lang.RuntimeException: No main class detected.
at scala.sys.package$.error(package.scala:27)
[error] {file:~/myproject/test:run: No main class detected.
The same happens locally. I can run "sbt test" but not "sbt test:run". Same error.
Is there someone who can point me to the right direction?
© Stack Overflow or respective owner