I would like to specify JVM options when running my app or the tests for the app through SBT. Specifically, I need to be able to give the JVM the -Djava.security.policy parameter so that my policy is loaded and used for the test.
How can I do this with SBT?
With xsbt, you could run your test in a forked JVM (because of one of the reasons mentioned in “Running Project Code“.
If you are using a forked jvm:
You should be able to specify any other options to that JVM through
javaOptions.The OP David Eagen reports that the following configuration didn’t work at first, not because of the sbt options, but because of the path: