229 lines
No EOL
10 KiB
XML
229 lines
No EOL
10 KiB
XML
<project name="Lex" default="compile" basedir=".">
|
|
|
|
<path id="classpath">
|
|
<fileset dir="webroot/WEB-INF/lib">
|
|
<include name="**/*.jar"/>
|
|
</fileset>
|
|
<fileset dir="C:/Program Files/Apache Software Foundation/Tomcat 5.5/common/lib">
|
|
<include name="servlet-api.jar"/>
|
|
<include name="*.jar"/>
|
|
<include name="mysql-connector-java-3.0.15-ga-bin.jar"/>
|
|
</fileset>
|
|
<pathelement location="webroot/WEB-INF/classes"/>
|
|
<pathelement location="webroot/WEB-INF/tld"/>
|
|
</path>
|
|
|
|
<target name="clean">
|
|
<delete dir="webroot/WEB-INF/classes"/>
|
|
<mkdir dir="webroot/WEB-INF/classes"/>
|
|
</target>
|
|
|
|
<target name="compile" description="Compile web application">
|
|
<delete dir="webroot/WEB-INF/classes"/>
|
|
<mkdir dir="webroot/WEB-INF/classes"/>
|
|
<copy todir="webroot/WEB-INF/classes">
|
|
<fileset dir="src/java">
|
|
<exclude name="**/*.java"/>
|
|
</fileset>
|
|
</copy>
|
|
<javac srcdir="src/java" destdir="webroot/WEB-INF/classes" classpathref="classpath">
|
|
<exclude name="org/thdl/lex/commands/RefreshSourcesCommand.java" />
|
|
<exclude name="org/thdl/lex/LexSourceRepository.java" />
|
|
<exclude name="org/thdl/lex/test/**" />
|
|
</javac>
|
|
</target>
|
|
|
|
<target name="hbm2java" description="generate source code">
|
|
<!-- <tstamp prefix="now"/>
|
|
<echo message="time is: ${now.DSTAMP}_${now.TSTAMP}"/>
|
|
<copy todir="${basedir}/backups/lex-src-bkp_${now.DSTAMP}_${now.TSTAMP}">
|
|
<fileset dir="${source}/java/org/thdl/lex/component">
|
|
<include name="**/*.java"/>
|
|
</fileset>
|
|
</copy> -->
|
|
<java classname="net.sf.hibernate.tool.hbm2java.CodeGenerator" classpathref="classpath" fork="yes">
|
|
<arg value="--output=${source}/java"/>
|
|
<arg value="--config=${basedir}/config/lex-codegen-cfg.xml"/>
|
|
<arg value="${source}/java/org/thdl/lex/util/LexComponentDataTransfer.hbm.xml"/>
|
|
<!-- <arg value="${source}/java/org/thdl/lex/component/LexComponent.hbm.xml"/>
|
|
<arg value="${source}/java/org/thdl/lex/component/child/Author.hbm.xml"/>
|
|
<arg value="${source}/java/org/thdl/lex/component/child/Dialect.hbm.xml"/>
|
|
<arg value="${source}/java/org/thdl/lex/component/child/EtymologyType.hbm.xml"/>
|
|
<arg value="${source}/java/org/thdl/lex/component/child/Function.hbm.xml"/>
|
|
<arg value="${source}/java/org/thdl/lex/component/child/FunctionsGeneral.hbm.xml"/>
|
|
<arg value="${source}/java/org/thdl/lex/component/child/FunctionsSpecific.hbm.xml"/>
|
|
<arg value="${source}/java/org/thdl/lex/component/child/Language.hbm.xml"/>
|
|
<arg value="${source}/java/org/thdl/lex/component/child/LiteraryForm.hbm.xml"/>
|
|
<arg value="${source}/java/org/thdl/lex/component/child/LiteraryGenre.hbm.xml"/>
|
|
<arg value="${source}/java/org/thdl/lex/component/child/LiteraryPeriod.hbm.xml"/>
|
|
<arg value="${source}/java/org/thdl/lex/component/child/LiterarySource.hbm.xml"/>
|
|
<arg value="${source}/java/org/thdl/lex/component/child/MajorDialectFamily.hbm.xml"/>
|
|
<arg value="${source}/java/org/thdl/lex/component/child/PhoneticsType.hbm.xml"/>
|
|
<arg value="${source}/java/org/thdl/lex/component/child/ProjectSubject.hbm.xml"/>
|
|
<arg value="${source}/java/org/thdl/lex/component/child/Register.hbm.xml"/>
|
|
<arg value="${source}/java/org/thdl/lex/component/child/RelatedTermType.hbm.xml"/>
|
|
<arg value="${source}/java/org/thdl/lex/component/child/Script.hbm.xml"/>
|
|
<arg value="${source}/java/org/thdl/lex/component/child/Source.hbm.xml"/>
|
|
<arg value="${source}/java/org/thdl/lex/component/child/SpecificDialect.hbm.xml"/>
|
|
<arg value="${source}/java/org/thdl/lex/component/child/SpellingType.hbm.xml"/>
|
|
<arg value="${source}/java/org/thdl/lex/component/child/TransitionalDataLabel.hbm.xml"/> -->
|
|
</java>
|
|
</target>
|
|
|
|
<target name="hbm2ddl" description="generate source code">
|
|
<java classname="net.sf.hibernate.tool.hbm2ddl.SchemaExport" classpathref="classpath" fork="yes">
|
|
<classpath>
|
|
<pathelement location="${build}/WEB-INF/classes"/>
|
|
</classpath>
|
|
<arg value="--output=${source}/sql/lex-schema.sql"/>
|
|
<arg value="--text"/>
|
|
<arg value="--format"/>
|
|
<arg value="--quiet"/>
|
|
<arg value="--delimiter=;"/>
|
|
<arg value="--properties=${basedir}/hibernate.properties"/>
|
|
<arg value="${source}/java/org/thdl/lex/util/LexComponentDataTransfer.hbm.xml"/>
|
|
<!--<arg value="${source}/java/org/thdl/lex/component/child/Author.hbm.xml"/>
|
|
<arg value="${source}/java/org/thdl/lex/component/child/Dialect.hbm.xml"/>
|
|
<arg value="${source}/java/org/thdl/lex/component/child/EtymologyType.hbm.xml"/>
|
|
<arg value="${source}/java/org/thdl/lex/component/child/Function.hbm.xml"/>
|
|
<arg value="${source}/java/org/thdl/lex/component/child/FunctionsGeneral.hbm.xml"/>
|
|
<arg value="${source}/java/org/thdl/lex/component/child/FunctionsSpecific.hbm.xml"/>
|
|
<arg value="${source}/java/org/thdl/lex/component/child/Language.hbm.xml"/>
|
|
<arg value="${source}/java/org/thdl/lex/component/child/LiteraryForm.hbm.xml"/>
|
|
<arg value="${source}/java/org/thdl/lex/component/child/LiteraryGenre.hbm.xml"/>
|
|
<arg value="${source}/java/org/thdl/lex/component/child/LiteraryPeriod.hbm.xml"/>
|
|
<arg value="${source}/java/org/thdl/lex/component/child/LiterarySource.hbm.xml"/>
|
|
<arg value="${source}/java/org/thdl/lex/component/child/MajorDialectFamily.hbm.xml"/>
|
|
<arg value="${source}/java/org/thdl/lex/component/child/PhoneticsType.hbm.xml"/>
|
|
<arg value="${source}/java/org/thdl/lex/component/child/ProjectSubject.hbm.xml"/>
|
|
<arg value="${source}/java/org/thdl/lex/component/child/Register.hbm.xml"/>
|
|
<arg value="${source}/java/org/thdl/lex/component/child/RelatedTermType.hbm.xml"/>
|
|
<arg value="${source}/java/org/thdl/lex/component/child/Script.hbm.xml"/>
|
|
<arg value="${source}/java/org/thdl/lex/component/child/Source.hbm.xml"/>
|
|
<arg value="${source}/java/org/thdl/lex/component/child/SpecificDialect.hbm.xml"/>
|
|
<arg value="${source}/java/org/thdl/lex/component/child/SpellingType.hbm.xml"/>
|
|
<arg value="${source}/java/org/thdl/lex/component/child/TransitionalDataLabel.hbm.xml"/>-->
|
|
</java>
|
|
</target>
|
|
|
|
<target name="schema-update">
|
|
<taskdef name="schemaupdate" classname="net.sf.hibernate.tool.hbm2ddl.SchemaUpdateTask" classpathref="classpath"/>
|
|
<schemaupdate>
|
|
<fileset dir="src">
|
|
<include name="**/*.hbm.xml"/>
|
|
</fileset>
|
|
</schemaupdate>
|
|
</target>
|
|
|
|
<target name="convert-to-new-mapping" description="convert old data to a new db mapping" depends="compile">
|
|
<java classname="org.thdl.lex.utilConvertDataToNewMapping" classpathref="classpath" fork="yes">
|
|
<classpath>
|
|
<pathelement location="${build}/WEB-INF/classes"/>
|
|
</classpath>
|
|
<arg value="${source}/java/org/thdl/lex/util/hibernate-data-transfer.cfg.xml"/>
|
|
</java>
|
|
</target>
|
|
|
|
<target name="import-dm" description="Imports Dan Martin's dictionary into database.">
|
|
<java classname="org.thdl.lex.util.DictionaryImporter" classpathref="classpath" fork="yes">
|
|
<classpath>
|
|
<pathelement location="webroot/WEB-INF/classes"/>
|
|
</classpath>
|
|
<arg value="-manual"/>
|
|
<arg value="-format"/><arg value="UTF-16"/>
|
|
<arg value="-tab"/>
|
|
<arg value="-creator"/><arg value="9"/>
|
|
<arg value="-proj"/><arg value="18"/>
|
|
<arg value="-label"/><arg value="3"/>
|
|
<arg value="-note"/><arg value=""/>
|
|
<arg value="dicts/DanMartin.txt"/>
|
|
</java>
|
|
</target>
|
|
<target name="import-jh" description="Imports Jeffrey Hopkins' dictionary into database. ">
|
|
<java classname="org.thdl.lex.util.DictionaryImporter" classpathref="classpath" fork="yes">
|
|
<classpath>
|
|
<pathelement location="${build}/WEB-INF/classes"/>
|
|
</classpath>
|
|
<arg value="-manual"/>
|
|
<arg value="-format"/><arg value="UTF-16"/>
|
|
<arg value="-tab"/>
|
|
<arg value="-creator"/><arg value="95"/>
|
|
<arg value="-proj"/><arg value="19"/>
|
|
<arg value="-label"/><arg value="4"/>
|
|
<arg value="-note"/><arg value=""/>
|
|
<arg value="dicts/JHTabUnicode.txt"/>
|
|
</java>
|
|
</target>
|
|
<target name="import-tc" description="Imports The Great Tibetan-Chinese Dictionary into database. ">
|
|
<java classname="org.thdl.lex.util.DictionaryImporter" classpathref="classpath" fork="yes">
|
|
<classpath>
|
|
<pathelement location="${build}/WEB-INF/classes"/>
|
|
</classpath>
|
|
<arg value="-manual"/>
|
|
<arg value="-tab"/>
|
|
<arg value="-creator"/><arg value="80"/>
|
|
<arg value="-proj"/><arg value="23"/>
|
|
<arg value="-pub-cons"/><arg value="false"/>
|
|
<arg value="-label"/><arg value="2"/>
|
|
<arg value="-note"/><arg value=""/>
|
|
<arg value="dicts/tshig.tab"/>
|
|
</java>
|
|
</target>
|
|
<target name="import-ry" description="Imports Rangjung Yeshe's dictionary into database. ">
|
|
<java classname="org.thdl.lex.util.DictionaryImporter" classpathref="classpath" fork="yes">
|
|
<classpath>
|
|
<pathelement location="${build}/WEB-INF/classes"/>
|
|
</classpath>
|
|
<arg value="-manual"/>
|
|
<arg value="-creator"/><arg value="4"/>
|
|
<arg value="-proj"/><arg value="16"/>
|
|
<arg value="-label"/><arg value="1"/>
|
|
<arg value="-note"/><arg value=""/>
|
|
<arg value="dicts/ry-dic2003-prop.txt"/>
|
|
</java>
|
|
</target>
|
|
<target name="import-jv" description="Imports Jim Valby's dictionary into database. ">
|
|
<java classname="org.thdl.lex.util.DictionaryImporter" classpathref="classpath" fork="yes">
|
|
<classpath>
|
|
<pathelement location="${build}/WEB-INF/classes"/>
|
|
</classpath>
|
|
<arg value="-manual"/>
|
|
<arg value="-creator"/><arg value="96"/>
|
|
<arg value="-proj"/><arg value="20"/>
|
|
<arg value="-label"/><arg value="5"/>
|
|
<arg value="-note"/><arg value=""/>
|
|
<arg value="dicts/JimValby2002-trimmed.txt"/>
|
|
</java>
|
|
</target>
|
|
|
|
<target name="import-rb" description="Imports Richard Barron's dictionary into database. ">
|
|
<java classname="org.thdl.lex.util.DictionaryImporter" classpathref="classpath" fork="yes">
|
|
<classpath>
|
|
<pathelement location="${build}/WEB-INF/classes"/>
|
|
</classpath>
|
|
<arg value="-manual"/>
|
|
<arg value="-creator"/><arg value="97"/>
|
|
<arg value="-proj"/><arg value="21"/>
|
|
<arg value="-label"/><arg value="6"/>
|
|
<arg value="-note"/><arg value=""/>
|
|
<arg value="dicts/RichardBarron.txt"/>
|
|
</java>
|
|
</target>
|
|
|
|
<target name="import-iw" description="Imports Ives Waldo's dictionary into database. ">
|
|
<java classname="org.thdl.lex.util.DictionaryImporter" classpathref="classpath" fork="yes">
|
|
<classpath>
|
|
<pathelement location="${build}/WEB-INF/classes"/>
|
|
</classpath>
|
|
<arg value="-manual"/>
|
|
<arg value="-creator"/><arg value="98"/>
|
|
<arg value="-proj"/><arg value="22"/>
|
|
<arg value="-label"/><arg value="7"/>
|
|
<arg value="-note"/><arg value=""/>
|
|
<arg value="dicts/IvesWaldo.txt"/>
|
|
</java>
|
|
</target>
|
|
|
|
<!-- <target name="import-all" depends="import-dm, import-jh, import-tc, import-ry import-jv,import-rb, import-iw"/> -->
|
|
<target name="import-all" depends="import-dm, import-jh, import-tc, import-jv,import-rb, import-iw"/>
|
|
</project> |