没有加载flyway java迁移脚本

时间:2015-12-07 15:37:07

标签: flyway

我的java迁移脚本未加载。 我通过使用配置文件配置触发飞路 它似乎忽略了类文件(实现JdbcMigration)

我将配置和调试日志放在

下面
<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]扫描路径中的资源:C:\ projects \ CELLAR \ Workspace \ workspaces \ trunk \ cellar-app \ cellar-flyway \ target \ classes \ db \ migration \ java \ sys(db / migration / java / SYS)

[DEBUG]过滤掉资源:db / migration / java / sys / V2015_30_11_0__Remove_Cmr.class(filename:V2015_30_11_0__Remove_Cmr.class)

[DEBUG]在'db / migration / java / sys'上扫描类(实现:'org.flywaydb.core.api.migration.jdbc.JdbcMigration')

[DEBUG]扫描URL:文件:/ C:/ projects / CELLAR / Workspace / workspaces / trunk / cellar-app / cellar-flyway / target / classes / db / migration / java / sys

[DEBUG]从文件系统中的类路径根开始扫描:C:\ projects \ CELLAR \ Workspace \ workspaces \ trunk \ cellar-app \ cellar-flyway \ target \ classes \

1 个答案:

答案 0 :(得分:0)

我使用了错误的库

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

相关问题