0

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.

4

2 に答える 2

2

You can create a maven profile with the dependecies you need to run Flyway and you can activate the profile in this way:

 mvn flyway:migrate -P flywayProfile
于 2012-05-25T09:19:34.007 に答える
0

プラグインセクションで依存関係を指定することも可能であることがわかりました。Mavenでプラグインの依存関係をオーバーライドする方法を参照してください。これで私の問題は解決しました。

pluginRepositories依存関係に追加のリポジトリを使用する場合は、その場合にタグを提供する必要があることに注意してください。

于 2012-05-25T09:22:00.720 に答える