sbt: How to show the file/directory with 'doc' and 'package' commands

When you use sbt — at least with version 1.4.4 in November, 2020 — if you use commands like doc, package, packageDoc, and probably assembly, sbt doesn’t show the directory where your output JAR files are written.

I don’t know why it doesn’t show those output locations — maybe people who use sbt all the time don’t want to see those things, such as if they have sbt doc or sbt package commands in a shell script — but if you want to see the directory and name of the files that sbt creates, use the show command before other commands like doc and package, like this:

sbt> show doc
sbt> show package

Here’s what the output of those commands looks like when using sbt 1.4.4 and Scala 3.0.0-M2:

sbt> show doc

sbt> show package

So that’s a solution for when you need to see those sbt output files and directories.

Also, when I asked this question on the channel, a Github/Gitter user with the handle @nigredo-tori also suggested this:

see Compile / packageBin / artifactPath and Compile / packageDoc / artifactPath settings

Another possible solution: sbt logging levels

Another possible solution is to set the sbt logging level to debug before running commands like doc, package, packageDoc, and assembly. You do this by typing the debug command at the sbt shell prompt:

sbt> debug

While I’m in this neighborhood, here are the commands for setting sbt log levels:


In summary, if you wanted to know how to see the locations of the files and directories that are created by those sbt commands, I hope these examples are helpful.