Separate banks for different main classes with the same src

What is the best way to generate separate jar files using sbt for several main classes in the same source tree?

The project directory looks something like this:

project_root/
        src/main/scala/
                     A/*.scala files for main class A
                     B/*.scala files for main class B
                 resources/
            test/scala/
                     A/
                     B/
        lib/
        project/Build.scala
        build.sbt   

Note that both A and B have the same base. Specific examples of the Build.scala file will be helpful.

+5
source share
1 answer

You should take a look at getting started with multiple projects . I made a simple example below:

import sbt._

object MyBuild extends Build {

  lazy val projA = Project("projA", file("a")) 

  lazy val projB = Project("projB", file("b"))
}
+1
source

All Articles