5

Is there a command in the SBT console that forces it to resolve artifacts (especially, re-resolve SNAPSHOT dependencies)? The only way I know of now is to run clean and then compile (or start), but this takes much longer and isn't always necessary.

i.am.michiel
  • 10,281
  • 7
  • 50
  • 86
Manuel Bernhardt
  • 3,135
  • 2
  • 29
  • 36

3 Answers3

5

You can mark the needed dependencies to re-check them on update:

libraryDependencies ++= {
  "org.specs2" %% "specs2" % "1.10-SNAPSHOT" % "test" changing()
}

Re-download a SNAPSHOT version of a dependency using SBT

Community
  • 1
  • 1
Rogach
  • 26,050
  • 21
  • 93
  • 172
1

The update command should help.

From the task's documentation:

Resolves and optionally retrieves dependencies, producing a report.

See Dependency Management Flow.

What's more important, SNAPSHOT dependencies are in their nature changing() so there's no need to add anything after ModuleID to mark them as such. Every update is supposed to resolve them against the repositories.

Jacek Laskowski
  • 72,696
  • 27
  • 242
  • 420
0

Perhaps update-classifiers is what you are looking for? Otherwise, try the tasks command to see what's available.

Emil L
  • 20,219
  • 3
  • 44
  • 65