spray / sbt-revolver

An SBT plugin for dangerously fast development turnaround in Scala
Apache License 2.0
846 stars 55 forks source link

No main class detected for submodules without main class #108

Closed hellhoundmipt closed 1 year ago

hellhoundmipt commented 2 years ago

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?

jonathonherbert commented 1 year ago

Does disabling Revolver explicitly on each project that does not require it help? (https://github.com/spray/sbt-revolver/issues/66)

jrudolph commented 1 year ago

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"