Skip to content

Category Archives: Groovy

Command Line Dictionary Using Groovy WS

Alas, another 15 years has passed since I’ve last posted. This time it was prompted by a fairly simple need: to lookup a word via the command line. Now, I already had a very simple solution to this using WordNet. That is simple enough: sudo apt-get install wordnet Then simply type: wn hello -over You [...]

Gaelyk Chat Bot, Step By Step

Google App Engine’s support for chat is nice, and Gaelyk makes it really groovy. After reading the information about it on the Gaelyk tutorial I thought something must be missing – it seemed like it should be more complicated than it was! Here is what I did, step by step, to get a chat bot [...]

The Thoughtworks Rover Problem – Groovy Edition

I had some down time at work, and set about working on the Rover problem. There are three problems, I chose the middle one to start with. I wrote it in groovy and used the very groovy clibuilder M. Laforge recommended in his comment. I mavenized it to make it easier to share. You can [...]

Developing Grails Apps in Eclipse

This was a post I was planning on linking to; a colleague of mine was going to write a post about it, but he hasn’t yet and I’ve just spent an extra hour trying to get this to work and am frustrated- and so here is the post you’ve all been waiting for. There are [...]

Groovy Environment Scripting

Problem: You want to use groovy all the time, but ignorant (but paying) forces keep you writing verbose tedious Java code instead. Solution: Use groovy instead of shell scripts! In large Java development projects, developing in a local environment comes with a maddening list of pulling levers, pushing buttons, and spinning wheels. Many of these [...]

Grails Extended ManyToMany GORM Example

This is a variation on this article. Having never been a big fan of writing XML, I’ll gladly opt for the XML-less version. The first example online I found has some formatting issues and just seems a little hard to follow. My step by step example follows after the jump. Call it the “Grails extended [...]

GORM Relationships in the Grails Console

I’ve just started scratching the surface with Grails. A good starting point seems to be understanding GORM or Grails Object Relational Mapping, which is based on Hibernate3. In looking at the Grails tutorials online, you might be inclined to start using Grails via scaffolding and generating controllers and views. And this is fine, but another [...]

Grails Startup Pain

Grails is a composed of a stack I like, a combination of technologies I’ve enjoyed using over the last few years- Groovy, HSQLDB, Spring, Hibernate, etc. And the whole seems greater than the sum of its parts, so while I’m complaining about it today, I do so knowing that with future releases Grails could really [...]

My Latest Issue with Groovy, Spring, and Hibernate

I started this post about a year ago; I will admit my use of groovy has been a little tumultuous, and that’s prevented me from writing much about it. I’ve started a little webapp project – just something simple at first, to get back into doing the type of work that I enjoy doing (as [...]

Groovy CLIBuilder In Practice

Ok, it doesn’t get much easier than this to build a CLI: class ContentUpdaterMain { static void main(args) { def cli = new CliBuilder(usage: ‘java -jar contentupdater.jar -su[dh] “update name”‘) cli.h(longOpt: ‘help’, ‘usage information’) cli.u(longOpt: ‘update’, ‘update the provided table’, args: 1) cli.s(longOpt: ‘stage’, ‘stage the provided table’, args: 1) cli.d(longOpt: ‘debug’, ‘run the process [...]