Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Show SBT's internal classpath

Tags:

scala

sbt

Is it possible to show or export SBT's own set of internal dependencies?

For example, if I run sbt "show fullClasspath" it does not include org.scala-lang.scala-compiler. And if my application's version of Scala is different from SBT's version (such as a Play app using 2.11 and SBT 0.13.5) then there are tons of unlisted jars SBT needs when running sbt compile.

The motivation for this is that I'm attempting to prune my .ivy2/cache to reduce the size of a disk image containing my app code (without re-downloading anything upon sbt compile).

like image 536
codefinger Avatar asked May 17 '26 07:05

codefinger


1 Answers

You can do reload plugins, which changes the current build to the project/:

The reload plugins command changes the current build to the (root) project’s project/ build definition. This allows manipulating the build definition project like a normal project. reload return changes back to the original build. Any session settings for the plugin definition project that have not been saved are dropped.

When selected the build definition, you can do show fullClasspath.

If you want to do this without launching sbt console first, you can do sbt "reload plugins" "show fullClasspath".

like image 147
lpiepiora Avatar answered May 19 '26 21:05

lpiepiora