title: MAVEN: How Do I Pass a -D System Variable to Test
body: <p>I'd like to set a system environment variable to be visible by Java code in the unit tests of a Maven project.  I tried this:</p>
  
  <pre><code>mvn -Dfoo=bar clean package
  </code></pre>
  
  <p>But that doesn't seem to take.  How do I accomplish this?</p>