title: How to set System property for a scalatest from sbt command line
body: <p>A ScalaTest suite is using </p>
  
  <pre><code> System.getProperty("my.command-line.property")
  </code></pre>
  
  <p>What is the sbt command line to achieve this setting?</p>
  
  <p>I have tried</p>
  
  <pre><code>SBT_OPTS="-Dmy.command-line.property=foo" sbt "test-only &lt;path to test suite"
  </code></pre>
  
  <p>Also:</p>
  
  <pre><code>JAVA_OPTS="-J-Dmy.command-line.property=foo" sbt "test-only &lt;path to test suite"
  </code></pre>
  
  <p>Finally:</p>
  
  <pre><code>sbt/sbt  '; set javaOptions in Test  +="-Dtest.num.points=500000"; \
  project mllib; test-only org.apache.spark.mllib.optimization.LBFGSSuite'
  </code></pre>
  
  <p>When using any of those attempts the System.getProperty comes up blank. </p>
  
  <p>An approach that <em>does</em> work is running the ScalaTest from within Intellij and setting the JVM parameters to <strong>-Dmy.command-line.property=foo</strong> within the Run Configuration.</p>