The Definitive Guide To Grails Sample Code
Groovy JavaScript Java
Failed to load latest commit information.
Chapter01 Added XML declaration tag to every ivy.xml and ivysettings.xml file May 22, 2009
Chapter02 Added XML declaration tag to every ivy.xml and ivysettings.xml file May 22, 2009
Chapter03 Added XML declaration tag to every ivy.xml and ivysettings.xml file May 22, 2009
Chapter04 Added XML declaration tag to every ivy.xml and ivysettings.xml file May 22, 2009
Chapter05 Added XML declaration tag to every ivy.xml and ivysettings.xml file May 22, 2009
Chapter06 Added XML declaration tag to every ivy.xml and ivysettings.xml file May 22, 2009
Chapter07 Added XML declaration tag to every ivy.xml and ivysettings.xml file May 22, 2009
Chapter08 Added XML declaration tag to every ivy.xml and ivysettings.xml file May 22, 2009
Chapter09 Added XML declaration tag to every ivy.xml and ivysettings.xml file May 22, 2009
Chapter11 Added XML declaration tag to every ivy.xml and ivysettings.xml file May 22, 2009
Chapter12 Added XML declaration tag to every ivy.xml and ivysettings.xml file May 22, 2009
Chapter13-album-art-plugin Added XML declaration tag to every ivy.xml and ivysettings.xml file May 22, 2009
Chapter13-blog-plugin Added XML declaration tag to every ivy.xml and ivysettings.xml file May 22, 2009
Chapter13-simple-cache-plugin Added XML declaration tag to every ivy.xml and ivysettings.xml file May 22, 2009
Chapter13 Added XML declaration tag to every ivy.xml and ivysettings.xml file May 22, 2009
Chapter14 Added XML declaration tag to every ivy.xml and ivysettings.xml file May 22, 2009
Chapter15 Added XML declaration tag to every ivy.xml and ivysettings.xml file May 22, 2009
Chapter16 Added XML declaration tag to every ivy.xml and ivysettings.xml file May 22, 2009
Chapter17 Added XML declaration tag to every ivy.xml and ivysettings.xml file May 22, 2009
graphics take two Jan 12, 2009
plugins released blog plugin into dgg sample plugin repo Jan 12, 2009
README.txt Merge branch 'master' of git@github.com:grails/grails Mar 24, 2009
gtunes-data.xml some sample data Jan 12, 2009
svn-commit.tmp take two Jan 12, 2009

README.txt

The Definitive Guide To Grails - 2nd Edition
--------------------------------------------

This document describes how to get the sample code for "The Definitive Guide to Grails - 2nd Edition" (Apress). The sample application models an online music store called gTunes and is organized by chapter, with each directory related to a single chapter (eg. Chapter01). You will need to the following software installed before you can use the samples:

* Grails 1.1 - Available from http://grails.org/Download (installation instructions can be found the book)
* MySQL - Available from http://dev.mysql.com/

You will need to create databases (or catalogues in MySQL lingo) in MySQL for each chapter that follow the sequence gtunes_ch01, gtunes_ch02 etc. You also need to setup a user account that can access each database with the following details:

* username: gtunes
* password: password

With that done you can run each chapter using the following example steps from a terminal window:

$ cd Chapter01
$ grails upgrade
$ grails run-app

Importing Your iTunes Library
-----------------------------

In some of the chapters you can use your iTunes library as sample data for the application. To do so you can run the following command:

$ grails import-itunes-library ~/Music/iTunes/iTunes\ Music\ Library.xml

If you're on a Windows system the path will likely differ.

Importing Sample Data
---------------------

From Chapter 12 onwards there is also a Gant script that you can use to import some sample data:

$ grails import-library-from-xml ../gtunes-data.xml

Note: The paths to the physical files will probably not be correct for your machine, so playback of tracks that is implemented in Chapter 14 will not work unless you modify the paths.