import:
mkdir:
javac:
native2asc:
schema:
SQL:
<import file="properties.xml" />
mkdir:
<mkdir dir="${build.dir}" />
javac:
<!-- javac -->
<property name="compile.debug" value="true" />
<property name="compile.deprecation" value="true" />
<property name="compile.optimize" value="true" />
<target name="compile-java"
depends="prepare"
description="Compile main code">
<tstamp>
<format property="class.tstamp" pattern="MM/dd/yyyy kk:mm:ss" />
</tstamp>
<javac srcdir="${src.java}"
destdir="${build.classes}"
classpathref="project.classpath"
debug="${compile.debug}"
deprecation="${compile.deprecation}"
optimize="${compile.optimize}"
target="${src.level}"
source="${src.level}"
encoding="${src.encoding}">
<!--compilerarg value="-Xlint:unchecked"/-->
</javac>
</target>
native2asc:
<target name="native2asc" description="Convert resources file">
<native2ascii encoding="${resources.encoding}"
src="${src.etc}"
dest="${src.etc}"
includes="**/*.draft"
ext=".properties" />
<copy todir="${src.java}">
<fileset dir="${src.etc}">
<include name="*.properties" />
</fileset>
</copy>
<copy todir="${src.test}">
<fileset dir="${src.etc}">
<include name="*.properties" />
</fileset>
</copy>
</target>
schema:
<target name="schema-export"
depends="compile-java"
description="Schema Export">
<echo message="Exporting schema..." />
<hibernatetool destdir="${src.etc}">
<classpath path="${build.classes}" />
<annotationconfiguration configurationfile="${src.java}/hibernate.cfg.xml" />
<hbm2ddl export="false" drop="true" outputfilename="schema.sql" />
</hibernatetool>
</target>
SQL:
<path id="project.classpath">
<fileset dir="${lib.dir}" includes="**/*.jar" />
<fileset dir="${weblib.dir}" includes="**/*.jar" />
</path>
<target name="create-init-data"
depends="schema-export"
description="Create Initial Data">
<echo message="Creating initial data..." />
<sql driver="${database.driverClass}"
url="${database.url}"
userid="${database.username}"
password="${database.password}"
onerror="continue">
<classpath>
<path refid="project.classpath" />
</classpath>
<transaction src="${src.etc}/schema.sql" />
<transaction src="${src.etc}/initUserData.sql" />
<transaction src="${src.etc}/initData.sql" />
<transaction src="${src.etc}/initSendBookSortData.sql" />
</sql>
</target>