Multi-project build with xsbt-web-plugin not packaging WAR file

177 Views Asked by At

I have multiple projects, one of which needs to be packaged as a WAR file. However, it gets packaged as a JAR File. Here's my build file:

enablePlugins(WarPlugin)

val foo = project in file("foo")

val war = project in file("war")

val root = project in file(".") aggregate(foo, war)
1

There are 1 best solutions below

5
Omer van Kloeten On BEST ANSWER

I noticed that what does get built is the root project, so I moved the enablePlugins call to the specific project:

val foo = project in file("foo")

val war = (project in file("war"))
              .enablePlugins(WarPlugin)

val root = project in file(".") aggregate(foo, war)