-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.xml
62 lines (53 loc) · 1.69 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
<project name="Top4Java" basedir="./" default="dist">
<!-- Local system paths -->
<property name="src.dir" value="${basedir}/src" />
<property name="lib.dir" value="${basedir}/lib" />
<property name="target.dir" value="${basedir}/target" />
<property name="classes.dir" value="${target.dir}/classes" />
<!-- Thirdparty jar files -->
<fileset id="jar.files" dir="${lib.dir}">
<patternset>
<include name="commons-logging-1.1.1.jar" />
<include name="log4j-1.2.15.jar" />
</patternset>
</fileset>
<!-- Filter out the non-java file -->
<patternset id="class.filter">
<include name="**/*.properties" />
<include name="**/*.xml" />
</patternset>
<!-- Set class path -->
<path id="class.path">
<fileset refid="jar.files" />
<fileset dir="${lib.dir}">
<patternset>
<include name="junit-4.7.jar" />
</patternset>
</fileset>
<pathelement location="${classes.dir}" />
</path>
<!-- Make directory -->
<target name="prepare">
<delete dir="${target.dir}" />
<mkdir dir="${target.dir}" />
</target>
<!-- Compiles all the classes -->
<target name="compile" depends="prepare">
<mkdir dir="${classes.dir}" />
<copy todir="${classes.dir}" includeEmptyDirs="no">
<fileset dir="${src.dir}">
<patternset refid="class.filter" />
</fileset>
</copy>
<javac srcdir="${src.dir}" destdir="${classes.dir}/" debug="true">
<classpath refid="class.path" />
</javac>
</target>
<!-- Generate the top4java jar -->
<target name="dist" depends="compile">
<jar destfile="${target.dir}/top4java.jar">
<fileset dir="${classes.dir}" includes="**/*" />
</jar>
<delete dir="${classes.dir}" />
</target>
</project>