Running the Maven flyway-plugin
mvn flyway:migrate
with this configuration:
<plugin>
<groupId>org.flywaydb</groupId>
<artifactId>flyway-maven-plugin</artifactId>
<version>4.0.3</version>
<configuration>
<driver>com.mysql.jdbc</driver>
<url>jdbc:mysql://localhost:3306/schema2?createDatabaseIfNotExist=true</url>
<user>root</user>
<password>root</password>
</configuration>
</plugin>
I try to create number of executions like in this solution: How to use Flyway configuration to handle multiple databases
Start from one execution:
<plugin>
<groupId>org.flywaydb</groupId>
<artifactId>flyway-maven-plugin</artifactId>
<version>4.0.3</version>
<executions>
<execution>
<id>migrate-database</id>
<phase>compile</phase>
<goals>
<goal>migrate</goal>
</goals>
<configuration>
<driver>com.mysql.jdbc</driver>
<url>jdbc:mysql://localhost:3306/schema2?createDatabaseIfNotExist=true</url>
<user>root</user>
<password>root</password>
</configuration>
</execution>
</executions>
</plugin>
See exception:
[ERROR] Failed to execute goal org.flywaydb:flyway-maven-plugin:4.0.3:migrate (default-cli) on project UrbanLife: org.flywaydb.core.api.FlywayException: Unable to connect to the database. Configure the url, user and password! -> [Help 1]
Looks like flyway can't see configuration inside (Interesting that, in link, I mentioned before, it works)
Please help to create flyway multyDB integration via maven.