-
Notifications
You must be signed in to change notification settings - Fork 13
/
build.xml
130 lines (113 loc) · 4.14 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
126
127
128
129
130
<?xml version="1.0"?>
<project name="guiceberry" default="compile">
<property environment="env"/>
<property file="build.properties"/>
<target name="compile" description="Compile Java source.">
<mkdir dir="${build.dir}/classes"/>
<javac srcdir="${src.dir}"
debug="on"
source="${compile.source}"
target="${compile.target}"
destdir="${build.dir}/classes"
includeantruntime="false"
classpathref="project.class.path">
</javac>
</target>
<path id="project.class.path">
<pathelement location="${build.dir}/classes"/>
<pathelement location="${lib.dir}/aopalliance-1.0.jar"/>
<pathelement location="${lib.dir}/easymock.jar"/>
<pathelement location="${lib.dir}/guava-23.0.jar"/>
<pathelement location="${lib.dir}/guava-testlib-18.0.jar"/>
<pathelement location="${lib.dir}/guice-4.1.0.jar"/>
<pathelement location="${lib.dir}/guice-servlet-4.1.0.jar"/>
<pathelement location="${lib.dir}/hamcrest-core-1.3.jar"/>
<pathelement location="${lib.dir}/javax.inject.jar"/>
<pathelement location="${lib.dir}/junit-4.12.jar"/>
<pathelement location="${lib.dir}/servlet-api-2.5.jar"/>
</path>
<target name="test.compile"
depends="compile"
description="Compile test source.">
<mkdir dir="${build.dir}/test"/>
<javac srcdir="${test.dir}"
debug="on"
source="${compile.source}"
target="${compile.target}"
destdir="${build.dir}/test"
classpathref="project.class.path"
includeantruntime="false">
</javac>
</target>
<target name="test"
depends="test.compile"
description="Execute JUnit tests.">
<mkdir dir="${build.dir}/junitreport"/>
<junit
printsummary="yes"
haltonfailure="yes">
<classpath
refid="project.class.path"/>
<classpath>
<pathelement location="${build.dir}/test"/>
</classpath>
<formatter type="plain"/>
<batchtest fork="true" todir="${build.dir}/junitreport">
<fileset dir="${test.dir}">
<include name="**/*Test*.java"/>
<exclude name="**/AllTests.java"/>
<exclude name="**/TearDownTestCase.java"/>
</fileset>
</batchtest>
</junit>
</target>
<target name="clean"
description="Remove generated files.">
<delete dir="${build.dir}"/>
</target>
<target name="jar" depends="compile" description="Build jar.">
<mkdir dir="${build.dir}/dist"/>
<mkdir dir="${build.dir}/dist/guiceberry-${version}"/>
<jar jarfile="${build.dir}/dist/guiceberry-${version}/guiceberry-${version}.jar">
<fileset dir="${build.dir}/classes"/>
</jar>
</target>
<target name="jarsrc" description="Build jar of source.">
<jar jarfile="${build.dir}/dist/guiceberry-${version}/guiceberry-${version}-src.jar">
<fileset dir="${src.dir}"/>
</jar>
</target>
<target name="tutorialsrc" description="Build jar of tutorial.">
<jar jarfile="${build.dir}/dist/guiceberry-${version}/guiceberry-${version}-tutorial.jar">
<fileset dir="${tutorial.dir}"/>
</jar>
</target>
<target name="dist" depends="jar, jarsrc, tutorialsrc, javadoc"
description="Build entire distribution.">
<copy toDir="${build.dir}/dist/guiceberry-${version}" file="COPYING"/>
<copy toDir="${build.dir}/dist/guiceberry-${version}">
<fileset dir="${build.dir}" includes="javadoc/**/*"/>
</copy>
<zip destfile="${build.dir}/guiceberry-${version}.zip"
basedir="${build.dir}/dist"/>
</target>
<target name="javadoc"
description="Generate Javadocs.">
<delete dir="${build.dir}/javadoc"/>
<mkdir dir="${build.dir}/javadoc"/>
<javadoc packagenames="${javadoc.packagenames}"
destdir="${build.dir}/javadoc"
author="true"
protected="true"
windowtitle="GuiceBerry"
classpathref="project.class.path"
additionalparam="-Xdoclint:none">
<sourcepath>
<pathelement location="${src.dir}"/>
</sourcepath>
</javadoc>
<jar jarfile="${build.dir}/dist/guiceberry-${version}/guiceberry-${version}-javadoc.jar">
<fileset dir="${build.dir}/javadoc"/>
</jar>
</target>
</project>