title: Jenkins inject environment variable
body: <p>In a Jenkins job I'm doing a couple of actions that reside in the pre-step build, such as executing a shell script. 
  With the use of the Jenkins plugin "EnvInject" I want to inject environment variables into my maven build (Unit tests) so that those can be used inside my Java unit tests.
  Inside the shell script im doing something similar as:</p>
  
  <pre><code>echo "ip=$IP" &gt;&gt; unit-test.properties
  </code></pre>
  
  <p>While building Jenkins outputs the following:</p>
  
  <pre><code>[EnvInject] - Injecting environment variables from a build step.
  [EnvInject] - Injecting as environment variables the properties file path 'unit-test.properties'
  [EnvInject] - Variables injected successfully.
  </code></pre>
  
  <p>But the "ip" variable is not available inside my Java code (unit test). When I do a full print of both <code>System.getProperties() and System.getenv()</code> I do not see the "ip" enlisted.</p>
  
  <p>Do I need to perform any special actions for maven to pass the variable to my Java code? Is something else wrong?</p>
  
  <p>I'm pretty much stuck from this point onward, I do want to inject a <code>key=value</code> from a pre-step into my Java code.</p>