sbt-revolver
sbt-revolver copied to clipboard
No main class detected for submodules without main class
I have a project with a root module (obviously has a main class, object Main
for example) that depends on multiple other modules that do not have main classes as they are used as libs. In build.sbt I specify mainClass in reStart := Some("Main")
. When I start an app with sbt ~reStart, it works fine and restarts when source code in any of the modules changes, but it throws java.lang.RuntimeException: No main class detected
for all the subprojects. Not something severe as it does everything it is supposed to do, but errors in logs are annoying. Any fix for this?
Does disabling Revolver explicitly on each project that does not require it help? (https://github.com/spray/sbt-revolver/issues/66)
I'd suggest to move to the submodule first that has the main class, e.g.
sbt "project <module>" ~reStart
or using
sbt "~<module>/reStart"