Anyone successfully using `dbm-gorm-diff` in Grail...
# questions
p
Anyone successfully using
dbm-gorm-diff
in Grails 6.2.1? I'm using
./gradlew -i runCommand -Pargs="dbm-gorm-diff my-changes-script.groovy --add"
but it's failing with:
Copy code
Error Application class not found
(at least, that's the only 'error' I can see). Grails 6.2.1, Java 17.0.1, project migrated from Grails 4 but based on a clean new-build. The
application
property in
build.gradle
is there and I even added a springBoot
mainClass
property but simply won't run!
I should also note that the app itself runs just fine. It's just the
dbm-gorm-diff
thats failing.
Found a workaround! Saw this thread: https://github.com/grails/grails-spring-security-core/issues/997 with the same issue. Commented out from my `build.gradle`:
Copy code
// developmentOnly("org.springframework.boot:spring-boot-devtools")
Ran my
dbm-gorm-diff
command and it ran through ok. So it's bug in the
spring-boot-devtools
but that's ok - I'll just have to remember to comment it out/back in again each time. 😐
j
It also works from from grails-shell without disabling spring-dev-tools. You can use grail wrapper https://github.com/grails/grails-wrapper/releases/tag/v4.0.1, also an option from start.grails.org
./grailsw dbm-gorm-diff my-changes-script.groovy --add
or IntelliJ Run Grails Command.
dbm-gorm-diff my-changes-script.groovy --add
p
Ah, fantastic! Thanks James!