I am trying to add groovy to an existing Java Maven project that leverages Lombok. Unfortunately when I enable the groovy-maven-eclipse compiler with the pom fragment below,
@Todd: The groovy-eclipse-compiler is the best choice if you don't need to developp maven plugin with some groovy tooling (see http://groovy.codehaus.org/Groovy-Eclipse+compiler+plugin+for+Maven).
@Ambience: you reached the issue related at http://jira.codehaus.org/browse/GRECLIPSE-1293. This bug is now fixed with latest groovy-eclipse-compiler 2.6.1-01-SNAPSHOT.
Note: The latest version available is now 2.9.1-01, see http://docs.groovy-lang.org/latest/html/documentation/tools-groovyeclipse.html
You have to modify your pom like this:
maven-compiler-plugin
3.1
groovy-eclipse-compiler
true
true
lombok.launch.Agent
org.codehaus.groovy
groovy-eclipse-compiler
2.9.1-01
org.codehaus.groovy
groovy-eclipse-batch
2.3.7-01
org.projectlombok
lombok
1.16.4
The mandatory parts:
true
lombok.launch.Agent
The added dependency on lombok inside the maven-compiler-plugin
Edit: update versions