sbt / sbt-assembly

Deploy über-JARs. Restart processes. (port of codahale/assembly-sbt)
MIT License
1.95k stars 225 forks source link

Only assemble selected modules within multi-module project #175

Open mtomko opened 9 years ago

mtomko commented 9 years ago

Is there a way to configure the sbt-assembly plugin such that running sbt assembly will only assemble selected modules within a multi-module project? We have tried a few things, such as providing assembly settings only to modules that should be assembled.

I found #168 and tried setting aggregate in assembly := false for modules that should not be assembled and aggregate in assembly := true for the module that should be assembled. I also tried assembleArtifact in assembly := false as suggested in that issue, but still no luck.

Thanks!

mtomko commented 9 years ago

Just noticed #147. will see if I can get that to work....

mtomko commented 9 years ago

Hmm, on closer inspection, #147 was not quite for the same thing. I think for our use case, we'd prefer to disable assembly for individual submodules but have sbt assembly trigger an assembly for the one submodule that actually contains an application.

abhamjee commented 8 years ago

Has there been any resolution with this issue? I have delayed upgrading from 0.11.2 to 0.14.2 for this very reason. We have a multi-module project with 84 projects but only 30 assembled artifacts. How do I prevent creating these intermediate uber jars for the 54 projects? I have also tried the same settings mtomko mentioned above, but with no luck.

esamson commented 8 years ago

I work around this by adding disablePlugins(AssemblyPlugin) on the projects that should not be assembled. Maybe it would be nicer if we could instead add a config to the projects that should be assembled but I guess it could go either way.

abhamjee commented 8 years ago

Thank you Edward,

That worked perfectly.

From: Edward Samson [mailto:notifications@github.com] Sent: Thursday, March 10, 2016 05:54 To: sbt/sbt-assembly Cc: Ahmed Bhamjee Subject: Re: [sbt-assembly] Only assemble selected modules within multi-module project (#175)

I work around this by adding disablePlugins(AssemblyPlugin) on the projects that should not be assembled. Maybe it would be nicer if we could instead add a config to the projects that should be assembled but I guess it could go either way.

— Reply to this email directly or view it on GitHubhttps://github.com/sbt/sbt-assembly/issues/175#issuecomment-194651080.