Here's a little experiment I did just now at the sbt command line showing that it's definitely possible to remove something unwanted from fullClasspath
:
% sbt
> show runtime:fullClasspath
[info] List(Attributed(.../target/classes),
Attributed(.../jars/scala-library-2.10.4.jar),
Attributed(.../jars/asm-all-3.3.1.jar))
> set fullClasspath in Runtime := (fullClasspath in Runtime).value.files.filterNot(_.getName.containsSlice("asm")).classpath
> show runtime:fullClasspath
[info] List(Attributed(.../target/classes),
Attributed(.../jars/scala-library-2.10.4.jar))
Voila — the "asm-all-3.3.1" entry is gone.
Note that this isn't about <<=
vs :=
. The latter is just macro-based sugar for the former. The experiment turns out the same if I avoid :=
and do this instead:
set fullClasspath in Runtime <<= (fullClasspath in Runtime) map
{_.files.filterNot(_.getName.containsSlice("asm")).classpath}