The following is the definition of flywayUrl:
val flywayUrl = settingKey[String]("The jdbc url to use to connect to the database.")
I can't seem to find how the setting could be set through the system property. The plugin doesn't seem to support it.
With that said, you should find the following build.sbt
a solution and be able to set its value through an appropriate system property:
flywayUrl := System.getProperty("flyway.url", "[default]")
When sbt
executed with no flyway.url
set:
$ sbt 'show flywayUrl'
[info] Loading global plugins from /Users/jacek/.sbt/0.13/plugins
[info] Set current project to flyway (in build file:/Users/jacek/sandbox/so/flyway/)
[info] [default]
And when it is set on command line:
$ sbt -Dflyway.url=command-line 'show flywayUrl'
[info] Loading global plugins from /Users/jacek/.sbt/0.13/plugins
[info] Set current project to flyway (in build file:/Users/jacek/sandbox/so/flyway/)
[info] command-line
You may also find the other question Setting value of setting on command line when no default value defined in build? useful.