Hey everyone!
I hope y'all can help me - I'm not from a Java background, so while I understand the language fine, all of its build tooling is freaking Greek to me.
I have a Play Framework (2.6.9) application that contains 3 sub-projects. An API, a GUI, and common. The ask is for the API and GUI to be separated as much as possible so they can be deployed independently. There's also a desire to deploy it using Amazon ECS and Docker. Before I added that Common module, everything worked amazing. I could build a docker container for each sub-project, as well as the root project, and everything just seemed to work. It was amazing. But now that the API and GUI sub-projects have a dependency on Common, things aren't working. If I try to run the API sub-project, for example, it complains because it can't find the Common module.
Here's my build.sbt file:
Common.settings("IAM")
lazy val common = (project in file("modules/common"))
.enablePlugins(PlayJava)
lazy val api = (project in file("modules/api"))
.aggregate(common)
.dependsOn(common)
.enablePlugins(PlayJava, DockerPlugin)
lazy val gui = (project in file("modules/gui"))
.aggregate(common)
.dependsOn(common)
.enablePlugins(PlayJava, DockerPlugin)
lazy val root = (project in file("."))
.aggregate(api, common, gui)
.dependsOn(api, common, gui)
.enablePlugins(PlayJava, DockerPlugin)
scalaVersion := "2.11.11"
libraryDependencies ++= Common.commonDependenciesI tried to follow along with
this guide that says to use "sbt-assembly" to build a fat jar to accomplish this, but I feel like this should be accomplish-able without heading down that path? Plus, I totally couldn't get it to work :P I kept running into this error:
deduplicate: different file contents found in the followingFrom what I've read, it's related to the Merge Strategy, and I've gone down a couple rabbit holes here, but I haven't yet stumbled onto the right incantation to make it work.
Hopefully this is an easy problem - I've spent the last decade writing mostly Python, so I'm way out of the loop here.
Thanks for any help you can offer!!!