sbt-assembly
sbt-assembly copied to clipboard
How to generate two uber jars for one project folder using different filter
Hi,
I Just started to learn scala/sbt and is now trying to build my project in two different jars:
One will only contain the .dll unmanagedResource for windows The other one will only contain the .so unmanagedResource for Linux
I am now able to set the filter. But I do not know how to generate two jars in one assembly - or some other option without me touching the code of build.sbt for assembly.
Thanks! Charles
Have figured it out. Just create two projects pointing to the save folder. Assign different target and resource to them and then you can apply different filters to create different jars. .settings( target := file("...1/scala-2.10/"), sourceManaged := file("...1/scala-2.10/") )
.settings( target := file("...2/scala-2.10/"), sourceManaged := file("...2/scala-2.10/") )
@charlessong0 if you create two projects pointing to the same folder, the later one will overwrite the previous one, right?
for example:
lazy val proj1 = (project in file("."))...
lazy val proj2 = (project in file("."))...
now, there is only one project proj2
.