I have a provided dependency in my maven build – the database drivers which are installed and provided in the Tomcat instance. So far so good.
But I also use Flyway and want to execute a manual (mvn flyway:migrate) migration from my build. In that I need the dependencies. Of course I could integrate Flyway in a way that it checks the database on start of the web application, but I would like to solve the Maven approach.
How can this be done? Thanks in advance for your help.
You can create a maven profile with the dependecies you need to run Flyway and you can activate the profile in this way: