I am using Flyway in my Spring-Boot project (in Eclipse with maven) with
<dependency>
<groupId>org.flywaydb</groupId>
<artifactId>flyway-core</artifactId>
</dependency>
and I ran into some interesting issues.
The whole thing worked fine until I failed a migration (because of a typo in the schema syntax). I tried to run fly:repair and I got this error
Failed to execute goal org.flywaydb:flyway-maven-plugin:6.4.1:repair (default-cli) on project springboot: org.flywaydb.core.api.FlywayException: Unable to connect to the database. Configure the url, user and password!
Now, the curious thing I do not understand is that if I add all the information into pom.xml
<properties>
<flyway.user>databaseUser</flyway.user>
<flyway.password>databasePassword</flyway.password>
<flyway.url>urlAddress</flyway.url>
</properties>
it builds. But if I add the information to my application.properties file
spring.flyway.user=databaseUser
spring.flyway.password=databasePassword
spring.flyway.url=urlAddress
the same error message occurs.
According to Baedlung Database Migrations with Flyway (they are using Flyway Maven Plugin), it does not matter where you configure Flyway. So I wonder if I should switch to flyway-maven-plugin? I would really like to have all configuration in the .properties file.