Dictionary/build.xml

241 lines
12 KiB
XML

<project name="Lex " default="compile" basedir=".">
<path id="classpath">
<fileset dir="webroot/WEB-INF/lib">
<include name="**/*.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" depends="compile" 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="-creatorFirstName"/><arg value="Dan"/>
<arg value="-creatorLastName"/><arg value="Martin"/>
<arg value="-longName"/><arg value="Dan Martin's Tibetan Vocabulary"/>
<arg value="-shortName"/><arg value="Dan Martin"/>
<arg value="-priority"/><arg value="2"/>
<arg value="-format"/><arg value="UTF-16"/>
<arg value="-tab"/>
<arg value="dicts/DanMartin.txt"/>
</java>
</target>
<target name="import-jh" depends="compile" 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="-format"/><arg value="UTF-16"/>
<arg value="-tab"/>
<arg value="-creatorFirstName"/><arg value="Jeffrey"/>
<arg value="-creatorLastName"/><arg value="Hopkins"/>
<arg value="-longName"/><arg value="Jeffrey Hopkins' Tibetan-Sanskrit-English Dictionary"/>
<arg value="-shortName"/><arg value="Jeffrey Hopkins"/>
<arg value="-priority"/><arg value="3"/>
<arg value="dicts/JHTabUnicode.txt"/>
</java>
</target>
<target name="import-tc" depends="compile" 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="-tab"/>
<arg value="-pub-cons"/><arg value="false"/>
<arg value="-creatorFirstName"/><arg value="Andres"/>
<arg value="-creatorLastName"/><arg value="Montano"/>
<arg value="-longName"/><arg value="Great Tibetan-Chinese Dictionary"/>
<arg value="-shortName"/><arg value="Great Dictionary"/>
<arg value="-priority"/><arg value="1"/>
<arg value="dicts/tshig.tab"/>
</java>
</target>
<target name="import-ry" depends="compile" 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="-creatorFirstName"/><arg value="Rangjung"/>
<arg value="-creatorLastName"/><arg value="Yeshe"/>
<arg value="-longName"/><arg value="Rangjung Yeshe Tibetan-English Dictionary"/>
<arg value="-shortName"/><arg value="Rangjung Yeshe"/>
<arg value="-priority"/><arg value="8"/>
<arg value="dicts/ry-dic2003-prop.txt"/>
</java>
</target>
<target name="import-jv" depends="compile" 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="-creatorFirstName"/><arg value="Jim"/>
<arg value="-creatorLastName"/><arg value="Valby"/>
<arg value="-longName"/><arg value="Jim Valby's Tibetan-English Dictionary"/>
<arg value="-shortName"/><arg value="Jim Valby"/>
<arg value="-priority"/><arg value="6"/>
<arg value="dicts/JimValby2002.txt"/>
</java>
</target>
<target name="import-rb" depends="compile" 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="-creatorFirstName"/><arg value="Richard"/>
<arg value="-creatorLastName"/><arg value="Barron"/>
<arg value="-longName"/><arg value="Richard Barron's Tibetan-English Dictionary"/>
<arg value="-shortName"/><arg value="Richard Barron"/>
<arg value="-priority"/><arg value="7"/>
<arg value="dicts/RichardBarron.txt"/>
</java>
</target>
<target name="import-iw" depends="compile" 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="-creatorFirstName"/><arg value="Ives"/>
<arg value="-creatorLastName"/><arg value="Waldo"/>
<arg value="-longName"/><arg value="Ives Waldo's Tibetan-English Dictionary"/>
<arg value="-shortName"/><arg value="Ives Waldo"/>
<arg value="-priority"/><arg value="5"/>
<arg value="dicts/IvesWaldo.txt"/>
</java>
</target>
<target name="import-yb" depends="compile" description="Imports the Yogacara-bhumi glossary into database. ">
<java classname="org.thdl.lex.util.DictionaryImporter" classpathref="classpath" fork="yes">
<classpath>
<pathelement location="${build}/WEB-INF/classes"/>
</classpath>
<arg value="-tab"/>
<arg value="-creatorFirstName"/><arg value="Andres"/>
<arg value="-creatorLastName"/><arg value="Montano"/>
<arg value="-longName"/><arg value="Yogacara-bhumi Glossary"/>
<arg value="-shortName"/><arg value="Yogacara-bhumi"/>
<arg value="-priority"/><arg value="4"/>
<arg value="-format"/><arg value="UTF-16"/>
<arg value="dicts/yogauni.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-tc, import-dm, import-jh, import-yb, import-iw, import-jv, import-rb, import-ry"/>
</project>