Keegan Witt | 20 Oct 18:34 2014
Picon

[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 (http://jira.codehaus.org/browse/GMAVENPLUS-33).  I'd appreciate your opinion (even if you don't use GMavenPlus).

-Keegan

Jochen Theodorou | 20 Oct 10:49 2014
Picon

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 
https://jira.codehaus.org/browse/GROOVY-6951, 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 
problem

bye blackdrag

--

-- 
Jochen "blackdrag" Theodorou - Groovy Project Tech Lead
blog: http://blackdragsview.blogspot.com/
german groovy discussion newsgroup: de.comp.lang.misc
For Groovy programming sources visit http://groovy-lang.org

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email

Russel Winder | 17 Oct 20:11 2014
Picon

[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™ ;-)

https://github.com/Groovy-Emacs-Modes/groovy-emacs-modes

--

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

[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 a.bar == 42 assert a.foo == 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 a.bar == null // ... a bit unexpected assert a.foo == 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.

Cheers,
Dinko

Russel Winder | 16 Oct 20:57 2014
Picon

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

Jon,

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
> http://bookboon.com/en/using-concurrency-and-parallelism-effectively-i-ebook

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

> Using Concurrency and Parallelism Effectively – II
> http://bookboon.com/en/using-concurrency-and-parallelism-effectively-ii-ebook
> 
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.

--

-- 
Russel.
=============================================================================
Dr Russel Winder      t: +44 20 7585 2200   voip: sip:russel.winder <at> ekiga.net
41 Buckmaster Road    m: +44 7770 465 077   xmpp: russel@...
London SW11 1EN, UK   w: www.russel.org.uk  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.

 

http://www.eclecticlogic.com/2014/09/26/groovy-dsl-executor/

 

Guillaume Laforge | 14 Oct 14:44 2014
Picon

[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.*
import org.codehaus.groovy.scriptom.tlb.office.excel.*

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 org.codehaus.groovy.scriptom.tlb.office.excel? Is it 
something the user has to create?

Regards

John Sampson

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email

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.

Regards

John Sampson

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email

Alain Stalder | 11 Oct 14:18 2014
Picon

[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:

  http://grengine.ch/

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: http://groovy.329449.n5.nabble.com/ANN-Grengine-User-Manual-tp5721453.html
Sent from the groovy - user mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email

Batman | 11 Oct 09:11 2014
Picon

[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 =
this.getClass().getClassLoader().getResourceAsStream("test.groovy");

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: http://groovy.329449.n5.nabble.com/Calling-a-groovy-from-jar-within-the-jar-tp5721426p5721448.html
Sent from the groovy - user mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Gmane