【问题标题】:Error with Flyway Enterprise Edition Using Maven : Plugins could not be resolvedFlyway Enterprise Edition 使用 Maven 出错:无法解析插件
【发布时间】:2020-03-24 17:24:14
【问题描述】:

在我的 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 许可证密钥环境变量。但我仍然收到此错误。感谢帮助!

【问题讨论】:

    标签: postgresql maven pom.xml maven-plugin flyway


    【解决方案1】:

    如果 maven 没有解决依赖,它不会尝试再次解决它,直到更新间隔(通常是 24 小时) 使用 -U 参数运行 maven 以强制解析依赖关系,例如 mvn -U compile flyway:info 或删除目录 /.m2/repository/org/flywaydb/enterprise/flyway-maven-plugin/6.0.4

    请看 When maven says "resolution will not be reattempted until the update interval of MyRepo has elapsed", where is that interval specified?

    【讨论】:

    • 我已经这样做了。我认为插件 flyway-maven-plugin 不是公开可用的,因为它可以来自私人仓库,并且需要提供许可证密钥和版本类型。我也尝试过全新安装,但没有成功。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2019-12-21
    • 2018-10-17
    • 1970-01-01
    • 2012-01-02
    相关资源
    最近更新 更多