groovy-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Henrik Martin <hen...@netgate.net>
Subject Building Groovy with Maven?
Date Tue, 19 May 2015 19:19:50 GMT
Hi there. I'm working on a product that consists of a mix of Java and 
Grails 2.X projects, all built with Maven. The Grails code is in the 
process of being migrated to 3.0 and Maven is getting replaced by 
Gradle, but that hasn't happened yet. I'm writing some tools in Groovy, 
and I'm using Gradle to build them. Now I'm in this situation where one 
of the legacy Java projects needs to use some of the new Groovy 
utilities. I solved this by having the Bamboo CI server build a "fat 
jar" of the Groovy code first (using Gradle), and then simply declaring 
the dependency to the fat jar in the pom.xml file in the Java project. 
Certainly not ideal, but the Java project is going away in a few months, 
and as mentioned, Maven is getting replaced by Gradle for the entire 
project, so this is a short-lived temporary kludge (yeah, right...). 
Then I thought that maybe I should just keep a pom.xml file in the 
Groovy project, basically duplicating the dependencies from 
build.gradle, so that I can build the jar produced by the Groovy project 
either with Maven or Gradle. Neither of these solutions are desirable, 
but I can't really think of anything better at the moment.

So, if I were to go down the path of trying to build the Groovy project 
with Maven, it comes down to using either GMaven, or the groovy-eclipse 
Maven plugin (maybe there are other alternatives too?). While searching 
for more info, all I come across are some blog posts and stackoverflow 
articles that are a couple of years old. I guess that means that a lot 
of shops have migrated to Gradle :-)
Anyway, I just wanted to ask if anyone has a good recommendation for 
either. I don't want to spend a lot of time/effort on this, but I'd like 
to know which approach would be the least painful in this situation 
before I do any work on it. It doesn't have to be very future proof. In 
6 months or so, Maven will be long gone.

Apologies in advance if I'm abusing the Groovy Users list for Maven 
related questions, but since I've seen some discussions related to 
Maven/GMaven in the past, I thought I might be forgiven. Thanks,

-H

Mime
View raw message