4.1.2 version
Gradle plugin
Oracle 11.2.0.4
Windows 2010
(Please include the content causing the issue, any relevant configuration settings, and the command you ran)
The flyway.configFile cannot be found.
The command is the following:
gradle flywayInfo -Dflyway.configFile=flyway.local.properties
The information about the pending migrations or added.
It works with the Maven plugin version, but not with the Gradle plugin version
Unknown configuration property: flyway.configFile
:myProject:flywayInfo FAILED
:myProject:flywayInfo (Thread[Daemon worker Thread 8,5,main]) completed. Took 1.713 secs.
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':myProject:flywayInfo'.
> Error occurred while executing flywayInfo
Unable to connect to the database. Configure the url, user and password!
* Try:
Run with --stacktrace option to get the stack trace. Run with --debug option to get more log output.
BUILD FAILED
It would be nice to do something like this as well:
flyway {
configFile = file("myFlyway.properties")
}
We have now added support for flyway.configFiles which also supports multiple config files.
Trying to use the flyway.configFiles with gradle plugin in intelliJ for a springboot application. The configuration is as shown below
the below error comes on trying to build
Executing task 'flywayMigrate -x test -Dflyway.configFiles=flyway.properties'...
Task :flywayMigrate FAILED
FAILURE: Build failed with an exception.
What went wrong:
Execution failed for task ':flywayMigrate'.
Error occurred while executing flywayMigrate
Unable to load config file: /home/user/Workspace/sample/flyway.properties
Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
Get more help at https://help.gradle.org
Most helpful comment
We have now added support for
flyway.configFileswhich also supports multiple config files.