在我的 pom.xml 中,我有:
<plugin>
<groupId>org.flywaydb</groupId>
<artifactId>flyway-maven-plugin</artifactId>
<version>3.1</version>
<configuration></configuration>
</plugin>
为了测试插件,我正在做:
mvn flyway:migrate
但是我收到一个错误:
[ERROR] No plugin found for prefix 'flyway' in the current project and in the pl
ugin groups [org.wildfly.plugins, org.flywaydb.plugins, org.apache.maven.plugins
, org.codehaus.mojo] available from the repositories [local (C:\Users\me\.
m2\repository), central (https://repo.maven.apache.org/maven2)] -> [Help 1]
我的 pom 中缺少什么? Flyway 插件位于中央。
最佳答案
您应该在项目类路径中运行mvncompileflyway:migrate
。
假设您有一个项目名称 bar
存储在 C:\project
目录中。
- 您应该打开命令提示符并将更改目录更改为
C:\project\bar
。 - 然后,运行
mvncompileflyway:migrate
而不是使用mvnflyway:migrate
关于maven - 找不到 Flyway maven 插件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27326016/