Integrating Groovy into the build process using Maven

Apache Maven ( is a software project build tool that uses the POM (Project Object Model) to describe project artifacts, dependencies, and rules in a declarative form.

Apache Maven was an important milestone in Java build tool evolution. Together with important features such as organized dependency management and declarative build scripts, it also brought a variety of standards and conventions that have been widely adopted by the Java community, even if Maven itself is not used.

In this recipe, we are going to look into how to compile, test, and run a fully blown Groovy project using the Apache Maven build tool.

Getting ready

We are going to re-use the same Groovy project ...

Get Groovy 2 Cookbook now with the O’Reilly learning platform.

O’Reilly members experience live online training, plus books, videos, and digital content from nearly 200 publishers.