grails-core icon indicating copy to clipboard operation
grails-core copied to clipboard

Could not find org.grails:grails-shell:. Required by: org.grails.plugins:database-migration:4.2.1

Open rick-boardontrack opened this issue 1 year ago • 5 comments

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

  1. Using the env defined below
  2. run command: grails create-webapp --features=gorm-hibernate5,mysql,database-migration,grails-gsp,grails-console,asset-pipeline-grails grails_620_default_webapp_with_features
  3. Open IntelliJ
  4. open new project from the directory created in step 2.
  5. 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

rick-boardontrack avatar May 22 '24 14:05 rick-boardontrack

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

matrei avatar May 22 '24 14:05 matrei

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?

rick-boardontrack avatar May 22 '24 15:05 rick-boardontrack

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.

matrei avatar May 22 '24 15:05 matrei

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: image

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.

rick-boardontrack avatar May 22 '24 15:05 rick-boardontrack

Is this relevant for your issue: https://github.com/grails/grails-core/issues/13486

matrei avatar May 22 '24 20:05 matrei

Tried and prod version is broken. Why don't you publish 6.2.0 to maven repo?

rlconst avatar Oct 04 '24 08:10 rlconst

Fixed by #13570 which is included in Grails 6.2.1

matrei avatar Oct 04 '24 09:10 matrei