95
votes

I have read questions: this and that. They suggest to modify sbt file. But I want run sbt clean assembly without tests and do not modify sbt build files. Is it possible with sbt? In maven there is -DskipTest=true parameter, is there analog for sbt?

1
based on this and that, and the official documentation I'd say no. Either you have to modify the build files or execute package as that doesn't run any tests.DB5
Possible duplicate of How can I skip tests in an SBT build?Murmel

1 Answers

165
votes

For any properties you need to change on the command line, prepend them with "set ", and wrap them in quotes.

Example for Windows:

sbt "set test in assembly := {}" clean assembly

Example for Mac:

sbt 'set test in assembly := {}' clean assembly