1 <project name="metux-java" default="all" basedir=".">
2 <property environment="env" />
3 <property name="src" value="." />
4 <property name="build" value=".build" />
5 <property name="build-lib" value="${build}/lib" />
6 <property name="build-tests" value="${build}/tests" />
7 <property name="jarfile" value="${build}/metux-java.jar" />
8 <property name="jar_install_dir" value="${env.HOME}/.jar" />
10 <target name="compile-lib-util">
11 <mkdir dir="${build-lib}" />
12 <javac destdir="${build-lib}" srcdir="${src}/util" debug="on" classpath="." includeantruntime="false">
13 <include name="CachedDatasource.java"/>
14 <include name="CmdLineSplitter.java"/>
15 <include name="Depend.java"/>
16 <include name="Environment.java"/>
17 <include name="Exec.java"/>
18 <include name="Filename.java"/>
19 <include name="FileOps.java"/>
20 <include name="FileStock.java"/>
21 <include name="HTMLEntities.java"/>
22 <include name="LoadFile.java"/>
23 <include name="PathNormalize.java"/>
24 <include name="PathNormalizer.java"/>
25 <include name="ShellEscape.java"/>
26 <include name="ShellVariableDef.java"/>
27 <include name="SimpleSMTPClient.java"/>
28 <include name="StoreFile.java"/>
29 <include name="StrReplace.java"/>
30 <include name="StrSplit.java"/>
31 <include name="StrUtil.java"/>
32 <include name="Stringtable.java"/>
33 <include name="Terminal.java"/>
34 <include name="TextDB.java"/>
35 <include name="TextTable.java"/>
36 <include name="URLDownloader.java"/>
37 <include name="URLEncode.java"/>
38 <include name="UniqueNameList.java"/>
39 <include name="UniqueValues.java"/>
40 <include name="VFile.java"/>
41 <include name="Version.java"/>
42 <include name="VersionStack.java"/>
43 <include name="mkdir.java"/>
44 <include name="rm.java"/>
45 <include name="SQL_Encode.java"/>
49 <target name="compile-lib-log" depends="compile-lib-util">
50 <mkdir dir="${build-lib}" />
51 <javac destdir="${build-lib}" srcdir="${src}/log" debug="on" classpath="${build-lib}" includeantruntime="false">
52 <include name="LoggerDummy.java"/>
53 <include name="ILogger.java"/>
54 <include name="LoggerASCII.java"/>
55 <include name="LoglevelID.java"/>
56 <include name="LoggerTerm.java"/>
60 <target name="compile-lib-propertylist" depends="compile-lib-util">
61 <mkdir dir="${build-lib}" />
62 <javac destdir="${build-lib}" srcdir="${src}/propertylist" debug="on" classpath="${build-lib}" includeantruntime="false">
63 <include name="EProcessingError.java"/>
64 <!-- <include name="FallbackPropertylist.java"/> -->
65 <include name="EVariableParseError.java"/>
66 <include name="EVariableNull.java"/>
67 <include name="EVariableEmpty.java"/>
68 <include name="IPropertylist.java"/>
69 <include name="Propertylist.java"/>
70 <include name="EBrokenBoolRepresentation.java"/>
71 <include name="IPostprocessor.java"/>
72 <include name="EInfiniteRecursion.java"/>
73 <include name="EIllegalValue.java"/>
77 <target name="compile-lib-datasource" depends="compile-lib-util">
78 <mkdir dir="${build-lib}" />
79 <javac destdir="${build-lib}" srcdir="${src}/datasource" debug="on" classpath="${build-lib}" includeantruntime="false">
80 <include name="ITextDB_Loader.java"/>
81 <include name="IContent_Loader.java"/>
82 <include name="TextTable.java"/>
83 <include name="TextTable_List.java" />
84 <include name="Cached_TextTable_Loader.java"/>
85 <include name="Cached_TextDB_Loader.java"/>
86 <include name="Cached_Content_Loader.java"/>
90 <target name="compile-tests" depends="link-lib,compile-lib-util,compile-lib-log,compile-lib-propertylist">
91 <mkdir dir="${build-tests}" />
92 <javac destdir="${build-tests}" srcdir="${src}/tests" debug="on" classpath="${jarfile}" includeantruntime="false">
93 <include name="_test_util.java"/>
94 <include name="_test_log.java"/>
98 <target name="link-lib" depends="compile-lib">
99 <jar jarfile="${jarfile}" basedir="${build-lib}"/>
102 <target name="run-tests" depends="compile-tests">
103 <java classname="_test_util" classpath="${jarfile}:${build-tests}" />
104 <java classname="_test_log" classpath="${jarfile}:${build-tests}" />
107 <target name="compile-lib" depends="compile-lib-util,compile-lib-datasource,compile-lib-log,compile-lib-propertylist" />
109 <target name="compile" depends="compile-lib" />
110 <target name="all" depends="compile,run-tests" />
112 <target name="clean">
113 <delete dir="${build-tests}" />
114 <delete dir="${build-lib}" />
115 <delete dir="${build}" />
116 <delete file="${jarfile}" />
119 <target name="install" depends="compile,run-tests">
120 <mkdir dir="${jar_install_dir}" />
121 <copy file="${jarfile}" todir="${jar_install_dir}" />