flyway java 未加载迁移脚本
flyway java migration script not loaded
我的 java 迁移脚本没有被加载。
我通过使用配置文件配置触发飞路
而且它似乎忽略了 class 文件(实现 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' 扫描 classes(实施:'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] 从文件系统中的 class 路径根目录开始扫描:C:\projects\CELLAR\Workspace\workspaces\trunk\cellar-app\cellar-flyway\target\classes\
我使用了错误的库
org.flywaydb.core.api.migration.jdbc.JdbcMigration
对比
com.googlecode.flyway.core.api.migration.jdbc.JdbcMigration
我的 java 迁移脚本没有被加载。 我通过使用配置文件配置触发飞路 而且它似乎忽略了 class 文件(实现 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' 扫描 classes(实施:'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] 从文件系统中的 class 路径根目录开始扫描:C:\projects\CELLAR\Workspace\workspaces\trunk\cellar-app\cellar-flyway\target\classes\
我使用了错误的库
org.flywaydb.core.api.migration.jdbc.JdbcMigration 对比 com.googlecode.flyway.core.api.migration.jdbc.JdbcMigration