grails / grails-database-migration

Grails® framework Database Migration Plugin
Apache License 2.0
98 stars 115 forks source link

Grails 5.0.0rc1 dependency issues #191

Closed robertoschwald closed 3 years ago

robertoschwald commented 3 years ago

Steps to Reproduce

  1. Add the plugin to a Grails 5.0.0rc1 application
  2. Call any of the dbm scripts

Expected Behaviour

Dependencies can be resolved, it works.

Tell us what should happen Lots of dependency issues for all dependencies needed to perform the dbm tasks.

Actual Behaviour

Needed dependencies can not be resolved.

Tell us what happens instead It seems the change to the implementation scope does not work with the current version of dbm plugin, as their dependencies got scope compile. If changing the affected dependencies to compile scope, it goes further, but it seems it must be done for all needed dependencies.

First error:

> grails dbm-generate-changelog changelog.groovy
...
Caused by: java.lang.ClassNotFoundException: org.hibernate.service.ServiceRegistry
        at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:581)
        at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178)
        at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:522)

Environment Information

Example Application

robertoschwald commented 3 years ago

Works with 5.0.0 GA using "implementation" and liquibase-core 3.10.1. Default Spring BOM liquibase-core version 4.3.2 does NOT work with this plugin, so you need to downgrade:

implementation "org.grails.plugins:database-migration:3.1.0"
implementation 'org.liquibase:liquibase-core:3.10.1' // Default Grails 5.0.0 spring boot BOM version 4.3.2 currently does NOT work with dbm plugin.