danielvdende
danielvdende

Reputation: 710

Multi module sbt within Intellij Idea

I'm trying to create a new multi module sbt project in Intellij Idea. So far, I have created an sbt project, but I'm struggling to get the multi module effect implemented.

import sbt._

object MyBuild extends Build {

  lazy val modA     = Project("modA", file("modA"))
                          .settings(
                            libraryDependencies ++= modADependencies
                          )

  lazy val modB = Project("modB", file("modB"))
                          .settings(
                            libraryDependencies ++= modBDependencies
                          )

  lazy val root = Project("root", file(".")).aggregate(modA, modB)
}

I have the following structure in my Intellij sbt project:

 - TopLevelProject
  - modA
     - src
         - main
             - scala
  -modB
     - src
         - main
             - scala
  -project
     - Build.scala
     - Dependencies.scala

When I run sbt, and then run projects, I would like to see a list of the separate projects (i.e. modA, modB, and root). But I only get the top level project.

sbt.version = 0.13.8 if that matters :).

Upvotes: 2

Views: 1087

Answers (1)

irundaia
irundaia

Reputation: 1730

I've tried to reproduce your issue. Unfortunately, I have to conclude that your MyBuild.scala file is correct. When I run it with sbt 0.13.5 I get the following output:

> projects
[info] In file:Path/To/Application/
[info]     modA
[info]     modB
[info]   * root

Upvotes: 0

Related Questions