Reactormonk
Reactormonk

Reputation: 21690

How do I run a main class from build.sbt?

Given a subproject, how do I run a main class of that project as a dependency of another subproject?

Upvotes: 3

Views: 1465

Answers (1)

pacman
pacman

Reputation: 837

Add this to your sbt

// set the main class for 'sbt run'
mainClass in (Compile, run) := Some("com.Foo")

Or this from cmd:

$ sbt "run-main com.Foo"

Upvotes: 1

Related Questions