Running Ant through Groovy in Maven
Jenkins interacts with an with a wide background. There are many developers who became proficient in Ant scripting before moving on to using Maven, developers who might be happier with writing an Ant task than editing a pom.xml
file. There are mission-critical scripts that still run in a significant proportion of organizations.
In Maven, you can run Ant tasks with the AntRun
plugin (http://maven.apache.org/plugins/maven-antrun-plugin/), or through (http://docs.codehaus.org/display/GROOVY/Using+Ant+from+Groovy). AntRun represents a natural migration path. This is the path of least initial work.
The Groovy approach makes sense for Jenkins administrators who use Groovy as part of their tasks. Groovy, being a first-class programming language, has a wide range of control structures that are hard to replicate in Ant. You can partially do this by the Ant-contrib
library (http://ant-contrib.sourceforge.net). However, Groovy, as a feature-rich programming language...