This repository has been archived by the owner on Oct 11, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 26
/
build.xml
executable file
·80 lines (70 loc) · 2.18 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
<project name="floreantpos" default="dist">
<property name="src.dir" value="src"/>
<property name="out.dir" value="antbin"/>
<property name="dist.base" value="dist"/>
<property name="dist.dir" value="${dist.base}/floreantpos"/>
<property name="jarfile" value="floreantpos.jar"/>
<property name="app.name" value="floreantpos"/>
<property name="app.version" value="1.0_2"/>
<property name="app.file" value="${dist.base}/${app.name}-${app.version}.zip"/>
<target name="compile">
<mkdir dir="${out.dir}"/>
<javac srcdir="${src.dir}" destdir="${out.dir}" source="1.5" target="1.5">
<classpath>
<fileset dir="lib">
<include name="**/*.jar" />
</fileset>
</classpath>
</javac>
<copy todir="${out.dir}">
<fileset dir="${src.dir}">
<exclude name="**/*.java"/>
</fileset>
</copy>
</target>
<target name="jar" depends="compile">
<delete dir="${dist.base}"></delete>
<mkdir dir="${dist.dir}"/>
<pathconvert property="jar.classpath" pathsep=" ">
<path>
<fileset dir="lib">
<include name="**/*.jar" />
</fileset>
</path>
<chainedmapper>
<flattenmapper />
<globmapper from="*" to="lib/*" />
</chainedmapper>
</pathconvert>
<jar destfile="${dist.dir}/${jarfile}" basedir="${out.dir}">
<manifest>
<attribute name="Main-Class" value="com.floreantpos.main.Main" />
<attribute name="Class-Path" value="${jar.classpath}" />
</manifest>
</jar>
</target>
<target name="dist" depends="jar">
<delete file="${app.file}" />
<mkdir dir="${dist.dir}/lib"/>
<copy todir="${dist.dir}/lib">
<fileset dir="lib" includes="*"/>
</copy>
<copy todir="${dist.dir}">
<fileset dir=".">
<include name="*.dll"/>
<include name="*.bat"/>
<include name="*.exe"/>
<include name="*.sh"/>
</fileset>
</copy>
<unzip dest="${dist.dir}" src="posdb.zip"/>
<zip destfile="${app.file}" basedir="${dist.base}" />
</target>
<target name="clean">
<delete dir="${out.dir}"></delete>
</target>
<target name="cleanall" depends="clean">
<delete dir="${dist.base}"></delete>
<delete file="${app.file}"/>
</target>
</project>