This repository has been archived by the owner on Dec 8, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.xml
101 lines (87 loc) · 3.35 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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
<project name="testng-gigaspaces" default="both" basedir=".">
<target name="init">
<tstamp />
<property file="../build.properties" />
<property file="build.properties" />
<!-- Settings -->
<property name="jdk" value="jdk15" />
<property name="optimize" value="false" />
<property name="debug" value="true" />
<!-- Directories -->
<property name="src.dir" location="src" />
<property name="topbuild.dir" location="build" />
<property name="build.dir" location="${topbuild.dir}/${jdk}" />
<property name="classes.dir" location="${build.dir}/classes" />
<property name="dependencies.dir" location="3rdparty" />
<property name="topjavadocs.dir" location="javadocs" />
<property name="javadocs.dir" location="${topjavadocs.dir}/${jdk}" />
<property name="testng.gigaspaces.jar" location="testng-gigaspaces-${jdk}.jar" />
<condition property="source.version" value="1.4">
<equals arg1="${jdk}" arg2="jdk14"/>
</condition>
<condition property="source.version" value="1.5">
<equals arg1="${jdk}" arg2="jdk15"/>
</condition>
</target>
<target name="paths" depends="init">
<path id="src.path">
<pathelement path="${src.dir}" />
</path>
<path id="compile.path">
<fileset dir="${dependencies.dir}">
<include name="*.jar" />
</fileset>
<pathelement path="../testng-${testng.version}-${jdk}.jar" />
</path>
</target>
<target name="compile" depends="paths" description="compile sources">
<echo message=" -- Compiling ${jdk} sources --" />
<mkdir dir="${classes.dir}"/>
<javac target="jsr14"
debug="${debug}" optimize="${optimize}"
destdir="${classes.dir}">
<src refid="src.path" />
<classpath refid="compile.path" />
</javac>
</target>
<target name="jar" depends="compile">
<echo message=" -- Creating ${jdk} jar --" />
<jar destfile="${testng.gigaspaces.jar}">
<fileset dir="${classes.dir}" />
</jar>
</target>
<target name="javadoc" depends="paths" description="generate api documentation">
<echo message=" -- Generating javadocs for ${jdk} --" />
<mkdir dir="${javadocs.dir}" />
<javadoc destdir="${javadocs.dir}" source="${source.version}" windowtitle="TestNG GigaSpaces Support" classpathref="compile.path">
<fileset dir="${src.dir}/common" defaultexcludes="yes" includes="**/*.java" />
<fileset dir="${src.dir}/${jdk}" defaultexcludes="yes" includes="**/*.java" />
</javadoc>
</target>
<target name="both">
<property name="target" value="jar"/>
<antcall target="${target}">
<param name="jdk" value="jdk14"/>
</antcall>
<antcall target="${target}">
<param name="jdk" value="jdk15"/>
</antcall>
</target>
<target name="dist" description="builds both jdk14 and jdk15 variants">
<antcall target="both">
<param name="target" value="jar"/>
</antcall>
</target>
<target name="javadocs" description="builds both jdk14 and jdk15 javadocs">
<antcall target="both">
<param name="target" value="javadoc"/>
</antcall>
</target>
<target name="all" depends="dist,javadocs" description="build jar files and javadocs" />
<target name="clean" depends="paths" description="cleans all">
<delete dir="${topbuild.dir}" />
<delete dir="${topjavadocs.dir}" />
<delete file="testng-gigaspaces-jdk14.jar" />
<delete file="testng-gigaspaces-jdk15.jar" />
</target>
</project>