Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

None of the dbm-scripts are working with grails 6. #346

Open
2 tasks
tircnf opened this issue Feb 1, 2024 · 3 comments
Open
2 tasks

None of the dbm-scripts are working with grails 6. #346

tircnf opened this issue Feb 1, 2024 · 3 comments

Comments

@tircnf
Copy link

tircnf commented Feb 1, 2024

This is a known issue with all grails plugins after the upgrade to 6.

Task List

  • [ X] Steps to reproduce provided
  • Stacktrace (if present) provided
  • Example that reproduces the problem uploaded to Github
  • [ X] Full description of the issue provided (see below)

Steps to Reproduce

  1. build a grails 6 app
  2. include this plugin.
  3. try any script.

Expected Behaviour

scripts should run.

Actual Behaviour

since the grails 6 upgrade, all plugins with scripts need to change to the new methodology.
Documentation needs to be updated.

Environment Information

  • Operating System: any
  • Grails Version: 6.1.1
  • Plugin Version: 4.2.1
  • Database: mysql
  • JDK Version: 11
@RxL-Nikhil-Kanyal
Copy link

@tircnf Did you get any resolution for this issue?

@tircnf
Copy link
Author

tircnf commented May 31, 2024

@RxL-Nikhil-Kanyal -- Not really. we haven't upgraded to 6 yet. I think your choices are to either stick with pre-6 grails, wait for the grails team to upgrade the plugin, or dig in and upgrade the plugin to use the new way grails runs scripts.

@matrei
Copy link
Contributor

matrei commented May 31, 2024

In Grails 6, the commands are available as Gradle tasks, for example:
./gradlew dbmGenerateChangelog -Pargs="changelog.groovy"

If not already present, add runtimeOnly 'org.grails.plugins:database-migration:4.2.1' to buildSrc dependencies to add the Gradle tasks.

Although, to run the database-migration:4.2.1 commands in Grails 6.2.0 you also need to add org.grails:grails-shell:6.1.2 to the buildSrc dependencies of your project, as grails-shell is still needed for 4.2.1 and was removed in Grails 6.2.0. Or use the 5.0.0-SNAPSHOT version of the database-migration plugin where grails-shell is no longer used.

Another caveat when running commands with 6.2.0 is that there is a bug in grails-bootstrap (after the upgrade to Groovy 3.0.21) when running commands. This bug is fixed by grails/grails-core#13472 and should be included in the next Grails release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants