Search code examples
gradlegrailsgroovydatabase-migration

Database migration plugin error in grails4


I am working on a grails project version 4

And whenever I am running the project or performing gradle build or clean

I am getting the following error

> Could not resolve all artifacts for configuration ':classpath'.
   > Could not find org.grails.plugins:database-migration:3.1.0.BUILD-SNAPSHOT.
     Searched in the following locations:
       - https://repo.grails.org/grails/core/org/grails/plugins/database-migration/3.1.0.BUILD-SNAPSHOT/maven-metadata.xml
       - https://repo.grails.org/grails/core/org/grails/plugins/database-migration/3.1.0.BUILD-SNAPSHOT/database-migration-3.1.0.BUILD-SNAPSHOT.pom
       - https://repo.grails.org/grails/core/org/grails/plugins/database-migration/3.1.0.BUILD-SNAPSHOT/database-migration-3.1.0.BUILD-SNAPSHOT.jar
     Required by:
         project :

Solution

  • Seems like all of the plugin repos return 404 right now, examples:

    not sure whats going on, but if you are using grails 3+ you can try to add https://grails.jfrog.io/grails/core to your repositories closure (as a temporary fix), like so:

    repositories {
      mavenLocal()
      maven { url "https://repo.grails.org/grails/core" }
      maven { url "https://grails.jfrog.io/grails/core"}
    }
    

    Although I would like to know whats going on with the official repo, maybe hear from the grails guys about this. I hope they resolve it soon at least, because its not as easy to fix with our old grails 2 apps.