Community of Groovy programming language users
See all
Members (3,087)
Guillaume Laforge's profile photo
Cédric Champeau's profile photo
Pavan Kumar Kundagol's profile photo
Jörg Rech's profile photo
廖彦's profile photo
Hubert Klein Ikkink (mrhaki)'s profile photo
Oxygen X's profile photo
Stéphanie MOALLIC's profile photo
Aleksandar Bozic's profile photo
Skills Matter's profile photo
Francesco Orciuoli's profile photo
Damian Sińczak's profile photo
Arvind verma's profile photo
Wubstr's profile photo
ADALBERTO ANTONIO's profile photo
Richard Mutezintare's profile photo
Edward Dushak's profile photo
Willie Spears's profile photo
Eric Li's profile photo
Cuong Nguyen's profile photo
gerhard aschauer's profile photo
Leslie Viviani's profile photo
Brian Burnett's profile photo
Al Baker's profile photo


Join this community to post or comment

virtual dogbert

Discussion  - 
The next B2GS meetup for 1/26/2017:
Presentation Overview: As developers we hate magic, unless someone shows us how the magic works. In this presentation I'm going to show you behind the curtain of meta-programming, so that you don't see it as magic, but as just a different way to program(OOP, functional, meta etc). Just like with any other way of programming, there are times where it is appropriate to use meta-programming and times when it is not. After this presentation, my hope ...
Add a comment...
I want to reduce the uploaded image file size and convert that to store in server, as thumbnail, and when I retrieve that one that should show the original image file not thumbnail .

Can anybody help me out , about this ?
Richard Vowles's profile photo
That's just standard Java, you will find the answer on stack overflow
Add a comment...
I am looking to use Allure reports in a Groovy project. Allure uses @Step annotation and AspectJ to create a nice nested steps report. Groovy does not support AspectJ. I believe it is possible to wrap a method call using AST.
1. There is an example on the Groovy site, the problem is it is simply adds the last statement to the method, and it may be never reached.
2. I would like to wrap all public method of all superclasses of a certain class. How can I do it without annotating all methods?
3. Ideally, I would like to log step method`s source code also.
Add a comment...
Hello. I think about use spring context (autowired) in my groovy test E2E , but I'm not sure it possible for groovy script (in this place I want to autowired some object) ? Someone do that ? I will I will be grateful for help

Add a comment...
I have 800+ Unit test cases in my Grails application.I'm using grails.version=2.4.4 my Grails App

Below are the few LOC from Run Configuration of Groovy unit test cases


I'm running this application on Ubuntu Machine.

Sometimes , while running the test cases, It is giving me Out Of Memory error.

I took Sampler & Profiler(VisualVM) Memory Test Analysis, but they could not help much.

Also in each test case groovy class , I'm using @Before & @After annotation to reduce Permanent Generation.

Is there anything I'm missing? I want to reduce Perm Gen & to get rid of Out Of Memory error permanently.

Thanks In Advance !!
Charanjit Singh's profile photo
Yeah u r right ( more permgen and more Xmx will def help) but I still want to go with more feasible solutions.
Something like:- Forcefully deleting Perm Gen Or Forcefully GC after 400 test cases !!
Add a comment...
Which version of Grails you are using in Prod ?
60 votes  -  votes visible to Public
Grails 1.x
Grails 2.x
Grails 3.x
I don't Grails!
Add a comment...
Why you choose Groovy over Kotlin?

I known that one of reasons is ecosystem (like Grails), but Kotlin can use Spring (I am not sure). Is that only reason? 
Artur Wójcik's profile photoIbrahim HALOUANE's profile photo
I choosed groovy after learning scala for theses reason:
1- it has Java-Like syntax
2- Learning curve is short
3- It has both static and dynamic paradigm
4- Great ecosystem (grails, gradle...)
whereas Kotlin doesn't provide much more, and its still fresh and not ready for production IMHO.
Add a comment...
Is this where we can post questions about Groovy?
Apache Groovy's profile photo
The best place is the Groovy mailing-list: - The Groovy programming language - Mailing-lists
Add a comment...
What Groovy have that kotlin haven't?
Michael Kimsal's profile photoIbrahim HALOUANE's profile photo
Hi, as other people said, both dynamic & static coding style, ecosystem and better docs and support are sufficient for me.
Add a comment...

About this community

Groovy is a powerful programming language for the Java virtual machine, supporting dynamic and compile-time metaprogramming features, a streamlined and readable syntax, and offers static type checking and static compilation capabilities.
Hello everyone.

I'm considering to use Groovy as the primary language at the company I work. I'm thinking that Groovy is the perfect language for the company but I need to know how big is the community support of the Groovy project. I can't use a language that can be dead in 10 years and I don't know if this is the case of Groovy.

Could you help me with this?
Kent Damgaard's profile photoCanadian Tracks's profile photo
Groovy is great. But I would never use it as a primary language because it is hard to debug and too type-flexible.

Groovy is great for scripting, quickies, templates, and more. But it falls down when used as a replacement for Java/C#/.Net/etc.

I love Groovy but would use it only as a supplementary tool.
Add a comment...
I've got a problem that I can't solve no matter what I try. I have Java library with function that accepts `double` as a parameter. Now I call it from groovy and if the parameter is like `1.1` everything works fine. But if the parameter is `1.0`, I get `ClassCastException` because groovy converts the number to Integer internally and Java can't cast Integer to Double. Explicitly casting the number to double does not help since groovy performs the cast somewhere between groovy and java code.

Is there a way to solve this problem?
Alexander Nozik's profile photo
Found it: - groovy-core

The power does some black magic with type conversion. This behavior is not obvious from documentation and it seems to me rather bugged. I will probably fix it by overriding static extension for Number.
Add a comment...
Hello everyone, someone got to use successfully Grails-Atmosphere-Plugin?
here is my attempt:
grails-atmosphere - Grails adapter for atmosphere
Add a comment...
Facing issue to generate the XMLas output, How should I create a XML output where XML as a input using Groovy ?
Add a comment...
What is your preferred IDE for Groovy/Grails development ?
(if you use something else can you tell us which one?)
85 votes  -  votes visible to Public
Intellij IDEA
Code Editor (which one?)
Emmanuel Rosa's profile photoJohan Erlands's profile photo
Add a comment...

Rajendra Prasad

Discussion  - 
Can any one provide me script to convert fixed length file to CSV
Rajendra Prasad's profile photoGergely Szabó's profile photo
Okay. so this might work:

groovy:000> new File("/tmp/test0.txt").text
===> FOO1234AAA

groovy:000> new File("/tmp/out.csv") << ((new File("/tmp/test0.txt").getText().split("\n").collect{line-> [line[0..2],line[3..6],line[7..8]]}).collect{mbers->mbers.join(',')}).join("\n")
===> /tmp/out.csv
groovy:000> new File("/tmp/out.csv").text
===> FOO,1234,AA

Add a comment...
I created a script to send email with attachments. It runs and compiles just fine BUT I cannot locate the compiled file
Graham Kelly's profile photoEric Godineaux's profile photo
Yes, it's a script and Im trying to use it in Oracle EDQ.
Add a comment...

Edmond Kemokai

Discussion  - 
Hello Groovy Users/Devs,

I am the developer of Hivemind ( It is a web application platform for building apps using dynamic languages like Groovy.

You can try a live demo @
login: developer/developer

Please play nice, you have full system access :)

It supports a bunch of languages that have been ported to the JVM (Python, Groovy, Ruby, Javascript, Closure..etc). It has a lot of interesting ideas that I think you'll enjoy exploring.

The full product and source code is available for download on our site, including rich documentation.

This platform is different from traditional options out there in two key ways:

1) It is a completely integrated solution that combines an application server (jetty), a Middleware and a browser based IDE. You simply start it and get to work building applications.

2)It is designed for dynamic languages and is based on JSR-223. This means you can use these dynamic languages on the JVM with ease to build standard Java web applications. In fact the back-end of the IDE is built completely in Groovy via JSR-223 scripting, in other words the product is self referencing and uses its own constructs in its own construction.

I want to share with the community and hope to get some helpful feedback. Happy to answer any questions.
Ibrahim HALOUANE's profile photoEdmond Kemokai's profile photo
Thanks again for the feedback Ibrahim!

I am very much familiar with Cloud9 (and IDEs in general). Some (or many) of the missing features in HiveMind are a deliberate design choice I made.

HiveMind is not really designed to compete with traditional IDEs like Cloud9,Eclipse,IntelliJ...etc...The key innovation in HiveMind is the Middle-ware and its integration into the IDE....The aim is to create a business application platform that moves far ahead of merely letting you play tricks with code in a text editor....This is probably not music to the ears of most developers given that the text editor is preeminent in the mind of most developers, but I think that is a result of a lack of imagination in the design of many of the current generation IDEs and frameworks...

HiveMind has some very forward thinking ideas that is not obvious if you just take a glance at it, which is of course a challenge I have to figure out a way to overcome :)

The good thing is that the product is built on itself and you can hack the text editor to do whatever you want. There is no nice API mechanism yet for hacking but the option is there nevertheless.

I am happy to give and anyone else a demo session of the platform. 
Add a comment...
Hi Guys and Gals,

Groovy/Java question.
How can I make the below method:
- public void log_something(String someText)
to be restricted only to be used with Constant String literals?

I.e. allowed:
- log_something("some text here")

Not allowed:
- log_something("some dynamic text"+someOtherTextVariable)

It should be compile-time check. Ideally without AST.
Colin Harrington's profile photoAnton Pryamostanov's profile photo
To: Virtual Dogber, wow its amazing article out there. Thanks a lot!
To: Colin Harrington: This is good approach, but I want it to be independent of build environment, because library will be published as open source and even possible other people might use it.
Add a comment...
TL;DR: Be aware that the every() method will return true when used on an empty collection, which is a bit counter-intuitive.
A place for me to share my thoughts, my experiences, and my projects with other people.
Arthur Shagall's profile photoJesper Steen Møller's profile photo
I wasn't surprised, given that Groovy and Ruby's behaviour is consistent with universal ("for-all") quantification, i.e. ∀. See
Other languages agree, e.g. C++ std::for_all and Python's all().
Add a comment...