jenkinsci/job-dsl-plugin — pull request #28 by daspilker (2013-02-19 13:25:55+00:00)
Title: Added support for Maven job type

As promised in the Google Group, here comes initial support for the Maven job type.

I added an arguments map parameters to the job element. Currently only the `type` argument is checked. If it is set to `maven`, the job type is changed to a Maven project. I added 7 new top level elements which can only be applied for Maven jobs. These are implemented in the new `MavenHelper`. Maven jobs have more options, but I did not need to change them for now, so I did not implement them.

Here is an example of a Maven job:

job(type: maven) {
...
rootPOM 'my_module/pom.xml'
goals 'clean verify'
mavenOpts '-Xmx1024m'
perModuleEmail false
archivingDisabled true
runHeadless true
ignoreUpstreamChanges true
...
}

All other existing elements can be applied to Maven jobs as well, but it must not have steps (builder elements), so I changed the `StepContextHelper` to cause a failure when steps are applied to Maven jobs.

This pull request is compatible to existing job scripts.