How can we help you today? How can we help you today?

I'm getting this error "Task 'flywaymigrate' not found in the root 'flyway' and it subprojects"

MiteshKumar
0

Comments

6 comments

  • AlistairW
    I've just run through the example on the quickstart guide with gradle 8.10.2 and flyway v10.0.0 and 10.19.0 and it all worked so there doesn't appear to be a problem with Flyway.
    I don't see a build.gradle file in your project though and I was configuring Flyway using that
     
    AlistairW
    0
  • MiteshKumar
    Hi @AlistairW, Yes I have build.gradle file in my system but still I'm getting above error.
    MiteshKumar
    0
  • MiteshKumar
    Hi @AlistairW, We have flyway-core: 9.22.3 and we have updated gradle 6.2 to 8.2 and I have also shared the gradle-wrapper properties.
    MiteshKumar
    0
  • AlistairW
    I thought I posted a response but it vanished so this is try #2
    The way I can replicate the error you are seeing is to empty out the build.gradle file so it no longer refers to flyway.
    For references, this is what I have in mine (from the quickstart guide)

    buildscript {
        dependencies {
            classpath 'com.h2database:h2:2.2.224'
        }
    }

    plugins {
        id "org.flywaydb.flyway" version "9.22.3"
    }

    flyway {
        url = 'jdbc:h2:file:./target/foobar'
        user = 'sa'
    }
    AlistairW
    0
  • MiteshKumar
    Hi @AlistairW, Yes I have build.gradle file and this checked through cmd also
    MiteshKumar
    0
  • MiteshKumar
    Hi AlistairW, We are still getting the error after the gradle build successful run. I'm not able to run gradle flywaymigrate -i command you can see in below screenshot. 
    MiteshKumar
    0

Add comment

Please sign in to leave a comment.