Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

sbt: show the java command invoked by the run task

Tags:

sbt

Can I make sbt run echo the exact java command it is invoking?

This question has been asked before, but the OP's issue was resolved without answering the question, so I'm asking again.

like image 741
Tomas Mikula Avatar asked Nov 01 '22 12:11

Tomas Mikula


1 Answers

I would have thought this would do it:

set logLevel := Level.Debug

It produces a torrent of info out of most commands, but, sadly, not a forked run.

Looking at https://github.com/sbt/sbt/blob/0.13.0/run/src/main/scala/sbt/Run.scala , there seems to be a conspicuous lack of calls to log.debug(...). Same in https://github.com/sbt/sbt/blob/0.13.0/run/src/main/scala/sbt/Fork.scala. You might patch either or both of those source files to log what you want logged and rebuild sbt.

If that seems too ambitious, not sure what to suggest other than starting with inspect run and then doing inspect and show on the various settings listed under "Dependencies:"; this will at least you show all the different pieces of information that are feeding into the run task.

like image 199
Seth Tisue Avatar answered Jan 04 '23 14:01

Seth Tisue