title: How to run job-dsl-plugin locally with additional plugins
body: <p>We are using the Jenkins Job-DSL plugin for creating a number of jobs and having the actual job-configuration as part of the version-controlled source-code.</p>
  <p>In order to test the resulting XML files locally, I currently use something like the following:</p>
  <pre><code>java -jar /opt/job-dsl-plugin/job-dsl-core/build/libs/job-dsl-core-1.78-SNAPSHOT-standalone.jar create_jobs.groovy
  </code></pre>
  <p>This allows to look at the resulting XML while making changes.</p>
  <p>However some DSL elements are failing in the local build, but still work on the actual Jenkins installation.</p>
  <p>E.g. &quot;batchFile&quot;, &quot;pullRequestBuildTrigger&quot; and a few others.</p>
  <p>As far as I understand these are separate Jenkins plugins which contribute some additional elements to the DSL, so the core job-dsl-plugin does not know about them.</p>
  <p>I tried various ways of adding the code from these plugins to the job-dsl-plugin so that I can run the local transformation, but I could not find a way that actually works. Adding the plugins to job-dsl-plugin, classpath, ... nohting fixed it.</p>
  <p>I also looked at <a href="https://stackoverflow.com/questions/46899830/">How to import and run 3rd party Jenkins Plugin&#39;s extension DSL (githubPullRequest) with Gradle tool locally?</a>, but the suggestions there did not work for me as I do not want to run a local Jenkins instance here.</p>
  <p>So how can I run the job-dsl-plugin manually with DSL from additional plugins being available?</p>