-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.xml
118 lines (101 loc) · 3.56 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
<?xml version="1.0"?>
<project name="Demo" basedir="." default="build">
<property name="build.classes" value="build" />
<property name="build.libraries" value="libs" />
<property name="build.lib" value="deploy" />
<property name="java.dir" value="src" />
<property name="java.dir.core" value="../DistanceToolCore/src" />
<property name="name.core" value="DistanceToolCore" />
<property name="name.ui" value="DistanceToolUI" />
<path id="classpath">
<fileset dir="${build.libraries}">
<include name="**/*.jar" />
</fileset>
</path>
<target name="build-core">
<mkdir dir="${build.classes}"/>
<echo>sourcefiles = ${toString:classpath}</echo>
<!-- Quelltext UI kompilieren -->
<javac srcdir="${java.dir.core}"
destdir="${build.classes}"
debug="false"
deprecation="true"
optimize="true"
excludes="ch/zhaw/ias/dito/test/**"
classpathref="classpath">
<!-- <classpath refid="classpath" /> -->
</javac>
<!-- Baut die JAR-Datei -->
<jar jarfile="${build.libraries}/${name.core}.jar" >
<fileset dir="${build.classes}"/>
</jar>
<delete dir="${build.classes}"/>
</target>
<!-- Anwendung bauen -->
<target name="build" depends="clean, build-core" description="Baut die komplette Anwendung">
<!-- Verzeichis anlegen -->
<mkdir dir="${build.classes}"/>
<mkdir dir="${build.lib}"/>
<!-- Increase Versionnumber -->
<propertyfile
file="src/ch/zhaw/ias/dito/ui/resource/version.properties" comment="Build version info">
<entry key="buildDate" type="date" value="now"/>
<entry key="buildNum" default="0" type="int" operation="+" value="1"/>
</propertyfile>
<!-- Quelltext UI kompilieren -->
<javac srcdir="${java.dir}"
destdir="${build.classes}"
debug="false"
deprecation="true"
optimize="true" >
<classpath refid="classpath" />
</javac>
<!-- Kopiert notwendige Dateien -->
<copy todir="${build.classes}">
<fileset dir="${java.dir}">
<include name="**/*.properties" />
<include name="**/*.html" />
<include name="**/*.gif" />
<include name="**/*.png" />
</fileset>
</copy>
<!-- Baut die JAR-Datei -->
<jar jarfile="${build.lib}/${name.ui}.jar" manifest="MANIFEST.MF">
<fileset dir="${build.classes}"/>
</jar>
<!-- Libraries kopieren -->
<copy todir="${build.lib}">
<fileset dir="${build.libraries}">
<include name="**/*.jar" />
</fileset>
</copy>
<!-- jars signieren -->
<signjar destDir="${build.lib}"
alias="http://ias.zhaw.ch/dito" keystore="dito.keys"
storepass="DiTo2011"
preservelastmodified="true">
<path>
<fileset dir="${build.lib}" includes="*.jar" />
</path>
<flattenmapper />
</signjar>
<!-- jnlps kopieren -->
<copy todir="${build.lib}">
<fileset dir=".">
<include name="*.jnlp" />
</fileset>
</copy>
<!-- build dir löschen -->
<delete dir="${build.classes}"/>
</target>
<!-- Aufräumen -->
<target name="clean" description="Räumt die temporär angelegten Dateien weg">
<!-- Löscht Dateien -->
<delete dir="${build.dir}" />
<delete dir="${dist.base}" />
<delete dir="${defaultdist.dir}" />
<delete>
<fileset dir="." includes="**/*~" defaultexcludes="no"/>
</delete>
</target>
</project>