testcontainers / testcontainers-jooq-codegen-maven-plugin

jOOQ code generator using Testcontainers
Apache License 2.0
49 stars 10 forks source link

Consider change default for flyway locations from classpath:db/migration to filesystem:db/migration #15

Closed romchellis closed 1 year ago

romchellis commented 1 year ago

In order to avoid provision explicitly flyway locations like this

                            <flyway>
                                <locations>
                                    filesystem:src/main/resources/db/migration
                                </locations>
                            </flyway>

We can add default as it implemented in flyway-maven-plugin

locations = new String[] {
                        Location.FILESYSTEM_PREFIX + workDir.getAbsolutePath() + "/src/main/resources/db/migration"
                };
simasch commented 1 year ago

Why not use the classpath?

https://flywaydb.org/documentation/configuration/parameters/locations

romchellis commented 1 year ago

Hi @simasch Now if locations were not provided, classpath:db/migration default will be set.So since it is maven plugin, by default target directory does not include resources at generate stage, so these resources will not be used by flyway.

simasch commented 1 year ago

@romchellis Ah you right!