-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathbuild.xml
81 lines (72 loc) · 2.68 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
<project name="cassandra" default="dist" basedir=".">
<description>Cassandra platform build file</description>
<!-- set global properties for this build -->
<property name="src" location="src"/>
<property name="build" location="build"/>
<property name="build.bin" location="build/bin"/>
<property name="build.doc" value="build/doc"/>
<property name="dist" location="dist"/>
<property name="lib" location="WebContent/WEB-INF/lib"/>
<property name="webinf" location="WebContent/WEB-INF"/>
<property name="build.compiler" value="modern"/>
<path id="classpath">
<fileset dir="${lib}">
<include name="**/*.jar"/>
</fileset>
</path>
<path id="application" location="${build}/${ant.project.name}.jar"/>
<target name="init" depends="clean">
<!-- Create the time stamp -->
<tstamp/>
<echo message="${TSTAMP}"/>
<!-- Create the build directory structure used by compile -->
<mkdir dir="${build}"/>
<mkdir dir="${build.bin}"/>
<mkdir dir="${dist}"/>
</target>
<target name="compile" depends="init" description="compile the source">
<javac includeantruntime="false" source="7" target="7" destdir="${build.bin}" deprecation="on">
<src path="${src}"/>
<classpath refid="classpath"/>
<classpath refid="application"/>
</javac>
<!-- Package the application into a JAR -->
<jar jarfile="${build}/${ant.project.name}.jar" basedir="${build.bin}" />
</target>
<target name="junit" depends="compile">
<echo message="${ant.project.name}"/>
<junit printsummary="yes">
<classpath>
<path refid="classpath"/>
<path refid="application"/>
</classpath>
<batchtest fork="yes">
<fileset dir="${src}" includes="**/*Test.java"/>
</batchtest>
</junit>
</target>
<!-- Generate the API documentation-->
<target name="javadoc" depends="compile">
<mkdir dir="${build.doc}"/>
<javadoc packagenames="eu.cassandra.*"
sourcepath="${src}"
destdir="${build.doc}"
author="true"
version="true"
use="true" >
<classpath refid="classpath"/>
</javadoc>
</target>
<target name="dist" depends="compile, junit" description="generate the distribution (war file)" >
<war destfile="${dist}/cassandra.war" webxml="${webinf}/web.xml">
<fileset dir="WebContent" excludes="WEB-INF/"/>
<lib dir="${lib}"></lib>
<classes dir="${build.bin}"/>
</war>
</target>
<target name="clean" description="clean up" >
<!-- Delete the ${build} and ${dist} directory trees -->
<delete dir="${build}"/>
<delete dir="${dist}"/>
</target>
</project>