Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to disable dependency resolution during 'package' in sbt

Tags:

scala

sbt

ivy

We have project with multiple subprojects and complex inter-dependencies. Subprojects share similar sets of external dependencies (Spring, Apache etc).

It take enormous amount of time for dependencies resolution (possibly because of redundant dependencies checks) even in offline mode.

How to solve this? How can we disable updating and re-resolving external dependencies during packaging.

version: 0.12.1

like image 820
dk14 Avatar asked Jan 31 '13 13:01

dk14


1 Answers

skip in update := true will prevent update from doing any work. It uses the results of the previous update instead.

Note that this means that update must have been run (possibly indirectly) since the last clean, changes to dependency configuration since the last run will be ignored, and the cache must still contain the jars from the previous update.

Running update directly will override the skip setting and cause update to run normally.

Finally, similar sets of dependencies doesn't necessarily mean dependency resolution will be any faster. It only means that network access, downloading, and metadata parsing shouldn't be done more than once per dependency.

like image 76
Mark Harrah Avatar answered Sep 28 '22 09:09

Mark Harrah