mirror of
https://gitee.com/jmix/cuba.git
synced 2024-12-05 04:38:10 +08:00
46 lines
1.6 KiB
XML
46 lines
1.6 KiB
XML
<?xml version="1.0"?>
|
|
<project name="cuba-db">
|
|
|
|
<property name="project.dir" location=".."/>
|
|
<property name="root.dir" location="${project.dir}/.."/>
|
|
|
|
<import file="${root.dir}/build-inc-prj.xml"/>
|
|
<property file="${root.dir}/build.properties"/>
|
|
<property file="${project.dir}/build.properties"/>
|
|
|
|
<property name="sql.dir" location="init/sql"/>
|
|
<property name="sql.delimiter" value=";"/>
|
|
|
|
<path id="run-cp">
|
|
<fileset refid="server-lib-fs"/>
|
|
</path>
|
|
|
|
<target name="run-hsqldb">
|
|
<mkdir dir="${project.dir}/data"/>
|
|
<exec dir="${project.dir}/data" executable="cmd.exe" spawn="true">
|
|
<arg line="/c start ${project.dir}/db/run-hsqldb.bat ${db.name}"/>
|
|
</exec>
|
|
</target>
|
|
|
|
<target name="run-hsqlman">
|
|
<java classpathref="run-cp" fork="true" spawn="true"
|
|
classname="org.hsqldb.util.DatabaseManagerSwing" dir="${project.dir}/data">
|
|
<arg line="--url jdbc:hsqldb:hsql://localhost/${db.name}"/>
|
|
</java>
|
|
</target>
|
|
|
|
<target name="create-db">
|
|
<sql classpathref="run-cp" src="${sql.dir}/create-db.sql" delimiter="${sql.delimiter}"
|
|
driver="${db.driver}"
|
|
url="${db.url}"
|
|
userid="${db.user}" password="${db.password}"/>
|
|
</target>
|
|
|
|
<target name="create-sample-data">
|
|
<sql classpathref="run-cp" src="${sql.dir}/create-sample-data.sql" delimiter="${sql.delimiter}"
|
|
driver="${db.driver}"
|
|
url="${db.url}"
|
|
userid="${db.user}" password="${db.password}"/>
|
|
</target>
|
|
|
|
</project> |