title: How does jenkins determine which local repository to use?
body: <p>I have two jobs running in jenkins both have the following setup <img src="https://i.stack.imgur.com/FCy6T.png" alt="enter image description here"></p>
  
  <p>the global settings are</p>
  
  <p><img src="https://i.stack.imgur.com/NVLXz.png" alt="enter image description here"></p>
  
  <p>when they run they use the commands</p>
  
  <pre><code>Executing Maven:  -B -f /u01/jenkins/jobs/job_1/workspace/pom.xml -Dmaven.repo.local=/u01/jenkins/maven-repositories/0 clean install
  
  Executing Maven:  -B -f /u01/jenkins/jobs/job_2/workspace/pom.xml -Dmaven.repo.local=/u01/jenkins/maven-repositories/1 clean install
  </code></pre>
  
  <p>Why do they use different repositories?</p>
  
  <p>job 2 is dependent on an artifact produced by job 1.</p>