How are you running the script? It appears that you're using http://grails.org/doc/latest/ref/Command%20Line/run-script.html but that's not for Gant scripts - it's for simple scripts that can access application classes. See http://naleid.com/blog/2010/12/03/grails-run-script-updated-for-grails-1-3-5 for the original blog post about this.
When you create a Gant script, it becomes a regular command like run-app
, create-domain-class
, etc. So you should be running your compile
script as
grails compile
YOu probably shouldn't name scripts the same as ones included by Grails or other plugins. Grails will prompt you to ask if you want to run yours or the pre-existing one, but that's annoying; if you just give it a unique name it will be a smoother process.