|
| 1 | +<?xml version='1.0'?> |
| 2 | +<project name="ED" default="compile" basedir="."> |
| 3 | + |
| 4 | + <property name="targetdir" location="target"/> |
| 5 | + <property name="testdir" location="${targetdir}/test"/> |
| 6 | + |
| 7 | + |
| 8 | + <path id="classpath"> |
| 9 | + <fileset dir="include"> |
| 10 | + <include name="**/*.jar"/> |
| 11 | + </fileset> |
| 12 | + <pathelement path="conf" /> |
| 13 | + <pathelement path="build" /> |
| 14 | + |
| 15 | + </path> |
| 16 | + |
| 17 | + <target name="init"> |
| 18 | + <mkdir dir="build" /> |
| 19 | + <mkdir dir="logs" /> |
| 20 | + <mkdir dir="${testdir}" /> |
| 21 | + </target> |
| 22 | + |
| 23 | + <target name="clean"> |
| 24 | + <delete dir="build"/> |
| 25 | + </target> |
| 26 | + |
| 27 | + <target name="compile" depends="init"> |
| 28 | + |
| 29 | + <javac srcdir="src/main/ed" |
| 30 | + destdir="build" |
| 31 | + optimize="off" |
| 32 | + deprecation="off" |
| 33 | + source="1.5" |
| 34 | + encoding="ISO-8859-1" |
| 35 | + memoryMaximumSize="256M" |
| 36 | + fork="true" |
| 37 | + debug="on" > |
| 38 | + <classpath refid="classpath"/> |
| 39 | + </javac> |
| 40 | + |
| 41 | + <javac srcdir="src/test" |
| 42 | + destdir="build" |
| 43 | + optimize="off" |
| 44 | + deprecation="off" |
| 45 | + source="1.5" |
| 46 | + encoding="ISO-8859-1" |
| 47 | + debug="on" > |
| 48 | + <classpath refid="classpath"/> |
| 49 | + </javac> |
| 50 | + |
| 51 | + </target> |
| 52 | + |
| 53 | + |
| 54 | + <target name="javadocs" depends="compile"> |
| 55 | + |
| 56 | + <javadoc packagenames="ed.*" |
| 57 | + sourcepath="src/main/" |
| 58 | + defaultexcludes="yes" |
| 59 | + destdir="docs/" |
| 60 | + author="true" |
| 61 | + version="true" |
| 62 | + source="1.5" |
| 63 | + use="true" |
| 64 | + access="package" |
| 65 | + > |
| 66 | + <link href="http://java.sun.com/j2se/1.5/docs/api/" /> |
| 67 | + <classpath refid="classpath"/> |
| 68 | + </javadoc> |
| 69 | + |
| 70 | + </target> |
| 71 | + |
| 72 | + <target name="rebuild" depends="clean, compile"/> |
| 73 | + |
| 74 | + <!-- - - - - - - - - - - - - - - - - - - - - - --> |
| 75 | + <!-- test stuff --> |
| 76 | + <!-- - - - - - - - - - - - - - - - - - - - - - --> |
| 77 | + |
| 78 | + <taskdef name="testng" |
| 79 | + classpathref="classpath" |
| 80 | + classname="org.testng.TestNGAntTask" |
| 81 | + > |
| 82 | + </taskdef> |
| 83 | + |
| 84 | + |
| 85 | + <target name="test" depends="compile, test-basic" /> |
| 86 | + |
| 87 | + |
| 88 | + <target name="test-basic" depends="init, compile"> |
| 89 | + <testng classpathref="classpath" outputdir="${testdir}" listeners="ed.TestNGListener" haltonfailure="true" > |
| 90 | + <jvmarg value="-Xmx512M" /> |
| 91 | + <xmlfileset dir="." includes="testng.xml"/> |
| 92 | + <sysproperty key="TESTNG:CODE_ROOT" value="${codeRoot}"/> |
| 93 | + </testng> |
| 94 | + </target> |
| 95 | + |
| 96 | + <target name="test-mql" depends="compile, init"> |
| 97 | + <testng classpathref="classpath" |
| 98 | + outputDir="${testdir}" |
| 99 | + haltOnFailure="true" verbose="2"> |
| 100 | + <classfileset dir="build" includes="ed/db/mql/*Test.class" /> |
| 101 | + </testng> |
| 102 | + </target> |
| 103 | + |
| 104 | +</project> |
0 commit comments