找不到Flyway Maven插件 [英] Can't find Flyway maven plugin

查看:906
本文介绍了找不到Flyway Maven插件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我的pom.xml中,我有:

In my pom.xml, I have:

 <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插件位于中央.

What am I missing from my pom? the flyway plugin IS in central.

推荐答案

您应在项目类路径中运行mvn compile flyway:migrate.

You should run mvn compile flyway:migrate inside your project class path.

假设您有一个项目名称栏,存储在C:\project目录中.

Suppose your has a project name bar that store inside C:\project directory.

  • 您应该打开命令提示符并将更改目录更改为C:\project\bar.
  • 然后,运行mvn compile flyway:migrate而不是使用mvn flyway:migrate
  • You should open command prompt and change change directories to C:\project\bar.
  • Then, Run mvn compile flyway:migrate instead of use mvn flyway:migrate

另请参见,第一步:使用Maven的flywaydb

这篇关于找不到Flyway Maven插件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆