0
votes

My java migration script is not being loaded. I'm triggering flyway through the use of a profile configuration And it seems it's ignoring the class files (that implement JdbcMigration)

I placed my configuration and debug logs beneath

<profile>
        <id>flyway-clean</id>
        <properties>
            <flyway.script.sys.java.location>db/migration/java/sys</flyway.script.sys.java.location>

        </properties>
        <build>
            <plugins>
                <plugin>
                    <groupId>org.flywaydb</groupId>
                    <artifactId>flyway-maven-plugin</artifactId>
                    <executions>
                        <execution>
                            <id>database-migration-java-sys</id>
                            <phase>install</phase>
                            <goals>
                                <goal>clean</goal>
                                <goal>info</goal>
                                <goal>migrate</goal>
                            </goals>
                            <configuration>
                                <locations>
                                    <location>${flyway.script.sys.java.location}</location>
                                </locations>
                                <driver>${flyway.driver}</driver>
                                <url>${flyway.url}</url>
                                <user>${flyway.sys}</user>
                                <password>${flyway.sys.password}</password>
                                <schemas>
                                    <schema>FLYWAY</schema>
                                </schemas>
                                                                <validateOnMigrate>false</validateOnMigrate>
                            </configuration>
                        </execution>
                    </executions>
                </plugin>
            </plugins>
        </build>
    </profile>

[DEBUG] Scanning for resources in path: C:\projects\CELLAR\Workspace\workspaces\trunk\cellar-app\cellar-flyway\target\classes\db\migration\java\sys (db/migration/java/sys)

[DEBUG] Filtering out resource: db/migration/java/sys/V2015_30_11_0__Remove_Cmr.class (filename: V2015_30_11_0__Remove_Cmr.class)

[DEBUG] Scanning for classes at 'db/migration/java/sys' (Implementing: 'org.flywaydb.core.api.migration.jdbc.JdbcMigration')

[DEBUG] Scanning URL: file:/C:/projects/CELLAR/Workspace/workspaces/trunk/cellar-app/cellar-flyway/target/classes/db/migration/java/sys

[DEBUG] Scanning starting at classpath root in filesystem: C:\projects\CELLAR\Workspace\workspaces\trunk\cellar-app\cellar-flyway\target\classes\

1

1 Answers

0
votes

I was using the wrong libraries

org.flywaydb.core.api.migration.jdbc.JdbcMigration vs com.googlecode.flyway.core.api.migration.jdbc.JdbcMigration