-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.xml
125 lines (112 loc) · 3.77 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
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
<?xml version="1.0" encoding="UTF-8"?>
<project name="Paxos" default="build" basedir=".">
<property name="sources" location="${basedir}/src" />
<property name="test.dir" location="${basedir}/test" />
<property name="classes" location="${basedir}/bin" />
<property name="javadoc" location="${basedir}/doc/javadoc" />
<property name="version" value="1.0" />
<property name="report.dir" value="${classes}/junitreport" />
<target name="clean">
<delete dir="${classes}" />
<delete dir="${javadocs}" />
</target>
<!--
<target name="build" depends="checkstyle">
-->
<target name="build">
<mkdir dir="${classes}" />
<javac srcdir="${sources}" destdir="${classes}" debug="on" debuglevel="lines,vars,source" includeantruntime="false" target="1.6">
<classpath>
<pathelement location="${classes}" />
<fileset dir="lib" includes="**/*.jar" />
</classpath>
<include name="**/*.java" />
<compilerarg value="-Xlint:deprecation" />
</javac>
</target>
<target name="build-test" depends="build">
<mkdir dir="${classes}" />
<javac srcdir="${test.dir}" destdir="${classes}" debug="on" debuglevel="lines,vars,source" includeantruntime="false" target="1.6">
<classpath>
<pathelement location="${classes}" />
<fileset dir="lib" includes="**/*.jar" />
</classpath>
<include name="**/*.java" />
<compilerarg value="-Xlint:deprecation" />
</javac>
</target>
<target name="javadoc" description="Create Javadocs">
<mkdir dir="${javadoc}" />
<javadoc destdir="${javadoc}">
<fileset dir="${sources}" includes="**/*.java" />
</javadoc>
</target>
<target name="jar" depends="build" description="Build a jar file with the library">
<jar destfile="jpaxos.jar" basedir="${classes}" />
</target>
<target name="zip-source" depends="javadoc"
description="Packages the source code and build script into a zip file">
<zip destfile="jpaxos-${version}-src.zip">
<zipfileset dir="${sources}" prefix="src"/>
<zipfileset dir="lib" includes="*.jar" prefix="lib"/>
<fileset dir="${basedir}"
includes="build.xml
paxos.properties
logging.properties
hashmap_client.sh
hashmap_replica.sh
README.md
LICENSE
LGPL-3
checkstyle.xml"/>
</zip>
</target>
<target name="zip-binary" depends="jar, javadoc"
description="Packages the binary distribution">
<zip destfile="jpaxos-${version}.zip">
<zipfileset dir="${javadoc}" prefix="docs/javadocs"/>
<zipfileset dir="${basedir}/doc" includes="jpaxos-userguide-1.0.pdf" prefix="docs"/>
<fileset dir="${basedir}" includes=
"jpaxos.jar
paxos.properties
logging.properties
hashmap_client.sh
hashmap_replica.sh
LICENSE
LGPL-3
README.md"/>
</zip>
</target>
<target name="zips" depends="zip-source,zip-binary"/>
<target name="test" depends="build-test">
<mkdir dir="${report.dir}" />
<junit haltonfailure="true" fork="true">
<classpath>
<pathelement location="${classes}" />
<fileset dir="lib" includes="**/*.jar" />
</classpath>
<formatter type="xml" />
<batchtest todir="${report.dir}">
<fileset dir="${test.dir}" includes="**/*Test.java" />
</batchtest>
<assertions>
<enable />
</assertions>
</junit>
</target>
<target name="junitreport">
<junitreport todir="${report.dir}">
<fileset dir="${report.dir}" includes="TEST-*.xml" />
<report todir="${report.dir}" />
</junitreport>
</target>
<!--
<taskdef resource="checkstyletask.properties" classpath="lib/checkstyle-5.3-all.jar" />
<target name="checkstyle">
<checkstyle config="checkstyle.xml" failOnViolation="false">
<fileset dir="${sources}" includes="**/*.java" />
<fileset dir="${test.dir}" includes="**/*.java" />
</checkstyle>
</target>
-->
</project>