Arne Claassen
Arne Claassen

Reputation: 14404

Externalizing dependencies for sbt packages

My deployable bin for scala projects currently hits about 50MB, and almost 40MB of that is jar's that are not likely to change between deployments (scala-lang and aws). Is there a way to externalize them from the packaging, so that every build doesn't have to include them?

Upvotes: 2

Views: 135

Answers (1)

dk14
dk14

Reputation: 22374

You can write your own deploy task. Use this code (https://stackoverflow.com/a/9519397/1809978) to customize deploy folder and choose the only jars you need (by marking them using attribute like "org.package" % "artifact" % "1.0" % "external"). And repeat same for internal folder.

P.S. About referenced code: it's better to use sbt.IO for working with files.

Upvotes: 2

Related Questions