gmaven alternative?
We have a couple dozen java projects with a maven build and eclipse as IDE. Now I want to add support for groovy in these projects so inevitably I got to the gmaven plugin for the integration. Unfortunately, gmaven seems abandoned for now (no updates to the website and virtually no activity in JIRA).
Considering that groovy, maven and eclipse are mature software and mixed java/groovy projects aren't that uncommon, I would expect to have a solid solution for the integration. I know that some people moved their builds to gradle, but I'm reluctant to 开发者_运维问答make such major change just for adding groovy support to our projects.
So how do the rest of you deal with mixed groovy/java projects in a maven/eclipse environment? What tool chain does the groovy community recommend?
Note: I was somehow able to get gmaven working with groovy 1.8 with the help of some source code fix from the JIRA, but I do not consider this to be a solid strategy for the future.
I had trouble with gmaven when I tried it a few months back, and ended up going with the Groovy Eclipse Compiler plugin for Maven:
Here is a link to my project if you want to see an example POM using this plugin: https://github.com/countvajhula/pilot
HTH
At the time the answer was accepted, that answer was correct. GMaven had not been very maintained and Groovy-Eclipse was the only other alternative (other than calling the groovyc Ant task from Maven). I was frustrated enough by the state of affairs that I took on the maintenance of GMaven for a time.
However, the situation is very different now than it was then, so I felt this question needed updated for new visitors. Groovy-Eclipse is still a perfectly viable option, but many regard GMavenPlus as a more feature-rich alternative. This wiki page will help you understand your options.
ASAIK gmaven is still the preferred plugin for groovy/maven compiling. Maybe it is just stable and doesnt need much more updates and there are very little JIRA issues.
I reluctantly use the 1.3 version of the gmaven plugin. It works well, though I've run into some problems when generating stubs for annotated classes. Fortunately, I don't need to generate stubs in order to compile successfully.
I suspect your experience with Gradle would be much better than Maven for joint Java-Groovy projects.
精彩评论