Guys I'm using flyway on a spring boot project.
When I start the application the migration scripts are executed correctly.
My migrations are in the folder:
flyway.locations = db / migration / postgresql
The problem occurs when I try to execute some purpose of fyway plugin maven from a configuration file.
Configuration File:
flyway.password=root
flyway.schemas=public
flyway.url=jdbc:postgresql://localhost:5432/film
flyway.locations=db/migration/postgresql
Running the maven command:
mvn flyway: repair -Flyway.config File = myFlywayConfig.properties
Returns the error:
Failed to execute goal org.flywaydb:flyway-maven-plugin:6.1.0:repair (default-cli) on project demo-hibernate-envers: org.flywaydb.core.api.FlywayException: Unknown configuration property: flyway.configFile
However when I configure flyway plugin via pom.xml and run the command:
mvn flyway:repair
Everything is ok
Below the flyway plugin configuration:
<plugin>
<groupId>org.flywaydb</groupId>
<artifactId>flyway-maven-plugin</artifactId>
<version>6.1.0</version>
<dependencies>
<dependency>
<groupId>org.postgresql</groupId>
<artifactId>postgresql</artifactId>
<version>42.2.5</version>
<scope>runtime</scope>
</dependency>
</dependencies>
<configuration>
<user>postgres</user>
<password>root</password>
<url>jdbc:postgresql://localhost:5432/film</url>
<schemas>
<schema>public</schema>
</schemas>
</configuration>
</plugin>
Does anyone know how to do to accomplish the goals of the flyway plugin based on external configuration?