我想在多個數據庫的複雜ERP上使用飛橋,但是我沒有找到任何提示使其運行。 我使用一個螞蟻腳本與哈德森一起構建整個系統。 因此,我創建了一個包含以下內容的migrate.xml文件,並在下面的任務中多次調用腳本。 但是,該任務僅運行一次任何錯誤。 如果我兩次調用任務,則會拋出異常。 任何想法來解決這個問題?與多個數據庫連接的飛行路線
在此先感謝。
--exception
BUILD FAILED
/home/raphael/Development/ufpb/sig/sig-migration-fly-way/build.xml:6: The following error occurred while executing this line:
/home/raphael/Development/ufpb/sig/sig-migration-fly-way/migrate.xml:27: Flyway Error: java.lang.IllegalArgumentException: null source
at java.util.EventObject.<init>(EventObject.java:38)
at org.apache.tools.ant.BuildEvent.<init>(BuildEvent.java:93)
at org.apache.tools.ant.Project.fireMessageLogged(Project.java:2351)
at org.apache.tools.ant.Project.log(Project.java:492)
at com.googlecode.flyway.ant.AntLog.debug(AntLog.java:42)
at com.googlecode.flyway.core.dbsupport.DbSupportFactory.createDbSupport(DbSupportFactory.java:59)
at com.googlecode.flyway.core.Flyway.execute(Flyway.java:1159)
at com.googlecode.flyway.core.Flyway.info(Flyway.java:967)
at com.googlecode.flyway.ant.MigrateTask.doExecuteWithMigrationConfig(MigrateTask.java:157)
at com.googlecode.flyway.ant.AbstractMigrationLoadingTask.doExecute(AbstractMigrationLoadingTask.java:271)
at com.googlecode.flyway.ant.AbstractFlywayTask.execute(AbstractFlywayTask.java:329)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
--task
<target name="test">
<ant antfile="migrate.xml">
<property name="dir" value="sigaa"/>
<property name="database" value="demo_development"/>
</ant>
</target>
---migrate.xml
<?xml version="1.0"?>
<project name="migrations" default="deploy" basedir="." xmlns:flyway="antlib:com.googlecode.flyway.ant">
<path id="flyway.classpath">
<!-- include all jars containing jdbc drivers -->
<!-- include all jars and directories containing sql migrations -->
<!-- include all jars and directories containing compiled java migrations -->
<fileset dir="lib">
<include name="*.jar" />
</fileset>
</path>
<taskdef uri="antlib:com.googlecode.flyway.ant"
resource="com/googlecode/flyway/ant/antlib.xml" />
<property name="flyway.driver" value="org.postgresql.Driver"/>
<property name="flyway.initOnMigrate" value="true"/>
<property name="flyway.validateOnMigrate" value="true"/>
<property name="flyway.url" value="jdbc:postgresql://localhost:5432/${database}"/>
<property name="flyway.user" value="***"/>
<property name="flyway.password" value="****"/>
<property name="flyway.table" value="schema_version_${dir}"/>
<property name="flyway.locations" value="filesystem:db/migrations/${dir}"/>
<target name="migrate">
<flyway:migrate />
</target>
<target name="deploy" depends="migrate">
<flyway:info />
</target>
</project>
它看起來像是一個深入內部的Ant日誌記錄中的問題。在沒有哈德森的情況下再試一次,讓我知道結果是什麼。 – 2013-04-28 05:42:34