1 xml version="1.0" encoding="UTF-8"?> 2 3 <project name="project" default="" basedir="."> 4 5 <property name="lib" value="lib" /> 6 <property name="conf" value="conf" /> 7 <property name="dbunit.operation.type" value="REFRESH" /> 8 9 10 <property environment="env" /> 11 12 13 <property file="${conf}/application.properties" /> 14 15 16 <property file="${env.TX_CONF_PATH}/application.properties" /> 17 18 <path id="lib.path"> 19 <pathelement location="${conf}"/> 20 <fileset dir="${lib}"> 21 <include name="**/*.jar" /> 22 fileset> 23 path> 24 25 26 <target name="load" description="load test data into db"> 27 <echo message="更新数据库中的策划配数数据 到 ${env.TX_CONF_PATH}" /> 28 <taskdef name="dbunit" classname="org.dbunit.ant.DbUnitTask" classpathref="lib.path"> 29 taskdef> 30 31 <dbunit driver="com.mysql.jdbc.Driver" url="jdbc:mysql://${mysql.dbServer}?useUnicode=true&characterEncoding=UTF-8&rewriteBatchedStatements=true" userid="${mysql.user}" password="${mysql.passwd}" supportBatchStatement="true" > 32 33 <operation type="${dbunit.operation.type}" src="data/Entity.xml" /> 34 <operation type="${dbunit.operation.type}" src="data/EntityConsume.xml" /> 35 <operation type="${dbunit.operation.type}" src="data/EntityLimit.xml" /> 36 <operation type="${dbunit.operation.type}" src="data/Effect.xml" /> 37 <operation type="${dbunit.operation.type}" src="data/SysPara.xml" /> 38 <operation type="${dbunit.operation.type}" src="data/DropPack.xml" /> 39 <operation type="${dbunit.operation.type}" src="data/Item.xml" /> 40 <operation type="${dbunit.operation.type}" src="data/Equip.xml" /> 41 <operation type="${dbunit.operation.type}" src="data/Army.xml" /> 42 43 dbunit> 44 target> 45 project>
Buildfile: E:\heart\workspace\RedAlert_v0.1\build.xml
load:
[echo] 更新数据库中的策划配数数据 到 ${env.TX_CONF_PATH}
[dbunit] Executing operation: REFRESH
[dbunit] on file: E:\heart\workspace\RedAlert_v0.1\data\Entity.xml
[dbunit] with format: null
[dbunit] Executing operation: REFRESH
[dbunit] on file: E:\heart\workspace\RedAlert_v0.1\data\EntityConsume.xml
[dbunit] with format: null
[dbunit] Executing operation: REFRESH
[dbunit] on file: E:\heart\workspace\RedAlert_v0.1\data\EntityLimit.xml
[dbunit] with format: null
[dbunit] Executing operation: REFRESH
[dbunit] on file: E:\heart\workspace\RedAlert_v0.1\data\Effect.xml
[dbunit] with format: null
[dbunit] Executing operation: REFRESH
[dbunit] on file: E:\heart\workspace\RedAlert_v0.1\data\SysPara.xml
[dbunit] with format: null
[dbunit] Executing operation: REFRESH
[dbunit] on file: E:\heart\workspace\RedAlert_v0.1\data\DropPack.xml
[dbunit] with format: null
[dbunit] Executing operation: REFRESH
[dbunit] on file: E:\heart\workspace\RedAlert_v0.1\data\Item.xml
[dbunit] with format: null
[dbunit] Executing operation: REFRESH
[dbunit] on file: E:\heart\workspace\RedAlert_v0.1\data\Equip.xml
[dbunit] with format: null
[dbunit] Executing operation: REFRESH
[dbunit] on file: E:\heart\workspace\RedAlert_v0.1\data\Army.xml
[dbunit] with format: null
BUILD SUCCESSFUL
Total time: 25 seconds