jim northrop | 29 Aug 15:38 2014

[groovy-user] Live update of Groovy Documentation

My understanding at the moment is that groovy documentation is
generated as static content with no persistance store behind it. Does
anyone know if we have any plans to make our groovy docs more
wiki-like in that they can be edited/amended by the reader ?

several other sites offer this feature. It just seems a little
dangerous to me as some potential changes might not reflect reality or
be reviewed by people who know more and might lead future readers

what do ya think ?


To unsubscribe from this list, please visit:


efim | 27 Aug 18:17 2014

[groovy-user] Eclipse-Groovy plugin refactor questions

Hello guys,

* For some reason the CTRL mouse over does not work always in eclipse,
instead of highlighting   and jumping to the deceleration nothing happens
* How can I create a new method from method declaration, for example ctrl-1
on foo("test") will create a new method with a string as a parameter.

I'm using Kepler with Eclipse-Groovy plugin version 2.9

View this message in context: http://groovy.329449.n5.nabble.com/Eclipse-Groovy-plugin-refactor-questions-tp5721059.html
Sent from the groovy - user mailing list archive at Nabble.com.

To unsubscribe from this list, please visit:


Maarten Boekhold | 26 Aug 13:01 2014

[groovy-user] Groovy-Eclipse and non-custom .groovy file extension

Hi all,
I'm working with an internal framework that uses groovy scripts to implement custom behaviour. For some reason, the developer of this framework has decided that the file extension of these scripts should be ".box". This makes editing the scripts inside Eclipse a bit hard, because they are not recognized as groovy scripts/classes, and as such we don't get syntax highlighting, auto-complete etc.
Is there a way to register "custom file extensions" in Eclipse/Groovy-Eclipse so that they are actually treated as groovy scripts inside Eclipse?

--------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email

Tomas Salazar | 26 Aug 04:29 2014

[groovy-user] Spock mocking class with annotated methods

I am trying to create a Mock on an interface that have annotated methods, but when getParameterAnnotations() is invoked over the Mock it's returning and empty nested array of length zero.

interface SongsService {
  String get( <at> ApiQueryParam("query") String query)

class RamlApiHandlerTest extends Specification {
  def "Handle with service"() {
      SongsService songsService = Mock(SongsService)
      songsService.get(_) >> { args -> "hola ${args}" }
      def annotations = methods.first().getParameterAnnotations()
      annotations.[0].size() == 1



Todd Bradley | 26 Aug 00:12 2014

[groovy-user] help me stop myself from shooting my coworker in the foot

I'm working on a project that is mixed Java and Groovy. I'm still a Groovy neophyte, but some of the Java code I'm responsible for is used by some Groovy code my coworker Tom wrote. We use the latest Eclipse and the latest Groovy.

Over the weekend, I changed some of my Java code, including changing a method signature for a method that Tom's Groovy code is using. Normally, in an all Java project, I'd know what I needed to fix by looking for red X's in Eclipse. Once everything compiles, I know I fixed all references to that method. But in this case, due to Groovy not being strongly typed, the Groovy code still compiled. It just didn't run anymore, as I found out this morning.

So a few questions:

Is there a name for this type of problem?

Short of running all Groovy code that uses the Java code, what's the best way to learn that I broke the contract that Tom's Groovy code was depending on, so I can fix it before committing my changes?

Does Eclipse provide any tools to make our life easier in this regard?


Batman | 25 Aug 12:06 2014

[groovy-user] Adding features to the Old Java code base using Groovy MetaProgramming

This is the problem we have in our hand. 

We have our own framework, which allows running test cases parallel. Its an
legacy Java code base. Now there is a requirement needed for getting logs
for the parallel running cases. Rather than touching the code base, we
thought we will add some additional features to the classes using
MetaProgramming so that they log properly .

We need the logs like:

1. Entering the method calls. 
2. Leaving the method calls. 
3. And custom user logs too. 

Any Groovy ideas from community can help us doing this. 

View this message in context: http://groovy.329449.n5.nabble.com/Adding-features-to-the-Old-Java-code-base-using-Groovy-MetaProgramming-tp5720990.html
Sent from the groovy - user mailing list archive at Nabble.com.

To unsubscribe from this list, please visit:


sterg | 23 Aug 15:23 2014

[groovy-user] Apache Common Maths integrated with GroovyLab

Hi all,

I liked much the Apache Common Maths open source library, it covers a 
wide range
of numerical software.

Thus, I embedded its source within the GroovyLab sources and I perform
automatically imports of the Apache Common Maths classes,
using the Groovy compilationCustomizer.

.. I think such an approach is much convenient,
but I like to consider other opinions ...

Best Regards


To unsubscribe from this list, please visit:


Batman | 23 Aug 13:33 2014

[groovy-user] Decrease the running time using Gpars.

I'm trying to use Gpars in my code base. Currently I have the following code:


The withPool where I have these lines:

                   it.getText().contains("some string")

doesn't look like it running in parallel. Both parallel and non parallel
mode takes the same time. In fact parallel mode takes a bit more time. How
do I optimize this with gpars?

View this message in context: http://groovy.329449.n5.nabble.com/Decrease-the-running-time-using-Gpars-tp5720976.html
Sent from the groovy - user mailing list archive at Nabble.com.

To unsubscribe from this list, please visit:


Robby O'Connor | 22 Aug 22:42 2014

Re: [groovy-user] RE: Using groovy in a JEE project

I used to rewrite everything I could in groovy...it introduced some sexiness into my code.

On Aug 22, 2014 3:48 PM, "Mark Fortner" <phidias51-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
The other area where I see people getting their feet wet with Groovy, is using Gradle to build their Java projects.  But as other's have mentioned, it's pretty simple to add Groovy classes to a Java application.  There was another thread a couple of months ago which discussed how to introduce Groovy into a Java shop, and that may give you some additional ideas.  AFAIR they recommended taking a class, rewriting it in Groovy, and asking everyone which they would prefer to maintain.



On Fri, Aug 22, 2014 at 11:47 AM, Robby O'Connor <robby.oconnor-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:

There's maven and ant support to compile groovy to bytecode so it would seem trivial...I've done it myself.

On Aug 22, 2014 2:36 PM, "Winnebeck, Jason" <Jason.Winnebeck-IRWwtvOg6Jva8LdYqivX5Q@public.gmane.org> wrote:
Where did you get that groovyReset.jar, and does it still work against the latest Groovy? I'm not able to reload Groovy code in DCEVM, and I'm using IntelliJ so I'm using its "gragent". I didn't start using DCEVM until recently so I don't know if I'm running into a bug or just my expectations are too high, but it's been encouraging me to write more code in Java recently, or maybe better said, it's encouraging me to not migrate more new code over to Groovy in a mixed Groovy/Java project.


-----Original Message-----
From: will_lp [mailto:will_lp-DaQTI0RpDDMAvxtiuMwx3w@public.gmane.org]
Sent: Friday, August 22, 2014 1:26 PM
To: user <at> groovy.codehaus.org
Subject: [groovy-user] RE: Using groovy in a JEE project

Hey there. I've worked in a couple of projects with mixed Java/Groovy. One of them was a legacy java web project (jboss seam) which we threw Groovy for BigDecimal calculation, at the beginning, but ended coding way more XML/JSON parsing and building in the long run.

Integration was pretty plain in eclipse; added groovy-eclipse plugin, groovy-all jar, groovyc in ant, and we were ready to go. Management showed resistance at the time, but allowed some small features into production, which worked, were easier to read (i.e. BigDecimal operator overload), faster to code, and they got more receptive. I never had time allocated to work on a presentation to my colleagues, and i guess it was part due to resistance to changes, but I always tried to show some Groovy to my coworkers whenever i could. I never 'pushed' it and never tried to diminish Java, which would trigger resistance, but was more like: "Yes, in Java it is that way. Also, if you are interested in writing it in Groovy, it turns into this" and proceed to rewrite 10 Java lines into 2 Groovy yumminess :-).

By the time i changed jobs, all new XML building/parsing code was being written in Groovy. Also the manager (which coded sometimes) was writing Groovy code and started to recognize that dynamic typing had its place, even though he was a static-typing-zealot. Note these were Groovy 1.7 times.

A more recent project was a mixed Java/Groovy Java EE 6 with Web, EJB and EJB client modules on top of JBoss AS 7. Again, groovy-eclipse, groovy-all jar and ant's groovyc. There were no secrets, really, we just coded and it just worked :-). Our stack had JSF 2, Primefaces, CDI, Hibernate, a bunch of REST webservices with JAX-RS and Groovy 2.1. Most of our classes were
( <at> TypeChecked) Groovy, though we had a lot of auto generated JPA entities which were Java and nobody bothered to rewrite in Groovy.

At the beginning we got all of the team in a room, showed our main architecture (heaviliy based on CDI's Conversation scope), opened eclipse and started coding some parts of a feature, just enough to understand how to do the vanilla stuff: get the data, validate, create a service, persist and so. A full feature in a single meeting would be very tiresome, IMHO.

So far there were no Groovy-specific problems, and most of the hard time people are having are due to lack of experience in JSF and, sometimes, Hibernate. It is not very experienced Java developer team. Out of curiosity:
from what i have seen, people new to Groovy love DGM collect() method :-).

For a quicker development cycle we've been using DCEVM with groovyReset.jar.
It works wonders, and jboss needs way less restarts.

There were some more projects with pure scripts approaches and GroovyFX, but i focused on the web ones.

View this message in context: http://groovy.329449.n5.nabble.com/Using-groovy-in-a-JEE-project-tp5720948p5720971.html
Sent from the groovy - user mailing list archive at Nabble.com.

To unsubscribe from this list, please visit:


This email message and any attachments are for the sole use of the intended recipient(s). Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender by reply email and destroy all copies of the original message and any attachments.

To unsubscribe from this list, please visit:


jnorthr | 22 Aug 17:21 2014

[groovy-user] Groovy-core documentation

working on a post to describe how people can donate some time to writing
groovy docs. If you have a few minutes this week-end, would appreciate any
comments on how to improve this doc. Hope to make it easier for everyone to
give something back to the groovy project. 

Since i am not a tech.author, any tips welcome, particularly here: 


many thanx

View this message in context: http://groovy.329449.n5.nabble.com/Groovy-core-documentation-tp5720965.html
Sent from the groovy - user mailing list archive at Nabble.com.

To unsubscribe from this list, please visit:


BytesArray | 22 Aug 12:43 2014

[groovy-user] Using groovy in a JEE project

Hi all,
I'm quite new to groovy, but really like what I saw for now.

My problem is about gathering some specific informations :
how can I start bringing some groovyness in my project which is a
*pre-existing full  JEE  EAR project * (with a war file and two ejbs
archive) ?

I mean my team is full java.

I just can't come around and say "hey fellows , I 've stumbled on this ,
let's use it !"

So i've started looking around for a clear viexw of how :
 can I start using groovy for specific features in order to demonstrate all
it's /"polyvalence" (excuse my French , but i'm french ;-)/
What *architecture *is to be recommended to *mix some .groovy files in my
.java project and make the glue* ?

Other point I will like to introduce groovy will be by building some
*scripting *engine to allow the team to do some runtime script manipulations
: Groovy is dynamic , isn't it ? 
So a good job for it will be to be used for /some /custom user stories where
before that you will be forced to do some java and rebuild the ejb

I can't see no answers to those real questions ?
If you could send me to the good pointers specific to these two issues...

also I don't bought any book on groovy yet because of that as I can't see
any book covering those questions which are mandatory for my case if I want
to bring groovy in my project and convince my mates.
So please, feel free to send me any relevant book;
or  information blog wiki etc. (in english or in french),
any sample project (may be something like this exist on github and I can
take it as a source of inspiration ?)
or only if nothing like this seems to exists/ (don't reinvent the wheel)
/maybe we could start building such sample project ? ( But I can't seriously 
imagine these issues had never been addressed. Ce serait plus que


View this message in context: http://groovy.329449.n5.nabble.com/Using-groovy-in-a-JEE-project-tp5720948.html
Sent from the groovy - user mailing list archive at Nabble.com.

To unsubscribe from this list, please visit: