gmaven alternative?
Asked Answered
E

4

6

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.

Exstipulate answered 26/7, 2011 at 21:5 Comment(0)
C
5

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

Crystalloid answered 26/7, 2011 at 23:43 Comment(2)
I see. So this is an extension of GRECLIPSE that provides the compilation functionality for cmdline maven. Thanks, I'll give it a try. This is probably the currently recommended groovy/maven/eclipse integration.Exstipulate
Note that we have just upgraded to the 2.5.1-1 version of the groovy-eclispe-compiler (as of 1 hour ago). I'd recommend using that.Rakehell
C
4

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.

Cowpea answered 15/5, 2015 at 19:11 Comment(0)
B
0

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.

Beker answered 26/7, 2011 at 23:18 Comment(1)
I wish that was the case:-) However, A: The current version is 1.3 and the project page hasn't been updated since 1.0. B: There are 39 issues in JIRA with priorty "Major" or higher. C: gmaven does not support groovy 1.8Exstipulate
G
0

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.

Goldenrod answered 27/7, 2011 at 8:45 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.