使用Maven的Flyway Enterprise Edition错误:无法解决插件
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了使用Maven的Flyway Enterprise Edition错误:无法解决插件相关的知识,希望对你有一定的参考价值。
在我的pom.xml中,有
<dependencies>
<dependency>
<groupId>org.flywaydb</groupId>
<artifactId>flyway-core</artifactId>
<version>${flyway-maven-plugin.version}</version>
</dependency>
<dependency>
<groupId>org.flywaydb</groupId>
<artifactId>flyway-commandline</artifactId>
<version>${flyway-maven-plugin.version}</version>
</dependency>
<dependency>
<groupId>org.postgresql</groupId>
<artifactId>postgresql</artifactId>
<version>${postgresql.version}</version>
</dependency>
<repositories>
<repository>
<id>flyway-repo</id>
<url>https://repo.flywaydb.org/repo/</url>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>flyway-repo</id>
<url>https://repo.flywaydb.org/repo/</url>
</pluginRepository>
</pluginRepositories>
<build>
<plugins>
<plugin>
<groupId>org.flywaydb.enterprise</groupId>
<artifactId>flyway-maven-plugin</artifactId>
<version>${flyway-maven-plugin.version}</version>
<configuration>
<url>${flyway.url}</url>
<user>${flyway.user}</user>
</configuration>
</plugin>
</plugins>
</build>
在我的settings.xml中,添加了
<server>
<id>flyway-repo</id>
<username>${licenseKey}</username>
<password>flyway</password>
</server>
并且我正在运行命令mvn compile flyway:info
,出现以下错误
[WARNING] The POM for org.flywaydb.enterprise:flyway-maven-plugin:jar:6.0.4 is missing, no dependency information available
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.232 s
[INFO] Finished at: 2019-11-29T09:28:09+04:00
[INFO] Final Memory: 11M/245M
[INFO] ------------------------------------------------------------------------
[ERROR] Plugin org.flywaydb.enterprise:flyway-maven-plugin:6.0.4 or one of its dependencies could not be resolved: Failure to find org.flywaydb.enterprise:flyway-maven-plugin:jar:6.0.4 in https://repo.flywaydb.org/repo/ was cached in the local repository, resolution will not be reattempted until the update interval of convergence-mirror has elapsed or updates are forced -> [Help 1]
[ERROR]
我什至在系统上设置了flyway版本和flyway许可证密钥环境变量。但是我仍然收到此错误。谢谢帮助!
答案
如果maven没有解决依赖关系,它将不尝试再次解决它,直到更新间隔(通常为24h)使用-U参数运行maven以强制进行依赖关系解析,例如mvn -U compile flyway:info
或删除目录/.m2/repository/org/flywaydb/enterprise/flyway-maven-plugin/6.0.4
以上是关于使用Maven的Flyway Enterprise Edition错误:无法解决插件的主要内容,如果未能解决你的问题,请参考以下文章
flyway-maven-plugin:如何一起执行多个数据库配置?
使用 Maven + Flyway 迁移/清理/等多个数据库
使用 Maven 的 Spring Boot 属性从命令行运行 flyway 命令