title: Jenkins pipeline resolve artificat
body: <p>I am unsuccessfully trying to get a jar from artificatory. Here is my pipeline script:</p>
  
  <pre><code>pipeline {
      agent none
      stages {
              stage('Stop all services') {
                  agent {label 'master'}
              steps {
                      script{
                          def server = Artifactory.server 'Java_Artifactory'
                          def downloadSpec = readFile 'file'
                          def buildInfo1 = server.download spec: downloadSpec
                  }}}}}
  </code></pre>
  
  <p>and this is my file:</p>
  
  <pre><code>{
   "files": [
    {
        "pattern": "java-team-archiva-cache/com/rsa/jsafe/cryptoj/5.0/cryptoj-5.0.jar",
        "target": "myTest/cryptoj.jar",
        "props": "p1=v1;p2=v2"
      }
   ]
  }
  </code></pre>
  
  <p>this is my Console Output:</p>
  
  <pre><code>[Pipeline] stage
  [Pipeline] { (Stop all services)
  [Pipeline] node
  Running on Jenkins in /var/lib/jenkins/workspace/test_Pipeline
  [Pipeline] {
  [Pipeline] script
  [Pipeline] {
  [Pipeline] getArtifactoryServer
  [Pipeline] readFile
  [Pipeline] artifactoryDownload
  Downloading artifacts using pattern: java-team-archiva-cache/com/rsa/jsafe/cryptoj/5.0/cryptoj-5.0.jar
  Beginning to resolve Build Info published dependencies.
  Finished resolving Build Info published dependencies.
  [Pipeline] }
  [Pipeline] // script
  [Pipeline] }
  [Pipeline] // node
  [Pipeline] }
  [Pipeline] // stage
  Finished: SUCCESS
  </code></pre>
  
  <p>as you can see there is no errors in the output, but still I ant find my jar anywhere.
  I also try to save it under /tmp/ but the result was the same</p>