groovy

I refactor my code and I am looking for a solution to grep my source files for something like
if ( user && user.name && user.name.length() < 128 ) ...
in order to replace it later with ruby's andand or groovy's ?. operator (safe navigation operator).
...

I'm implementing a program which utilizes Groovy as scripting engine offering users the possibility i.e. to automate tasks. Hence scripts have to be loaded on demand, which I achieve with the following code:
// short version, try/catch and error handling skipped
String[] roots = new String[] { "data" };
Binding binding = new Binding();
...

I have to ship some groovy code to some users that have only java installed (no grooy, no $groovy_home, etc). I'm trying to invoke groovy from the commandline but I'm having no luck. Here's my bat file:
java -classpath .;lib;bin;bin-groovy introspector.AclCollector
And here's my exception:
Exception in thread "main" java.lang.NoClass...

I started dabbling in groovy yesterday. There's an example on the groovy website that I understand but I would like to know more about why it works the way it does. What's confusing me is who[1..-1]. Is this like saying who[1..who.length()-1]? I can't find any documentation on this syntax.
Are there any good groovy tutorials out ther...

The ProxyMetaClass and Iterceptor classes for intercepting arbitrary Groovy method calls is well documented. Is there also a way to intercept property accesses? When I try to do this by intercepting "getProperty", I still get the error message:
groovy.lang.MissingPropertyException: No such property: foo
...

How can I reference a Groovy domain class from Java class using Eclipse?
I've put my domain class in package:
package com.me.myproject
public class Person {
String name
int age
}
Then in my Java class I attempt to reference com.me.myproject.Person. This works for grails run-app (command line) but not Eclipse. Eclipse can't re...

I did a grails clean and afterwards when I run via grails run-app the app never starts and the following is repeatedly displayed (goes on forever, stuck in some kind of loop).
I'm running Grails 1.0.4, Java 1.6 on Windows XP.
Grails is somehow stuck in an invalid configuration. Any idea how to restore it?
[groovyc] Compiling 3 sourc...

Hello everyone,
I want to develop a web application (no frameworks) mixing java with groovy. I am using the IDE Netbeans with the plugin.
If I start a new Java SE project and add a groovy class, it works with no problems.. but when I create a new java EE project and add a groovy class it can't compile and shows me the following error:
...

I'm trying to mix-in a class in my Groovy/Grails app, and I'm using the syntax defined in the docs, but I keep getting an error.
I have a domain class that looks like this:
class Person {
mixin(ImagesMixin)
// ...
}
It compiles fine, but for some reason it won't work. The file containing ImagesMixin is located in my /src/groovy/...

There are essentially 2 places to define JavaScript functions in Grails, directly in a element on the GSP, and within a separate javascript source file under /web-app/js (for example, application.js). We have defined a commonly reused javascript function within application.js, but we also need to be able to generate parts of the functio...

I'm doing my first experiments with Grails and am looking for a way to have fields represented by a combobox (such as one-to-one domain associations and numbers with a narrow range constraint) to be optional, i.e. there should be an empty entry in the combobox.
How can this be achieved? I've tried both adding a nullable:true constraint ...

I'm developing a LoB application in Java after a long absence from the platform (having spent the last 8 years or so entrenched in Fortran, C, a smidgin of C++ and latterly .Net).
Java, the language, is not much changed from how I remember it. I like it's strengths and I can work around its weaknesses - the platform has grown and decidi...

I have a "Set" that I need to use the findAll closure upon. The Set contains objects, not just primitive values. For instance... I have a Set of Employee objects and I need to iterate and grab elements of that Set of Empolyee Objects by attributes of the Employee.
For some reason the findAll closure seems to be just ignore my close and...