title: publishing to Artifactory from Jenkins Pipeline
body: <p>I'm trying to publish to an Artifactory (v4.5.1) instance using a Jenkins(v2.7) pipeline.  An excerpt from my script is below.  Problem seems to be that the "Artifactory" object is not recognized and is treated as a string. Can someone suggest what the problem might be?</p>
  
  <pre class="lang-java prettyprint-override"><code>node {
   //error - "Artifactory" treated as String 
   def server = Artifactory.server SERVER_ID
  
    def uploadSpec = """{
      "files": [
              {
                  "pattern": "hello-pipeline/build/libs/*.jar",
                  "target": "jenkins-local"
              }
          ]
      }"""
  
    def buildInfo1 = server.upload spec: uploadSpec
  }
  </code></pre>