-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathbuild.xml
224 lines (192 loc) · 8 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
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
<?xml version="1.0"?>
<!--
This is ant build.xml file for building MaDKit 5 demos
Author: Fabien Michel
Version: 5.1
-->
<project name="madkit-demos" default="release" basedir=".">
<!-- for using vars -->
<taskdef resource="net/sf/antcontrib/antcontrib.properties">
<classpath>
<pathelement location="lib/ant-contrib-1.0b3.jar" />
</classpath>
</taskdef>
<property name="import.line" value="${madkit.lib.dir}/madkit-${madkit.version}.jar" />
<!-- user's specific local properties -->
<property name="madkit.dir" value="../MaDKit" />
<property name="mdk.store.dir" value=".mdk_keystore" />
<!-- using the release's properties files -->
<property name="release.dir" value="release" />
<property name="demo.dir" value="${basedir}/release" />
<property name="lib.dir" value="lib" />
<property name="madkit.version" value="5.2" />
<property name="madkit.old.version" value="5.1.1" />
<property name="madkit.demos.dir" location="${madkit.dir}/demos" />
<property name="madkit.jar.file" value="../${madkit.dir}/release/madkit-${madkit.version}.jar" />
<property name="jnlps.web.dir" value="jnlps" />
<property name="agents-lib.web.dir" value="agents" />
<property name="demo.website" value="www.madkit.org" />
<property name="demo-lib.web.dir" value="MaDKit-${madkit.version}" />
<property name="demo.web.code.base" value="http://www.madkit.net/madkit/javaws" />
<property name="demo.author" value="MaDKit Team" />
<!-- =================================
target: publish
================================= -->
<target name="release" depends="clean" description="description">
<antcall target="doItOnAllmodules">
<param name="what.to.do" value="export-jars" />
</antcall>
<copy todir="${madkit.demos.dir}">
<fileset dir="${release.dir}" excludes="*.agents.jar,*.pack.gz" />
</copy>
</target>
<!-- =================================
target: clean
================================= -->
<target name="clean" description="cleanup build files">
<echo>Cleaning all demos</echo>
<antcall target="doItOnAllmodules">
<param name="what.to.do" value="clean" />
</antcall>
<delete dir="${release.dir}" failonerror="false" />
<delete>
<fileset dir="${madkit.demos.dir}" includes="MaDKit-ping-pong*,MaDKit-bees*,MaDKit-market-organization*" />
</delete>
</target>
<!-- =================================
target: zip-projects
================================= -->
<target name="zip-projects" description="zip projects">
<antcall target="doItOnAllmodules">
<param name="what.to.do" value="zip-project" />
</antcall>
</target>
<!-- =================================
target: test-exe
================================= -->
<target name="test-exe" description="test the demo executable jars">
<exec executable="java" dir="${release.dir}">
<arg value="-jar" />
<arg value="MaDKit-bees-2.0.0.8.jar" />
</exec>
<exec executable="java" dir="${release.dir}">
<arg value="-jar" />
<arg value="MaDKit-market-organization-2.0.jar" />
</exec>
<exec executable="java" dir="${release.dir}">
<arg value="-jar" />
<arg value="MaDKit-ping-pong-2.0.jar" />
</exec>
</target>
<!-- =================================
target: test-jnlp
================================= -->
<target name="test-jnlp" description="test jnlps">
<exec executable="javaws" dir="${release.dir}">
<arg value="MaDKit-bees.jnlp" />
</exec>
<exec executable="javaws" dir="${release.dir}">
<arg value="MaDKit-market-organization.jnlp" />
</exec>
<exec executable="javaws" dir="${release.dir}">
<arg value="MaDKit-ping-pong.jnlp" />
</exec>
</target>
<!-- - - - - - - - - - - - - - - - - -
target: create-lib-jars
- - - - - - - - - - - - - - - - - -->
<target name="build-agent-jars" depends="" description="build the demo lib jars">
<antcall target="doItOnAllmodules">
<param name="what.to.do" value="build-agent-jar" />
</antcall>
</target>
<!-- - - - - - - - - - - - - - - - - -
target: create-jnlp
- - - - - - - - - - - - - - - - - -->
<target name="jnlps" description="build the demo lib jars">
<antcall target="doItOnAllmodules">
<param name="what.to.do" value="Java-web-start" />
</antcall>
</target>
<!-- - - - - - - - - - - - - - - - - -
target: update-to-last-kernel
- - - - - - - - - - - - - - - - - -->
<target name="update-to-last-kernel">
<mkdir dir="${release.dir}" />
<property file="MaDKit-bees.properties" />
<copy tofile="MaDKit-bees/build.xml" file="demo-build-template.xml" overwrite="true">
<filterchain>
<expandproperties />
</filterchain>
</copy>
<!-- - - - - - - - - - - - - - - - - -
does not work in a target !!!
- - - - - - - - - - - - - - - - - -->
<var name="demo.version" unset="true" />
<var name="demo.code.name" unset="true" />
<var name="demo.author" unset="true" />
<var name="demo.description" unset="true" />
<var name="demo.label" unset="true" />
<var name="demo.args" unset="true" />
<property file="MaDKit-ping-pong.properties" />
<copy tofile="MaDKit-ping-pong/build.xml" file="demo-build-template.xml" overwrite="true">
<filterchain>
<expandproperties />
</filterchain>
</copy>
<var name="demo.version" unset="true" />
<var name="demo.code.name" unset="true" />
<var name="demo.author" unset="true" />
<var name="demo.description" unset="true" />
<var name="demo.label" unset="true" />
<var name="demo.args" unset="true" />
<property file="MaDKit-market-organization.properties" />
<copy tofile="MaDKit-market-organization/build.xml" file="demo-build-template.xml" overwrite="true">
<filterchain>
<expandproperties />
</filterchain>
</copy>
<antcall target="doItOnAllmodules">
<param name="what.to.do" value="update-to-last-kernel" />
</antcall>
</target>
<!-- =================================
target: ftp-push-jnlp
================================= -->
<target name="ftp-push-jnlp" depends="jnlps">
<loadproperties srcFile="${user.home}/${mdk.store.dir}/MDK.net" />
<echo>FTP upload of Demo JNLPs</echo>
<ftp server="${ftp.server}" userid="${ftp.user}" password="${ftp.password}" action="put" remotedir="madkit/javaws">
<fileset dir="${release.dir}" includes="*.gz,*.jnlp" />
</ftp>
</target>
<!-- =================================
target: ftp-push-agent-libs
================================= -->
<target name="ftp-push-agent-libs" depends="build-agent-jars" description="ftp demo libs">
<property name="server" value="MDK.net" />
<property name="ftp.propfile" location="${user.home}/${mdk.store.dir}/${server}" />
<loadproperties srcFile="${ftp.propfile}" />
<ftp server="${ftp.server}" userid="${ftp.user}" password="${ftp.password}" action="mkdir" remotedir="${ftp.dir}/repository/${demo-lib.web.dir}/${agents-lib.web.dir}"/>
<ftp server="${ftp.server}" userid="${ftp.user}" password="${ftp.password}" action="put" remotedir="${ftp.dir}/repository/${demo-lib.web.dir}/${agents-lib.web.dir}">
<fileset dir="${release.dir}" includes="*.agents.jar" />
</ftp>
<echo>FTP upload of Demo libs : target is ${ftp.server} ${ftp.dir}/repository/${demo-lib.web.dir}</echo>
</target>
<!-- - - - - - - - - - - - - - - - - -
target: doItOnAllmodules
- - - - - - - - - - - - - - - - - -->
<target name="doItOnAllmodules">
<subant target="${what.to.do}" genericantfile="project.targets.xml" inheritall="true">
<dirset dir="." excludes=".git,${release.dir},lib" includes="*" />
</subant>
</target>
<!-- - - - - - - - - - - - - - - - - -
target: create-executable-jars
- - - - - - - - - - - - - - - - - -->
<target name="create-executable-jars" depends="" description="build the demo executable jars">
<antcall target="doItOnAllmodules">
<param name="what.to.do" value="create-executable-jar" />
</antcall>
</target>
</project>