-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.xml
82 lines (69 loc) · 2.51 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
<?xml version="1.0"?>
<project name="Build Commander" default="dist" basedir=".">
<property file="project.properties"/>
<!-- Common build classpath -->
<path id="classpath">
<fileset dir="${lib.dir}">
<include name="**/*.jar"/>
</fileset>
</path>
<path id="classpath.test">
<path refid="classpath"/>
<pathelement location="${classes}"/>
</path>
<target name="clean" description="Remove all old build artifacts">
<delete dir="${build}" />
<delete dir="${dist}" />
</target>
<target name="prepare">
<mkdir dir="${build}"/>
<mkdir dir="${dist}"/>
</target>
<target name="compile" depends="prepare" description="Compiles main code.">
<mkdir dir="${classes}"/>
<javac srcdir="${src}"
destdir="${classes}"
debug="${debug}"
deprecation="yes"
source="${jvm.ver}"
target="${jvm.ver}"
includeAntRuntime="no"
classpathref="classpath"/>
</target>
<target name="compile_test_junit" depends="compile" >
<mkdir dir="${classes.test.junit}"/>
<javac srcdir="${test.src}"
destdir="${classes.test.junit}"
debug="${debug}"
source="${jvm.ver}"
target="${jvm.ver}">
<classpath>
<path refid="classpath.test"/>
</classpath>
</javac>
<copy todir="${classes.test.junit}">
<fileset dir="${test.cfg}">
<include name="*.properties"/>
<include name="*.xml"/>
</fileset>
</copy>
</target>
<target name="compile_all" depends="compile, compile_test_junit" description="Compile everything: main code and test code."/>
<target name="jar" depends="compile">
<jar jarfile="${dist}/${component.name}.jar">
<fileset dir="${classes}"/>
</jar>
</target>
<target name="install" depends="dist" description="Build the jar and copy to user ant lib foler: ~/.ant/lib/">
<copy file="${dist}/${component.name}.jar" todir="${user.home}/.ant/lib"/>
</target>
<target name="dist" depends="jar" description="Builds all deployable projects">
<tar destfile="${dist}/${component.name}.tgz" compression="gzip">
<tarfileset dir=".">
<include name="dist/*.jar"/>
<include name="samples/**"/>
</tarfileset>
<tarfileset dir="doc"/>
</tar>
</target>
</project>