-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.xml
50 lines (41 loc) · 1.52 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
<project name="FSMSimulator" basedir="." default="main">
<description>Build file for FSM Simulator</description>
<property name="build.dir" value="build" />
<property name="lib.dir" value="lib" />
<property name="resources.dir" value="image" />
<property name="dest.dir" value="${build.dir}/classes" />
<property name="jar.dir" value="jar" />
<property name="src.dir" value="src" />
<property name="main.class" value="fsmsim.FSMSimulator" />
<path id="main-classpath">
<fileset dir="${lib.dir}">
<include name="*.jar" />
</fileset>
<pathelement location="${dest.dir}" />
</path>
<target name="clean">
<delete dir="${build.dir}" />
<delete dir="${jar.dir}" />
</target>
<target name="compile">
<mkdir dir="${dest.dir}" />
<javac srcdir="${src.dir}" destdir="${dest.dir}" includeantruntime="true" classpathref="main-classpath"/>
</target>
<target name="jar" depends="compile" description="Build JAR file">
<mkdir dir="${jar.dir}" />
<jar destfile="${jar.dir}/FSMSimulator.jar" basedir="${dest.dir}">
<fileset dir="${dest.dir}" />
<zipgroupfileset dir="${lib.dir}" includes="*.jar" />
<manifest>
<attribute name="Main-Class" value="${main.class}" />
<attribute name="Class-Path" value="${dest.dir}" />
</manifest>
</jar>
</target>
<target name="run" depends="jar">
<java classname="${main.class}" fork="true">
<classpath path="${jar.dir}/FSMSimulator.jar" />
</java>
</target>
<target name="main" depends="clean, run" />
</project>