Document SBT custom configuration usage #1275
Observed with Flyway-sbt 4.0.
A custom configuration with flyway specific settings was created, including url, username and password. This was verified by show and inspect
When a flyway task is executed scoped to a custom configuration rather than the task being actioned, the following error was displayed:
From the sbt plugins best practise, hence the expectation the task should have actioned correctly:
The text was updated successfully, but these errors were encountered:
Having looked into the implementation of sbt plugins in general and the source of the Flyway plugin, I see that this is possible, so this has become a documentation issue. I suggest that the SBT Overview page includes a section for custom configurations:
The flywayBaseSettings value of the Flyway plugin provides base configuration and task definitions for the plugin. This can be reused in custom configurations other than the those provided for the runtime and test configurations, if projects require it. These settings may be reused as follows:
The configuration passed to flywayBaseSettings is use to derive the classpath for locating migrations implemented in Java.
Hello, when I try to use the suggested file I get a number of undefined settings,
References to undefined settings:
app/custom:fullClasspath from app/custom:flywayBaseline ((org.flywaydb.sbt.FlywayPlugin) FlywayPlugin.scala:202)
app/custom:fullClasspath from app/custom:flywayInfo ((org.flywaydb.sbt.FlywayPlugin) FlywayPlugin.scala:189)
app/custom:fullClasspath from app/custom:flywayValidate ((org.flywaydb.sbt.FlywayPlugin) FlywayPlugin.scala:186)
app/custom:fullClasspath from app/custom:flywayRepair ((org.flywaydb.sbt.FlywayPlugin) FlywayPlugin.scala:196)
app/custom:fullClasspath from app/custom:flywayMigrate ((org.flywaydb.sbt.FlywayPlugin) FlywayPlugin.scala:183)
Is there anything missing in the doc?