Closed kevomacartney closed 3 years ago
Thanks for creating a repro project.
.aggregate(app)
is just for command broadcasting. In other words this turns typing assembly
into globalApp/assembly
and app/assembly
. To create dependency between the subprojects what you need is
.dependsOn(app)
https://www.scala-sbt.org/1.x/docs/Multi-Project.html#Classpath+dependencies
@eed3si9n Thanks for the quick response. I've noticed that when I change it to dependsOn
it does work, however only dependancies in the root project are included in the final assembly. That is, if dependancy a
is included in globalApp
and dependancy b
is include in app
only dependancy b
is include in the final Jar. How do I tell sbt-assembly
to include dependancies from all sub projects?
I've updated the repo to reflect the issue.
I have created a project with multiple modules, and I have noticed that the jar does not include classes from some projects. Please see the demo repo: https://github.com/kelvinmac/assembly-test
We have two projects:
app
which has a classMain
and projectglobalApp
which is the root project and aggregates theapp
project. When we assemble the jar by runningassembly
task in sbt, I find that the class under projectapp
isn't being included in the final jar which results to:I have inspected the jar too see the classes in the jar and can confirm that the class isn't there.