Keegan Witt | 20 Oct 18:34 2014

[groovy-user] Considering renaming some GMavenPlus goals

I recently realized some GMavenPlus goals don't follow the naming convention (the mojo got renamed, but not the goal).  I have no idea how I overlooked this so long.  I'm currently considering renaming
addTestSources -> testAddSources
addTestStubSources -> testAddStubSources
removeTestStubs -> testRemoveStubs

Much as I despise inconsistency, part of me is hesitant to make this change, since it'd mean folks would have to edit their pom after upgrading to get things working again (albeit a small edit).  The only other option I could think of is to extend each mojo using the alternate goal name, which would do nothing but call the parent.  The downside is, this would appear to the user as a clone (but deprecated in the Maven site), and not an alias.  I'm pretty sure Maven has no concept of aliased goals.

I opened a Jira to collect feedback and document the decision (  I'd appreciate your opinion (even if you don't use GMavenPlus).


Jochen Theodorou | 20 Oct 10:49 2014

Re: [groovy-user] Bug Report ? Bad bytecode in MarkupTemplateEngine under 2.3.7 indy / JDK 7.0.50

Am 18.10.2014 13:58, schrieb Dean Jones:
> Sure, it fails on Mac with Java 1.7.0_55 and Linux 1.7.0_67, the basic
> code is in a utility class, Groovy, with  <at> CompileStatic, it was being
> built with the
> groovy-all-2.3.7-indy.jar, built using Gradle 2.0 with the indy compile
> flag set
> tasks.withType(GroovyCompile) {
>      groovyOptions.optimizationOptions.indy = true
> }
> Running in Tomcat 7.0.5X, generated from a REST call
> If I remove the indy libs and the indy compile flag from the entire app,
> and go back to non-indy, it all works as expected, no issues.

The problem is described in, looks like I forgot to put 
1.7u55 on the list too. Anyway... the short story is: this is a JVM bug, 
not a groovy bug. It does not always happen, but we don't really have a 
way around it either. Updating to jdk1.7u72 or higher should resolve the 

bye blackdrag


Jochen "blackdrag" Theodorou - Groovy Project Tech Lead
german groovy discussion newsgroup: de.comp.lang.misc
For Groovy programming sources visit

To unsubscribe from this list, please visit:

Russel Winder | 17 Oct 20:11 2014

[groovy-user] Emacs Modes – news and breaking changes

I have created the GitHub group Groovy-Emacs-Modes holding the
repository groovy-emacs-modes and pushed my Emacs-Groovy-Mode repository
to it, deleted my repository and cloned the new mainline as my new
version. This repository includes groovy-mode, grails-mode, and the
associated bits and pieces. I have created a pull request to MELPA for
an update to the repository location and to include grails-mode as well
as groovy-mode.

I have emailed the owner of the current gradle-mode asking if
collaboration and integration is appropriate. I am hoping the person
says yes.

Anyone interested in helping maintain the Emacs support for all the Gr8
technologies should feel free to contact me off the mailing list, so we
can set up appropriate collaborations.

(Whatever anyone claims, Emacs is the One True Editor™ ;-)


Dr Russel Winder      t: +44 20 7585 2200   voip: sip:russel.winder <at>
41 Buckmaster Road    m: +44 7770 465 077   xmpp: russel@...
London SW11 1EN, UK   w:  skype: russel_winder
Dinko Srkoč | 17 Oct 14:37 2014

[groovy-user] Traits and field assignments as expressions

Hi all,

Consider the following code:

class A { def foo def getBar() { foo = 42 } } def a = new A() assert == 42 assert == 42

The above code works because assignment in Groovy is treated as an expression, so assigning the value 42 to the field foo also returns the assigned value.

Now, let’s make A into a trait and see what happens:

trait A { def foo def getBar() { foo = 42 } } class C implements A {} def a = new C() assert == null // ... a bit unexpected assert == 42

So, what gives?

Using the AST Browser it can be seen that getBar() calls A$Trait$Helper.getBar(this), which in turn calls $self.A_foo$set(42) which returns void ($self is an instance of C) - hence null that getBar() returns.

In this particular case the traits’ semantics differs from the usual Groovy one for assignment. Should this be considered a bug?

Something similar to the above example bit me while I was replacing some <at> Mixins with traits.


Russel Winder | 16 Oct 20:57 2014

[groovy-user] Re: [gpars-user] Using Concurrency and Parallelism Effectively


Apologies for being very late seeing this. Python workshops and
Java/Groovy conferences are my excuses.

On Tue, 2014-09-30 at 09:54 +0000, Kerridge, Jon wrote:
> Hi,
> I have just had published a book, in two parts, on Concurrency and
> Parallelism using the Java CSP libraries with, crucially, Groovy
> helper classes to make them much easier to use.
> These are electronic books, available free, as follows:
> Using Concurrency and Parallelism Effectively – I

I have downloaded this one and will give it a read just as soon as I

> Using Concurrency and Parallelism Effectively – II
This one seems to require some sort of subscription so I'll read the
first part and then see what the deal is.

> The books have support software available from the same web site that
> contains the code of all the examples used and the line numbers in the
> book and the software match making it easy to use the book on an
> e-reader and the software on a workstation.


Dr Russel Winder      t: +44 20 7585 2200   voip: sip:russel.winder <at>
41 Buckmaster Road    m: +44 7770 465 077   xmpp: russel@...
London SW11 1EN, UK   w:  skype: russel_winder
Karthik Abram | 14 Oct 16:47 2014

[groovy-user] Groovy DSL executor - possible improvement to Script class

Hi all,

    I’ve wrote up a blog on creating Groovy DSLs by redirecting methodMissing and propertyMissing on the Script object so that one can supply a script and a “handler” that provides the method, property and closure definitions used in the DSL. The technique is simple enough to where I think inclusion in the groovy.lang.Script class may be beneficial.


Guillaume Laforge | 14 Oct 14:44 2014

[groovy-user] [ANN] Groovy Weekly #40

Hi all,

Here's a round number of Groovy Weekly, with the fortieth edition:

Enjoy and keep'on groovy-ing!

Guillaume Laforge
Groovy Project Manager
Pivotal, Inc.

John Sampson | 14 Oct 13:17 2014

[groovy-user] Scriptom

I am aiming to use Scriptom to program a proprietary program that has a 
command interface based on an ActiveX DLL.
The author has tested this with VB6 but no modern programming language.
First I tried interfacing it with Python. This works well in 64-bit 
Windows but not 32-bit Windows so I am looking at alternatives.
Groovy might be feasible if there is a way of using it simple enough for 
me to understand.

I am new to Java, Groovy, COM and Scriptom.

To start, I tried to see if I could get Scriptom to work with Excel 
since this is well-known software.

I found a Groovy script file that starts:-

import org.codehaus.groovy.scriptom.*

def xls = new ActiveXObject("Excel.Application")

When I run this with Excel 2007 running, there is an error message 
"unable to resolve class ActiveXObject  <at>  line 4, column 11".

This is a fairly obvious showstopper - can Scriptom really interface 
with Excel? What is Is it 
something the user has to create?


John Sampson

To unsubscribe from this list, please visit:

John Sampson | 11 Oct 19:04 2014

[groovy-user] Installing Groovy on Windows 8 32-bit

Hello -

I am a newbie to Java and Groovy development.

I have installed the current version of JDK (8u20) to the "Program 
Files" folder, which is where it goes by default.

I have changed the environment variables to a point where the Groovy 
shell runs but when I exit from it I see the error message 'Unknown 
command "C:\Program"'. From this I assume that either Groovy or the JDK 
does not know about spaces in folder names which is an unfortunate 
feature of Windows.

What should I change in the installation, either of the JDK or Groovy?

I am also a newbie to this mailing list, so please excuse me if I 
transgress any rules - I have not received any details how to use this list.


John Sampson

To unsubscribe from this list, please visit:

Alain Stalder | 11 Oct 14:18 2014

[groovy-user] [ANN] Grengine User Manual

There is now a quite extensive user manual for Grengine,
from the basics and performance when running individual
scripts via using Grengine as a script container to the
nuts and bolts of Grengine as a framework:

Possibly also interesting for anyone interested in some of
the "inner workings" of the GroovyShell, GroovyClassLoader
and GroovyScriptEngine, because I compare design choices
and their impact to some degree in the manual.

I hope you will have fun with Grengine and that it will
allow you to make things with Groovy that are yet unseen!

Alain Stalder

Grengine is an engine for running and embedding Groovy in
a Java VM.

View this message in context:
Sent from the groovy - user mailing list archive at

To unsubscribe from this list, please visit:

Batman | 11 Oct 09:11 2014

[groovy-user] Re: Calling a groovy from jar, within the jar.

Thanks. But Again I have some problem loading it as resource streams:

InputStream in =

But this fails, as it fails to load the test.groovy file. 

I tried printing all the classes that are in the classpath, but sadly
test.groovy is not there. But I can see test.class. 

Any reason, why this is happening so?

View this message in context:
Sent from the groovy - user mailing list archive at

To unsubscribe from this list, please visit: