1 <!-- Simple Ant build script to test an Ant installation -->
2 <project name="TestInstall" default="all" basedir=".">
3 <property environment="env" />
4 <property name="src" value="." />
5 <property name="build" value=".build" />
6 <property name="build-lib" value="${build}/lib" />
7 <property name="build-tests" value="${build}/tests" />
8 <property name="jarfile" value="${build}/metux-java.jar" />
9 <property name="jar_install_dir" value="${env.HOME}/.jar" />
11 <target name="compile-lib-util">
12 <mkdir dir="${build-lib}" />
13 <javac destdir="${build-lib}" srcdir="${src}/util" debug="on" classpath=".">
14 <include name="CachedDatasource.java"/>
15 <include name="CmdLineSplitter.java"/>
16 <!-- <include name="Decompressor.java"/> -->
17 <include name="Depend.java"/>
18 <include name="Environment.java"/>
19 <include name="Exec.java"/>
20 <include name="FileOps.java"/>
21 <include name="FileStock.java"/>
22 <include name="HTMLEntities.java"/>
23 <!-- <include name="IPTools.java"/> -->
24 <include name="LoadFile.java"/>
25 <include name="PathNormalize.java"/>
26 <include name="PathNormalizer.java"/>
27 <!-- <include name="SendMail.java"/> -->
28 <include name="ShellEscape.java"/>
29 <include name="ShellVariableDef.java"/>
30 <include name="SimpleSMTPClient.java"/>
31 <include name="StoreFile.java"/>
32 <include name="StrReplace.java"/>
33 <include name="StrSplit.java"/>
34 <include name="StrUtil.java"/>
35 <include name="Stringtable.java"/>
36 <include name="Terminal.java"/>
37 <include name="TextDB.java"/>
38 <include name="TextTable.java"/>
39 <include name="URLDownloader.java"/>
40 <include name="URLEncode.java"/>
41 <include name="UniqueNameList.java"/>
42 <include name="UniqueValues.java"/>
43 <include name="VFile.java"/>
44 <include name="Version.java"/>
45 <include name="VersionStack.java"/>
46 <include name="mkdir.java"/>
47 <include name="rm.java"/>
48 <include name="SQL_Encode.java"/>
52 <target name="compile-lib-log" depends="compile-lib-util">
53 <mkdir dir="${build-lib}" />
54 <javac destdir="${build-lib}" srcdir="${src}/log" debug="on" classpath="${build-lib}">
55 <include name="LoggerDummy.java"/>
56 <include name="ILogger.java"/>
57 <include name="LoggerASCII.java"/>
58 <include name="LoglevelID.java"/>
59 <include name="LoggerTerm.java"/>
63 <target name="compile-lib-propertylist" depends="compile-lib-util">
64 <mkdir dir="${build-lib}" />
65 <javac destdir="${build-lib}" srcdir="${src}/propertylist" debug="on" classpath="${build-lib}">
66 <include name="EProcessingError.java"/>
67 <include name="FallbackPropertylist.java"/>
68 <include name="EVariableParseError.java"/>
69 <include name="IPropertylist.java"/>
70 <include name="Propertylist.java"/>
71 <include name="EBrokenBoolRepresentation.java"/>
72 <include name="IPostprocessor.java"/>
73 <include name="EInfiniteRecursion.java"/>
74 <include name="EIllegalValue.java"/>
78 <target name="compile-tests" depends="link-lib,compile-lib-util,compile-lib-log,compile-lib-propertylist">
79 <mkdir dir="${build-tests}" />
80 <javac destdir="${build-tests}" srcdir="${src}/tests" debug="on" classpath="${jarfile}">
81 <include name="_test_util.java"/>
82 <include name="_test_log.java"/>
86 <target name="link-lib" depends="compile-lib">
87 <jar jarfile="${jarfile}" basedir="${build-lib}"/>
90 <target name="run-tests" depends="compile-tests">
91 <java classname="_test_util" classpath="${jarfile}:${build-tests}" />
92 <java classname="_test_log" classpath="${jarfile}:${build-tests}" />
95 <target name="compile-lib" depends="compile-lib-util,compile-lib-log,compile-lib-propertylist" />
97 <target name="compile" depends="compile-lib" />
98 <target name="all" depends="compile,run-tests" />
100 <target name="clean">
101 <delete dir="${build-tests}" />
102 <delete dir="${build-lib}" />
103 <delete dir="${build}" />
104 <delete file="${jarfile}" />
107 <target name="install" depends="compile,run-tests">
108 <mkdir dir="${jar_install_dir}" />
109 <copy file="${jarfile}" todir="${jar_install_dir}" />