Could not find org.grails:grails-shell:. Required by: org.grails.plugins:database-migration:4.2.1
Expected Behavior
After using the grails create command to generate an application using database migration, the dependencies should not fail.
Actual Behaviour
When gradle refreshes dependencies, it fails:
A problem occurred configuring root project 'default_grails_620_with_features'.
Could not resolve all files for configuration ':runtimeClasspath'. Could not find org.grails:grails-shell:. Required by: project : > org.grails.plugins:database-migration:4.2.1
Possible solution:
- Declare repository providing the artifact, see the documentation at https://docs.gradle.org/current/userguide/declaring_repositories.html
Steps To Reproduce
- Using the env defined below
- run command: grails create-webapp --features=gorm-hibernate5,mysql,database-migration,grails-gsp,grails-console,asset-pipeline-grails grails_620_default_webapp_with_features
- Open IntelliJ
- open new project from the directory created in step 2.
- notice the error when gradle deps refreshes
Environment Information
Mac M3, 36G, Sonama 14.4.1 IntelliJ 2024.1.1. Ultimate openjdk 11.0.23 2024-04-16 LTS OpenJDK Runtime Environment Corretto-11.0.23.9.1 (build 11.0.23+9-LTS) OpenJDK 64-Bit Server VM Corretto-11.0.23.9.1 (build 11.0.23+9-LTS, mixed mode) Grails 6.2.0
Example Application
No response
Version
6.2.0
This is because Grails 6.2.0 removed grails-shell which is a dependency of grails-database-migration:4.2.1.
This is fixed in upcoming? grails-database-migration:5.0.0.
Related: https://github.com/grails/grails-database-migration/pull/350
Thanks @matrei - What is the approx timeframe for the release of grails-database-migration:5.0.0?
I'm upgrading our production app from 4.x and I was targeting 6.2.0, but if it will be some time before I can use 6.2.0 because of this, do you recommend that I target 6.1.2 instead?
Not sure when grails-database-migration:5.0.0 will be released.
In the mean time you can just add the dependency org.grails:grails-shell:6.1.2 to your project to make it work.
I had done that, but noticed that my project included almost all of the grails 6.1.2 libraries as well:
From the IntelliJ 'External Libraries' for this project:
In this case the app works fine for the most part, but during testing am experiencing a strange issue with the system attempting to auto cast a command object and it is attempting to cast to the incorrect type. Not sure if having two different versions of grails core libs is the root cause. I'll keep investigating. Thanks for the feedback on this issue.
Is this relevant for your issue: https://github.com/grails/grails-core/issues/13486
Tried and prod version is broken. Why don't you publish 6.2.0 to maven repo?
Fixed by #13570 which is included in Grails 6.2.1