-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild.xml
95 lines (71 loc) · 2.28 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
<?xml version="1.0"?>
<project name="Guineu" default="jar" basedir=".">
<property name="src" value="src" />
<property name="lib" value="lib" />
<property name="conf" value="conf" />
<property name="rest" value="rest" />
<property name="icons" value="icons" />
<property name="build" value="build" />
<property name="dist" value="dist" />
<property name="manifest" value="guineu.mf" />
<fileset id="jars" dir="${lib}">
<include name="*.jar" />
</fileset>
<path id="cppath">
<fileset refid="jars" />
</path>
<pathconvert property="classpath" refid="cppath" pathsep=" " dirsep="/">
<map from="${basedir}${file.separator}" to="" />
</pathconvert>
<target name="manifest">
<manifest file="${manifest}" mode="replace">
<attribute name="Built-By" value="${user.name}"/>
<attribute name="Class-Path" value=". ${classpath}"/>
</manifest>
</target>
<target name="compile">
<mkdir dir="${build}" />
<javac target="1.5" srcdir="${src}" destdir="${build}" debug="on">
<classpath refid="cppath" />
</javac>
</target>
<target name="jar" depends="compile,manifest">
<mkdir dir="${dist}" />
<mkdir dir="${dist}/lib" />
<mkdir dir="${dist}/icons" />
<mkdir dir="${dist}/conf" />
<!-- copy the sources, to include all resources like XML report definition -->
<copy todir="${build}">
<fileset dir="${src}" />
</copy>
<copy todir="${dist}">
<fileset file="${rest}/start*.*" />
</copy>
<chmod perm="a+x">
<fileset file="${dist}/start*.*" />
</chmod>
<copy todir="${dist}/conf">
<fileset file="${conf}/*.properties" />
<fileset file="${conf}/*.xml" />
</copy>
<copy todir="${dist}/icons">
<fileset file="${icons}/*.png" />
</copy>
<copy todir="${dist}/lib">
<fileset file="${lib}/*.jar" />
<fileset file="${lib}/*.dll" />
</copy>
<copy todir="${dist}">
<fileset file="COPYRIGHT.TXT" />
<fileset file="GPL.TXT" />
</copy>
<jar destfile="${dist}/Guineu.jar" manifest="${manifest}">
<fileset dir="${build}" />
</jar>
</target>
<target name="clean">
<delete dir="${build}" />
<delete dir="${dist}" />
<delete file="${manifest}" />
</target>
</project>