我正在使用下面给定的 xml 文件将 flyway 作为 ant 任务执行。我正在使用“Run as ant”选项在 Eclipse 中执行 ant 文件。它显示构建成功,但没有发生飞行路径迁移。
您能否检查一下,如果我需要更正,请告诉我。
<path id="flyway.lib.path">
<fileset dir="${flyway.lib.dir}" includes="**/*.jar"/>
</path>
<path id="flyway.classpath">
<fileset dir="${sql.dir.emlogis}" includes="**/*.sql"/>
<fileset dir="${sql.dir.generator}" includes="**/*.sql"/>
<fileset dir="${sql.dir.pgf}" includes="**/*.sql"/>
</path>
<target name="init-flyway">
<taskdef uri="antlib:com.googlecode.flyway.ant"
resource="com/googlecode/flyway/ant/antlib.xml"
classpathref="flyway.lib.path"/>
<property name="flyway.driver" value="com.microsoft.sqlserver.jdbc.SQLServerDriver"/>
<property name="flyway.url" value="jdbc:sqlserver://localhost:1433;databaseName=ElmGenerator"/>
<property name="flyway.user" value="sa"/>
<property name="flyway.password" value="EmLogis123"/>
<property name="flyway.baseDir" value="${sql.dir.generator}"/>
<property name="flyway.classpath" value="${sql.dir.generator}"/>
<property name="flyway.table" value="schema_history"/>
<property name="flyway.locations" value="${sql.dir.emlogis},${sql.dir.generator}"/>
<property name="flyway.placeholders.custName" value="Maple"/>
<property name="flyway.placeholderPrefix" value="$("/>
<property name="flyway.placeholderSuffix" value=")"/>
<property name="flyway.outOfOrder" value="false"/>
<property name="flyway.validateOnMigrate" value="true"/>
<property name="flyway.cleanOnValidationError" value="false"/>
<property name="flyway.initOnMigrate" value="false"/>
</target>
<target name="deployDB" depends="init-flyway">
<flyway:migrate>
<locations>
<location path="${sql.dir.emlogis}"/>
<location path="${sql.dir.generator}"/>
</locations>
<placeholders>
<placeholder name="custName" value="Elm"/>
</placeholders>
</flyway:migrate>
</target>
问候, 卡维莎