title: Jenkins: Accessing other plugins from Active Choices Parameter groovy script
body: <p>I'm quite new to Jenkins, Groovy and all that, so forgive me if this sounds dumb. 
  I'm using the Active Choices plugin, and from one of the AC Parameters inside the Groovy script I want to use a different plugin - Artifactory, to fetch a file and display each line inside it as an option. </p>
  
  <pre><code>try {
      def server = Artifactory.newServer url: 'http://localhost:8081/artifactory/', username: 'user', password: 'pass'    
      def downloadSpec = """{
          "files": [
              {
                  "pattern": "example-repo-local/file.txt",
                  "target": "example/"
              }
          ]
      }"""
      server.download(downloadSpec)
  
      String text = readFile("example/file.txt")
      return text.tokenize("\n")
  } catch (Exception e) {
      return [e]
  }
  </code></pre>
  
  <p>However, the Active Choices Parameter doesn't seem to recognize other plugins, and it can't find the Artifactory property:</p>
  
  <pre><code>groovy.lang.MissingPropertyException: No such property: Artifactory for class: Script1
  </code></pre>
  
  <p>My question is - do I need to import the plugin somehow? If so, how do I determine what to import?</p>
  
  <p>There is an option to also specify an "Additional classpath" near an Active Choice Parameter, but the plugin contains 75 jar files in its WEB-INF/lib directory. (just specifying the artifactory.jar one doesn't seem to change anything)</p>
  
  <p>Just a note - the Pipeline recognizes the Artifactory plugin and it works fine - I can successfully connect and retreive a file and read it.</p>