Why another Groovy compiler for Maven? What about GMaven?
There are several benefits that the compiler plugin provides over GMaven, but at the same time it has a few limitations. First, the benefitsGMaven 2.0 and later no longer supports compilation. You can read more about this on the GMaven 2 project page. GMaven 1.x is now deprecated.
GMaven 1.x had limitations over the groovy-eclipse-compiler and for the following reasons GMaven 2.0 compilation is no longer supported:
- The compiler plugin does not require the creation of Java stubs so that your Groovy files can compile against Java files. This will prevent some arcane compile errors from appearing.
- The Groovy-Eclipse compiler is the same inside Eclipse and inside Maven, and so configuration across the two platforms can be simplified.
- The compiler plugin is a standard compiler plugin for Maven. It therefore follows all allows all the same standard configuration that the Javac compiler plugin uses. This makes it simpler to introduce Groovy into an existing Maven project. All you need to do is change the compiler plugin that the pom references.
There are still some limitationsreasons to use GMaven:
- GroovyDoc tool is not supported because the compiler plugin does not produce stubs.
- Groovy Mojos are not supported.
- Groovy scripts cannot be executed in your poms.
- Groovy compiler options are not passed through to the compiler.
defaultScriptExtensioncompiler option is not supported.
Whether or not the Groovy-Eclipse compiler plugin for Maven is appropriate for your project will depend on your requirements.