I use Grails 2.3 and the Grails database migration plugin (1.3.6).
When I do grails dbm-update I get the following error. How can I solve this error?
So if you are finding this because your scripts are broken by 2.3.x here is what I discovered about the problem in general. I still can't use run-script because it always fails with the dreaded TomcatPlugin missing problem (I suspect this means run-script is always trying to bootstrap grails irregardless). However, I can get the scripts to compile and run as tasks. My scripts would always fail because I had bootstrapped grails using the following method:
includeTargets << grailsScript("_GrailsInit")
includeTargets << grailsScript("_GrailsBootstrap")
includeTargets << grailsScript("_GrailsClasspath")
target(main: "Generate a secret key to be used with HMAC and AES algorithms") {
depends(bootstrap) // this is problem
}
All of that is from the docs that say to do that. However, depends(bootstrap) is broken badly in 2.3.x which is apart of the whole fork feature debacle (yes it was not well thought out).
Since I got so lucky and my scripts don't really have to fully bootstrap grails I could do the following and it worked just as well:
includeTargets << grailsScript("_GrailsInit")
includeTargets << grailsScript("_GrailsBootstrap")
includeTargets << grailsScript("_GrailsClasspath")
target(main: "Generate a secret key to be used with HMAC and AES algorithms") {
depends(parseArguments) // this is not problem
}
And viola it started working again. Well working-ish. Here is what works vs doesn't work:
$ grails GenerateSecretKey // yay works
$ grails run-script GenerateSecretKey // doesn't work
Here are some Jira issues about this problem(s) so you'll know when all of this is wrong ;-)