-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.xml
121 lines (88 loc) · 4.16 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
<?xml version = "1.0" encoding="UTF-8"?>
<project name = "MMBT" basedir = "." default = "build_and_run">
<property file = "build.properties"/>
<property name = "src.dir" value = "src"/>
<property name = "build.dir" value = "build"/>
<property name = "dist.dir" value = "dest"/>
<property name = "lib.dir" value = "lib"/>
<property name = "doc.dir" value = "doc"/>
<property name = "view.dir" value = "src/view"/>
<property name = "manifest" value = "data/MMBT.mf"/>
<property name = "appName" value = "ija-app"/>
<property name = "zipBaseDirName" value = "xkincm02"/>
<target name = "build_and_run" description = "Building and running" depends = " build, development_run"/>
<target name = "development_run" description = "Executing the MMBT program">
<java fork = "true" failonerror = "yes" classname = "EntryPoint">
<classpath>
<pathelement path="${build.dir}"/>
<pathelement path="lib/*"/>
</classpath>
</java>
</target>
<target name = "compile" description = "Building and running" depends = " build, dist"/>
<target name = "generate_documentation" description = "Clean output directories">
<javadoc encoding="UTF-8" charset="UTF-8" sourcepath="src" destdir="doc">
</javadoc>
</target>
<target name = "build" description = "Compile source tree java files">
<mkdir dir = "${build.dir}"/>
<mkdir dir = "${view.dir}"/>
<copy file="src/view/mainPage.fxml" tofile="build/view/mainPage.fxml"/>
<copy file="src/view/streetView.fxml" tofile="build/view/streetView.fxml"/>
<javac includeantruntime="false" destdir = "${build.dir}">
<src path = "${src.dir}"/>
<classpath>
<path refid="master-classpath" />
<path refid="class.path" />
</classpath>
</javac>
</target>
<target name = "dist" description="creating the distribution file" depends="build">
<jar manifest="data/MMBT.mf" destfile="${dist.dir}/${appName}.jar" basedir="${build.dir}" >
<zipgroupfileset dir="${lib.dir}" includes="**/*.jar" />
<fileset dir="${view.dir}"/>
</jar>
<copy file="data/lines.json" tofile="dest/data/lines.json"/>
<copy file="data/mapData.json" tofile="dest/data/mapData.json"/>
</target>
<target name = "run" description = "executing the application">
<java jar="${dist.dir}/${appName}.jar" fork="true" >
</java>
</target>
<target name = "clean" description = "Clean output directories" >
<delete includeemptydirs="true">
<fileset dir="build" includes="**/*"/>
<fileset dir="${dist.dir}" includes="**/*"/>
<fileset dir="${doc.dir}" includes="**/*"/>
<file file="lib/json-simple-1.1.1.jar"/>
</delete>
<delete file="lib/json-simple-1.1.1.jar"/>
</target>
<target name = "zip" >
<zip destfile="dest/${zipBaseDirName}.zip">
<zipfileset dir="${basedir}" includes="build" prefix="${zipBaseDirName}/"/>
<zipfileset dir="${basedir}" includes="data/**/*" prefix="${zipBaseDirName}/"/>
<zipfileset dir="${basedir}" includes="dest" prefix="${zipBaseDirName}/"/>
<zipfileset dir="${basedir}" includes="doc/**/*" prefix="${zipBaseDirName}/"/>
<zipfileset dir="${basedir}" includes="lib/get-libs.sh" prefix="${zipBaseDirName}/"/>
<zipfileset dir="${basedir}" includes="src/**/*" prefix="${zipBaseDirName}/"/>
<zipfileset dir="${basedir}" includes="build.xml" prefix="${zipBaseDirName}/"/>
<zipfileset dir="${basedir}" includes="readme.txt" prefix="${zipBaseDirName}/"/>
</zip>
</target>
<path id = "master-classpath">
<fileset dir = "${src.dir}">
<include name = "*.jar"/>
</fileset>
<pathelement path = "${build.dir}"/>
</path>
<path id = "build-path">
<fileset dir = "build">
</fileset>
</path>
<path id="class.path">
<fileset dir="lib">
<include name="**/*.jar" />
</fileset>
</path>
</project>