Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add flyway.configFiles support to Gradle plugin #1562

Closed
rbatllet opened this issue Mar 21, 2017 · 3 comments
Closed

Add flyway.configFiles support to Gradle plugin #1562

rbatllet opened this issue Mar 21, 2017 · 3 comments

Comments

@rbatllet
Copy link

@rbatllet rbatllet commented Mar 21, 2017

What version of Flyway are you using?

4.1.2 version

Which client are you using? (Command-line, Java API, Maven plugin, Gradle plugin, SBT plugin, ANT tasks)

Gradle plugin

What database are you using (type & version)?

Oracle 11.2.0.4

What operating system are you using?

Windows 2010

What did you do?

(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
What did you expect to see?

The information about the pending migrations or added.
It works with the Maven plugin version, but not with the Gradle plugin version

What did you see instead?
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
@axelfontaine axelfontaine changed the title Unknown configuration property: flyway.configFile on Gradle plugin Add flyway.configFile support to Gradle plugin Mar 21, 2017
@axelfontaine axelfontaine added this to the Flyway 4.2.0 milestone Mar 21, 2017
@rbatllet
Copy link
Author

@rbatllet rbatllet commented Mar 23, 2017

It would be nice to do something like this as well:

flyway {
    configFile = file("myFlyway.properties")
}
@axelfontaine axelfontaine changed the title Add flyway.configFile support to Gradle plugin Add flyway.configFiles support to Gradle plugin Nov 27, 2017
axelfontaine added a commit to flyway/flywaydb.org that referenced this issue Nov 27, 2017
@axelfontaine
Copy link
Contributor

@axelfontaine axelfontaine commented Nov 27, 2017

We have now added support for flyway.configFiles which also supports multiple config files.

@swat2793
Copy link

@swat2793 swat2793 commented Sep 25, 2019

Trying to use the flyway.configFiles with gradle plugin in intelliJ for a springboot application. The configuration is as shown below

flyway

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.