0

In my pom.xml I have

<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>


In my settings.xml, I have added

        <server>
            <id>flyway-repo</id>
            <username>${licenseKey}</username>
            <password>flyway</password>
        </server>

And I am running the command mvn compile flyway:info, I'm getting the below errors

[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]

I have even set the flyway edition and flyway license key enviromental variables on my system. But I am still getting this error. Thanks to help !

1 Answers1

0

If maven didn't resolve dependency, it will not try resolve it again until the update interval(24h usually) Run maven with -U parameter to force dependency resolving, like mvn -U compile flyway:info or delete directory /.m2/repository/org/flywaydb/enterprise/flyway-maven-plugin/6.0.4

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

  • I already did this. I think that the plugin flyway-maven-plugin is not publicly available, as it can be from a private repo and there is the need to provide the license key and the edition type. I tried clean install also but it did not work. – Baichoo Desire Nov 29 '19 at 12:23