title: Why can't my tests see my system property when I release on Jenkins?
body: <p>I wrote some unit test code that prints out the value of a System.property named "JENKINS_BUILD".  This property has a value when I run these command locally:</p>
  
  <pre><code>mvn --batch-mode test -DJENKINS_BUILD=true
  mvn test -DargLine="-DJENKINS_BUILD=true"
  etc.
  </code></pre>
  
  <p>But no matter what I do, I cannot get this property into my tests when they are run on Jenkins.  This is the command line option I'm using there:</p>
  
  <pre><code>mvn -DargLine="-DJENKINS_BUILD=true" --batch-mode -Dresume=false release:prepare release:perform
  </code></pre>
  
  <p>Slightly different, but I don't see why it would matter.  Why is <code>System.getProperty("JENKINS_BUILD")</code> null on Jenkins but "true" in my local environment?  Does this have something to do with using <code>release:prepare release:perform</code>?</p>
  
  <p><a href="https://stackoverflow.com/questions/16005437/passing-arguments-to-maven-release-build">I think this is basically the same question</a>, but I'm not sure.  The difference is he's trying to pass arguments into the release plugin, I'm trying to pass them into the surefire plugin.  Also, I want to define the value in the command line without having to change my pom.xml.  Is there a way to do that?</p>
  
  <p><strong>FWIW</strong>, the solution that I linked to <em>does</em> work.  </p>