Siegfried's Blog

2009-03-09

Grails version auto-detection

I've implemented a little helper script that helps being more productive when working with multiple Grails versions. If the current working directory is a grails application, the scripts detects the version (via application.properties), sets the GRAILS_HOME environment variable and executes the appropriate Grails executable.

#!/bin/bash

GRAILS_BASE=/opt/grails
DEFAULT_VERSION="1.0.4"

ARGS=$@
EXECUTABLE="grails"

if [ -f application.properties ]; then
GRAILS_VERSION=$( cat application.properties | grep "app.grails.version=" | sed -e "s/^.*=//" | tr -d '\r\n ' )
echo "Detected Grails $GRAILS_VERSION"
else
echo "Using default Grails $DEFAULT_VERSION"
GRAILS_VERSION=$DEFAULT_VERSION
fi

GRAILS_VERSION_DIR="$GRAILS_BASE/grails-$GRAILS_VERSION"

if [ ! -d $GRAILS_VERSION_DIR ]; then
echo "Grails Version $GRAILS_VERSION is not installed! ($GRAILS_BASE/grails-$GRAILS_VERSION)"
exit 1
fi

export GRAILS_HOME=$GRAILS_VERSION_DIR
$GRAILS_VERSION_DIR/bin/$EXECUTABLE $ARGS

Labels:

2008-12-05

"Show GSP Source" Bookmarklet

It's not a huge improvement, just a simple little helper when you do some GSP debugging in Grails. Just drag the following link to your bookmarks bar and invoke it when you browse a grails application in development mode:

« Show GSP Source »

The Javascript Bookmarklet should then open a new window with the same URL but with the "showSource" parameter appended so you can see the generated Groovy Code.

Tested in Firefox and Safari (probably also works in IE).

Labels:

2007-08-08

Switched to Mac :)


My long awaited MacBook Pro 15'' 2.2 GHz finally arrived. It's really a pleasure to work with OS X. Everything runs smoothly from the first moment on and works as I expect it to work. I simply love it ;)

There were just a view problems I faced at the beginning, which likely nearly every windows-mac switcher stumbles upon:
Cmd + Q is the command to quit an application, which is at a position, where I habitural typed an @ (Alt + Q) on a windows keyword. After 10-15 times unintentionally killing an application, I think that I got it now ;-)

Here some really recommendable tools I use:
  • VMWare Fusion
    Need it primary for office and to test things on Windows and IE
  • Cyberduck
    Great FTP/SFTP Tool
  • AdiumX
    The leading chat client
  • Marco Polo
    Great when you have different network settings in different locations
  • of course: TextMate

Labels:

2007-06-14

Grails Ext Userinterface

I'm currently working on a plugin for the Grails Web Framework. It's called "Grails-ext-ui" and can be used as an instant administration interface for the domain model. Based on the great Ext Javascript Library and my previous work, the Grails Converters Plugin it provides basic CRUD functionality like the classic Grails Scaffolding, but in a dymamic way without the need to generate anything. It is not really extensible, but it has some options to configure it and it leverages some constraint options of domain class properties (widget etc.).
















I have set up a live demo:
http://dev.puchbauer.com/extui/extUi (Demo already down)

Have fun!

Labels: ,