【问题标题】:flyway java migration script not loadedflyway java迁移脚本未加载
【发布时间】:2016-03-12 06:46:29
【问题描述】:

我的 java 迁移脚本没有被加载。 我正在通过使用配置文件配置来触发 flyway 而且它似乎忽略了类文件(实现 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(文件名:V2015_30_11_0__Remove_Cmr.class)

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

[DEBUG] 扫描网址:file:/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\

【问题讨论】:

    标签: flyway


    【解决方案1】:

    我使用了错误的库

    org.flywaydb.core.api.migration.jdbc.JdbcMigration 对比 com.googlecode.flyway.core.api.migration.jdbc.JdbcMigration

    【讨论】:

      猜你喜欢
      • 2022-12-15
      • 2020-08-17
      • 2018-02-28
      • 2017-12-23
      • 2011-11-05
      • 2016-12-12
      • 2021-11-22
      • 2017-03-16
      • 1970-01-01
      相关资源
      最近更新 更多