-
Notifications
You must be signed in to change notification settings - Fork 2
/
build.xml
151 lines (118 loc) · 4.45 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
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
<project name="SvnStat" default="help" basedir=".">
<description>
</description>
<property environment="os" />
<property file="${basedir}/build.properties" />
<path id="project.classpath">
<fileset dir="${lib.dev}">
<include name="*.jar" />
</fileset>
<fileset dir="${lib.rt}">
<include name="*.jar" />
</fileset>
</path>
<target name="init">
<echo>
</echo>
<mkdir dir="${javadoc}" />
<mkdir dir="${build}" />
<mkdir dir="${build.classes}" />
<mkdir dir="tmp" />
</target>
<target name="help" depends="init" description="Print the help message">
<echo>
The targets of this build file automate the build and deployment tasks of the project. Use
"ant -projecthelp" to obtain a list of available target together with a short description
of each task.
</echo>
</target>
<target name="build" depends="init" description="Build the project">
<echo>
-- Compiling ... --
</echo>
<javac srcdir="${src.java}" destdir="${build.classes}" includes="**/*.java" debug="on">
<classpath>
<path refid="project.classpath" />
</classpath>
</javac>
<copy todir="${build.classes}">
<fileset dir="${src.java}" includes="**/*.properties" />
</copy>
</target>
<target name="run">
<java classname="de.agentlab.svnstat.SvnStat" fork="yes">
<arg line="-r examples/svnlog/test_svnlog.xml"/>
<arg line="-d tmp/svnstat"/>
<arg line="-begin 2006-05-05"/>
<arg line="-end 9999-99-99"/>
<classpath>
<path refid="project.classpath"/>
<pathelement location="${build.classes}"/>
</classpath>
</java>
</target>
<target name="jar" depends="build" description="Generate the jar file of the project classes">
<delete>
<fileset dir="${build}" includes="${jarfilename}*.jar" />
</delete>
<jar jarfile="${build}/${jarfilename}.jar"
basedir="${build.classes}"
includes="**/*.class, **/*.properties" />
</target>
<target name="bundle" depends="jar">
<description>
Bundle the jar file with the required run-time libraries.
</description>
<zip destfile="${build}/${bundlefilename}.jar">
<zipfileset src="${build}/${jarfilename}.jar" />
</zip>
</target>
<target name="dist" depends="bundle, javadoc">
<zip destfile="${build}/${distfilename}-${version}.zip" excludes="CVS/**" >
<zipfileset file="${build}/${bundlefilename}.jar" prefix="${distfilename}-${version}/"/>
<zipfileset dir="${lib}" prefix="${distfilename}-${version}/lib"/>
<zipfileset dir="doc" excludes="README" prefix="${distfilename}-${version}/doc" />
<zipfileset dir="examples" prefix="${distfilename}-${version}/examples" />
<zipfileset dir="${javadoc}" prefix="${distfilename}-${version}/doc/api" />
<zipfileset dir="doc" includes="README" prefix="${distfilename}-${version}"/>
<zipfileset dir="${src.java}" includes="de/agentlab/svnstat/SvnStat.properties" fullpath="${distfilename}-${version}/examples/SvnStat.properties"/>
<zipfileset dir="${src.java}" prefix="${distfilename}-${version}/src/java"/>
<zipfileset dir="." includes="build*" prefix="${distfilename}-${version}"/>
<zipfileset dir="testdata" includes="test_svnlog.xml" prefix="${distfilename}-${version}/examples/svnlog" />
</zip>
</target>
<target name="javadoc"
depends="init"
description="Generate javadoc documentation for the project">
<javadoc sourcepath="${src.java}"
destdir="${javadoc}"
author="true"
version="true"
use="true"
windowtitle="${javadoc.windowtitle}"
doctitle="${javadoc.doctitle}"
bottom="${javadoc.bottom}">
<classpath>
<path refid="project.classpath" />
</classpath>
<fileset dir="${src.java}" defaultexcludes="yes">
<include name="**/*.java" />
</fileset>
</javadoc>
</target>
<target name="clean" depends="init" description="Delete all temporary files from the project">
<delete>
<fileset dir="." defaultexcludes="no">
<include name="**/*.bak" />
<include name="**/*~" />
<include name="TEST*.txt" />
</fileset>
</delete>
</target>
<target name="realclean"
depends="init,clean"
description="Delete all temporary and generated files from the project">
<delete dir="${javadoc}" />
<delete dir="${build}" />
</target>
</project>