Tomas Mikula
Tomas Mikula

Reputation: 6537

sbt: show the java command invoked by the run task

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.

Upvotes: 5

Views: 338

Answers (1)

Seth Tisue
Seth Tisue

Reputation: 30453

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.

Upvotes: 2

Related Questions