Flyway Maven 插件不再工作:在当前项目和插件组中找不到前缀 'flyway' 的插件

Flyway Maven plugin no longer working: No plugin found for prefix 'flyway' in the current project and in the plugin groups

每当我 运行 mvn spring-boot:run Flyway 会自动选择 /src/main/resources/db/migration/ 中的未决迁移并 运行 它们。现在不是了。即使我使用 mvn compilemvn package 它也会抱怨缺少 table - 因为挂起的迁移创建了它!我尝试 mvn flyway:migrate 它抱怨

[ERROR] No plugin found for prefix 'flyway' in the current project and in the plugin groups [org.apache.maven.plugins, org.codehaus.mojo] available from the repositories [local (C:\Users\Chloe.m2\repository), central (https://repo.maven.apache.org/maven2)] -> [Help 1]

这是 POM

<dependency>
  <groupId>org.flywaydb</groupId>
  <artifactId>flyway-core</artifactId>
</dependency>

https://flywaydb.org/documentation/plugins/springboot

我在 运行ning spring-boot:run:

时在控制台输出中发现了这个
2018-07-30 23:36:24.980  INFO 197376 --- [  restartedMain] trationDelegate$BeanPostProcessorChecker : Bean 'org.springframework.boot.autoconfigure.flyway.FlywayAutoConfiguration' of type [org.springframework.boot.autoconfigure.flyway.FlywayAutoConfiguration$$EnhancerBySpringCGLIB$$e24a304] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2018-07-30 23:36:24.987  INFO 197376 --- [  restartedMain] trationDelegate$BeanPostProcessorChecker : Bean 'stringOrNumberMigrationVersionConverter' of type [org.springframework.boot.autoconfigure.flyway.FlywayAutoConfiguration$StringOrNumberToMigrationVersionConverter] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)

Java 8, Mvn 3, Spring 引导 1.5.13

您需要先将Flyway Maven 插件添加到您的POM 中,然后才能使用它。参见 https://flywaydb.org/documentation/maven/