-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.xml
60 lines (49 loc) · 1.91 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
<?xml version='1.0' encoding='utf-8'?>
<project name="ija2013" default="compile" basedir=".">
<description>IJA hw3</description>
<property name="src.dir" value="src" />
<property name="build.dir" value="build" />
<property name="dest.dir" value="dest" />
<property name="main-class" value="ija2013.main.Main"/>
<property name="lib.dir" value="lib" />
<property name="doc.dir" value="doc" />
<path id="classpath">
<fileset dir="${lib.dir}" includes="**/*.jar"/>
</path>
<target name="clean">
<delete includeemptydirs="true">
<fileset dir="${build.dir}" includes="**/*"/>
</delete>
</target>
<target name="copyImages">
<copy todir="${build.dir}/ija2013/gui/images">
<fileset dir="${lib.dir}/images"/>
</copy>
</target>
<target name="rawCompile">
<mkdir dir="${build.dir}"/>
<javac srcdir="${src.dir}"
destdir="${build.dir}"
classpathref="classpath"
includeAntRuntime="false" />
</target>
<target name="jar">
<mkdir dir="${dest.dir}"/>
<jar destfile="${dest.dir}/${ant.project.name}.jar" basedir="${build.dir}">
<manifest>
<attribute name="Main-Class" value="${main-class}"/>
<attribute name="Class-Path" value="lib/dom4j-1.6.1.jar"/>
</manifest>
</jar>
<mkdir dir="${dest.dir}/lib"/>
<copy file="${lib.dir}/dom4j-1.6.1.jar" todir="${dest.dir}/lib"/>
<copy file="${lib.dir}/jaxen-1.1.3.jar" todir="${dest.dir}/lib"/>
</target>
<target name="run">
<java jar="${dest.dir}/${ant.project.name}.jar" fork="true"/>
</target>
<target name="doc">
<javadoc sourcepath="${src.dir}" destdir="${doc.dir}"/>
</target>
<target name="compile" depends="copyImages,rawCompile,jar,doc"/>
</project>