gmaven 替代方案?
我们有几十个 Java 项目,使用 Maven 构建和 Eclipse 作为 IDE。现在我想在这些项目中添加对 groovy 的支持,因此我不可避免地使用 gmaven 插件进行集成。不幸的是,gmaven 目前似乎已被放弃(网站没有更新,JIRA 中几乎没有任何活动)。
考虑到 groovy、maven 和 eclipse 都是成熟的软件,并且混合 java/groovy 项目并不罕见,我希望有一个可靠的集成解决方案。我知道有些人将他们的构建转移到了 gradle,但我不愿意仅仅为了为我们的项目添加常规支持而做出如此重大的改变。
那么,你们其他人如何在 Maven/Eclipse 环境中处理混合的 groovy/java 项目呢? Groovy 社区推荐什么工具链?
注意:在 JIRA 的一些源代码修复的帮助下,我以某种方式能够让 gmaven 与 groovy 1.8 一起工作,但我不认为这是未来的可靠策略。
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.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
几个月前我尝试 gmaven 时遇到了麻烦,最终选择了 适用于 Maven 的 Groovy Eclipse 编译器插件:
如果您想查看使用此插件的 POM 示例,这里是我的项目的链接:
https://github.com/countvajhula/pilot
HTH
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
当答案被接受时,这个答案是正确的。 GMaven 没有得到很好的维护,Groovy-Eclipse 是唯一的选择(除了从 Maven 调用 groovyc Ant 任务)。我对这种状况感到非常沮丧,因此我一度承担了 GMaven 的维护工作。
然而,现在的情况与那时有很大不同,所以我觉得这个问题需要为新访客更新。 Groovy-Eclipse 仍然是一个完全可行的选择,但是很多都考虑GMavenPlus 作为功能更丰富的替代方案。此wiki 页面将帮助您了解您的选择。
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 仍然是 groovy/maven 编译的首选插件。也许它只是稳定,不需要太多更新,而且 JIRA 问题很少。
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.
我无奈地使用了1.3版本的gmaven插件。它工作得很好,尽管我在为带注释的类生成存根时遇到了一些问题。幸运的是,我不需要生成存根即可成功编译。
我怀疑对于 Java-Groovy 联合项目,您使用 Gradle 的体验会比 Maven 好得多。
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.