When you run sbt compiledependencies marked as test, they are still allowed, although they will not be included later in the compilation. It seems like this should only happen during a task test:compile. Is there a way to eliminate testresolution and load dependencies during a task compile?
Here is an example with addiction org.mockito#mockito-all. I declare it only test:
"org.mockito" % "mockito-all" % "1.9.0" % "test"
However, when (flushing it from my local Ivy cache and), when launched sbt compile, it becomes uselessly loaded:
$ sbt compile
[info] Loading global plugins from /Users/rbrainard/.sbt/plugins
[info] Loading project definition from /Users/rbrainard/Development/spitball/project
[info] Set current project to spitball (in build file:/Users/rbrainard/Development/spitball/)
[info] Updating {file:/Users/rbrainard/Development/spitball/}spitball...
[info] Resolving org.mockito#mockito-all;1.9.0 ...
[info] downloading http://repo1.maven.org/maven2/org/mockito/mockito-all/1.9.0/mockito-all-1.9.0.jar ...
[info] [SUCCESSFUL ] org.mockito#mockito-all;1.9.0!mockito-all.jar (2075ms)
[info] Done updating.
[success] Total time: 7 s, completed May 28, 2014 4:51:20 PM
source
share