-
Notifications
You must be signed in to change notification settings - Fork 6
/
build.xml
67 lines (62 loc) · 2.57 KB
/
build.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
<?xml version="1.0" encoding="UTF-8" ?>
<project name="AntTestDemo" default="run" basedir=".">
<property name="src" value="src"/>
<property name="test" value="test"/>
<property name="classes_src" value="tmp\classes_src"/>
<property name="classes_test" value="tmp\classes_test"/>
<property name="test_jar" value="tmp\testJavaApi.jar"/>
<property name="src_jar" value="tmp\dolphindb.jar"/>
<property name="lib.dir" value="lib"/>
<property name="junit_jar" value="${lib.dir}/junit-4.12.jar"/>
<property name="hamcrest_jar" value="${lib.dir}/hamcrest-library-1.3.jar"/>
<property name="hamcrest_core_jar" value="${lib.dir}/hamcrest-core-1.3.jar"/>
<property name="fastjson_jar" value="${lib.dir}/fastjson-1.2.2.jar"/>
<property name="lz4_jar" value="${lib.dir}/lz4-java-1.7.1.jar"/>
<path id="compile.path">
<!-- <pathelement location="${lib.dir}/junit-4.12.jar"/> -->
<fileset dir="${lib.dir}">
<include name="*.jar"/>
</fileset>
</path>
<target name="init">
<mkdir dir="${classes_src}"/>
<mkdir dir="${classes_test}"/>
</target>
<target name="compilesrc" depends="init">
<javac srcdir="${src}" classpath="${junit_jar}" destdir="${classes_src}" includeantruntime="false" />
</target>
<target name="buildsrc" depends="compilesrc">
<jar jarfile="${src_jar}" basedir="${classes_src}" />
</target>
<target name="JUNIT">
<available property="junit.present" classname="junit.framework.TestCase" />
</target>
<target name="compiletest" depends="buildsrc">
<!-- <javac srcdir="${test}" destdir="${dest}"/> -->
<javac srcdir="${test}" classpath="${src_jar};${junit_jar};${hamcrest_jar};${hamcrest_core_jar};${fastjson_jar};${lz4_jar}" destdir="${classes_test}" includeantruntime="false" classpathref="compile.path"/>
</target>
<target name="buildtest" depends="compiletest">
<jar jarfile="${test_jar}" basedir="${classes_test}"/>
</target>
<target name="run" depends="buildtest">
<junit printsummary="true" haltonfailure="no">
<classpath path="tmp;${junit_jar};${hamcrest_jar};${hamcrest_core_jar};${fastjson_jar};${lz4_jar};${test_jar};${src_jar}"></classpath>
<formatter type="plain"/>
<test name="com.xxdb.DBConnectionTest"></test>
</junit>
</target>
<!-- <target name="run" depends="buildtest">
<java classname="com.xxdb.TestMain" classpath="${test_jar};${src_jar}">
<arg value="127.0.0.1"/>
<arg value="28848"/>
</java>
</target>
<target name="clean">
<delete file="${dest}" />
<delete file="${helloant_jar}" />
</target>
<target name="rerun" depends="clean,run">
<ant target="clean" />
<ant target="run" />
</target> -->
</project>