-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.xml
56 lines (48 loc) · 1.79 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
<!--Ant build script for Driverciser -->
<project name="driverciser" default="all" basedir=".">
<property name="build" value="classes" />
<property name="temp" value="temp" />
<property name="conf" value="conf"/>
<property name="etc" value="etc"/>
<property name="lib" value="lib"/>
<property name="src" value="src"/>
<property name="jarfile" value="driverciser.jar"/>
<property name="log4jprops" value="log4j.properties" />
<property name="metainf" value="**/META-INF/" />
<path id="compilerPath">
<pathelement path="${lib}/javaforge.jar:${lib}/log4j.jar:${lib}/activation.jar:${lib}/imap.jar:${lib}/mailapi.jar:${lib}/mail.jar:${lib}/pop3.jar:${lib}/smtp.jar"/>
</path>
<target name="compile">
<mkdir dir="${build}"/>
<javac srcdir="${src}" destdir="${build}" debug="on">
<classpath refid="compilerPath"/>
</javac>
</target>
<target name="build-jar" depends="compile">
<mkdir dir="${temp}"/>
<!-- expand library jars -->
<unjar dest="${temp}">
<patternset>
<exclude name="${metainf}" />
</patternset>
<fileset dir="${lib}">
<include name="**/*.jar" />
</fileset>
</unjar>
<!-- copy properties files -->
<copy todir="${temp}">
<fileset dir="${conf}"/>
</copy>
<copy todir="${temp}">
<fileset dir="${build}"/>
</copy>
<!-- jar it up -->
<jar destfile="${jarfile}" basedir="${temp}" manifest="${etc}/MainClass" />
</target>
<target name="all" depends="clean,compile,build-jar"/>
<target name="clean">
<delete dir="${build}"/>
<delete file="${jarfile}"/>
<delete dir="${temp}"/>
</target>
</project>