title: Calling a job in a Multi Branch pipeline
body: <h2>Background</h2>
  
  <p>I want to create a very simple Pipeline in Jenkins. For example:</p>
  
  <ul>
  <li>Stage 1: Build using maven</li>
  <li>Stage 2: Build docker image</li>
  </ul>
  
  <p>In the root of my project I have the following Jenkinsfile:</p>
  
  <pre><code>stage 'build'
  node {
      def branch = env.BRANCH_NAME
      build job: 'Maven job', parameters: [[$class: 'StringParameterValue', name: 'BRANCH_TO_BUILD', value: branch], [$class: 'StringParameterValue', name: 'MAJOR_VERSION_NUMBER', value: '1.0']]
  }
  stage 'Docker image'
  node{
      echo 'TODO://Get jar file from previous job and build Docker image'
  }
  </code></pre>
  
  <p>The <code>Maven Job</code> job will create a jar file which I want to use in the next stage to build my docker image.</p>
  
  <p>The reason I used an external job to build my project is because I'm using JFrog Artifactory and I want all my dependencies to be resolved with Artfifactory.</p>
  
  <p>The <a href="https://wiki.jenkins-ci.org/display/JENKINS/Artifactory+-+Working+With+the+Pipeline+Jenkins+Plugin" rel="nofollow">documentation for the Artifactory Jenkins plugin</a> states:</p>
  
  <pre><code>The current plugin version does not include pipeline DSL for Maven and Gradle builds, but this will become available soon.
  </code></pre>
  
  <p>If I build the project straight from the Groovy script using Maven it will not resolve dependencies from Artficatory which is not what I want.</p>
  
  <p>I have the <code>Copy Artifact</code> plugin installed and my <code>Maven Job</code> archives the jar file at the end of the build.</p>
  
  <h2>Question</h2>
  
  <p>From <code>Jenkinsfile</code>, how can I access the archived jar files from the job I just called?</p>