Change flyway-maven-plugin's default scripts directory -
how can change following flyway-maven-plugin
configuration can drop scripts in src/main/database
instead of src/main/resources/db/migration
?
the migrate
mojo source code seems indicate default value db/migration
, src/main/resources/
?
<plugin> <groupid>org.flywaydb</groupid> <artifactid>flyway-maven-plugin</artifactid> <version>3.2.1</version> <configuration> <url>jdbc:h2:file:target/tmp</url> <user>sa</user> </configuration> <dependencies> <dependency> <groupid>com.h2database</groupid> <artifactid>h2</artifactid> <version>1.4.190</version> </dependency> </dependencies> </plugin>
set locations
property directory want. prefix filesystem:
if lives on filesystem instead of classpath: http://flywaydb.org/documentation/maven/migrate.html
for use case, use following:
<plugin> <groupid>org.flywaydb</groupid> <artifactid>flyway-maven-plugin</artifactid> <version>3.2.1</version> <configuration> <url>jdbc:h2:file:target/tmp</url> <user>sa</user> <locations> <location>filesystem:src/main/database</location> </locations> </configuration> <dependencies> <dependency> <groupid>com.h2database</groupid> <artifactid>h2</artifactid> <version>1.4.190</version> </dependency> </dependencies> </plugin>
Comments
Post a Comment