使用Maven的Flyway Enterprise Edition错误:无法解决插件

问题描述 投票:0回答:1

在我的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个回答
0
投票

如果maven没有解决依赖关系,它将不尝试再次解决它,直到更新间隔(通常为24h)使用-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?

© www.soinside.com 2019 - 2024. All rights reserved.