forked from claeis/umleditor
-
Notifications
You must be signed in to change notification settings - Fork 4
/
build.xml
326 lines (294 loc) · 13.9 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
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
<?xml version="1.0" encoding="UTF-8"?>
<project basedir="." default="bindist" name="umleditor">
<!-- set global properties for this build -->
<property name="src" value="${basedir}/src"/>
<property name="build" value="${basedir}/build"/>
<property name="dist" value="${basedir}/dist"/>
<target name="init">
<!-- Create the time stamp -->
<tstamp/>
<property name="projectjar" value="${build}/jar/${ant.project.name}.jar"/>
<!-- Create the build directory structure used by compile -->
<mkdir dir="${build}"/>
<mkdir dir="${build}/jar"/>
<mkdir dir="${dist}"/>
</target>
<target depends="init" name="run">
<java classname="ch.ehi.umleditor.application.LauncherView" fork="true">
<arg value="-debug"/>
<!-- https://web.liferay.com/es/community/wiki/-/wiki/Main/Debugging+ant+java+tasks -->
<!-- https://www.ibm.com/developerworks/library/os-eclipse-javadebug/ -->
<!-- https://stackoverflow.com/questions/2406825/how-to-debug-java-code-when-using-ant-script-in-eclipse/2406928 -->
<jvmarg value="-Xdebug" />
<jvmarg value="-Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=8700" />
<classpath>
<pathelement location="${projectjar}"/>
<pathelement location="${basedir}/lib/ili2c.jar"/>
<pathelement location="${basedir}/lib/ili2c-core.jar"/>
<pathelement location="${basedir}/lib/ili2c-tool.jar"/>
<pathelement location="${basedir}/lib/jh.jar"/>
</classpath>
</java>
</target>
<target depends="init" name="compile">
<!-- Compile the java code from ${src} into ${build}/classes -->
<mkdir dir="${build}/classes"/>
<javac destdir="${build}/classes" includes="**/*.java" excludes="**/bak~/*.java" debug="true" debuglevel="lines,vars,source" includeantruntime="true" source="1.6" target="1.6" encoding="UTF-8" >
<classpath>
<pathelement location="lib/jhotdraw53.jar"/>
<pathelement location="lib/sebase.jar"/>
<pathelement location="lib/ili2c.jar"/>
<pathelement location="lib/ili2c-core.jar"/>
<pathelement location="lib/ili2c-tool.jar"/>
<pathelement location="lib/XMIFramework.jar"/>
<pathelement location="lib/jh.jar"/>
<pathelement location="lib/freehep-base.jar"/>
<pathelement location="lib/freehep-graphics2d.jar"/>
<pathelement location="lib/freehep-graphicsio.jar"/>
<pathelement location="lib/freehep-graphicsio-emf.jar"/>
<pathelement location="lib/freehep-graphicsio-svg.jar"/>
<pathelement location="lib/usrdocjh.jar"/>
<pathelement location="lib/JTattoo-1.6.11.jar"/>
<pathelement location="lib/gson-2.8.2.jar"/>
</classpath>
<src path="${src}" />
<!-- <src path="${build}/src"/> -->
</javac>
</target>
<target depends="init" name="javadocs">
<mkdir dir="${build}/javadoc/api"/>
<javadoc Public="true" Windowtitle="UML-Editor API" destdir="${build}/javadoc/api" packagenames="ch.ehi.interlis.*,ch.ehi.uml1_4.*,ch.ehi.umleditor.umlpresentation.*">
<sourcepath path="${src}"/>
</javadoc>
</target>
<target depends="init,compile" name="jar">
<delete file="${projectjar}" quiet="true"/>
<propertyfile file="${src}/ch/ehi/umleditor/application/Version.properties">
<!-- <entry key="versionMicro" type="int" value="1" operation="+"/> -->
<entry key="versionDate" type="date" value="now" pattern="yyyyMMdd"/>
</propertyfile>
<jar jarfile="${projectjar}" manifest="other/manifest">
<fileset dir="${build}/classes" excludes="**/Test.class" includes="**/*.class"/>
<fileset dir="${src}" includes="**/*.properties"/>
<fileset dir="resources/de" includes="**/*.properties"/>
<fileset dir="resources/es" includes="**/*.properties"/>
<fileset dir="resources/fr" includes="**/*.properties"/>
<fileset dir="resources/es" includes="**/*.properties"/>
<fileset dir="resources/it" includes="**/*.properties"/>
<fileset dir="${src}" includes="**/*.gif"/>
<fileset dir="${src}" includes="**/*.jpg"/>
<zipfileset src="lib/XMIFramework.jar"/>
<zipfileset src="lib/jhotdraw53.jar"/>
<zipfileset src="lib/sebase.jar"/>
<zipfileset src="lib/freehep-base.jar"/>
<zipfileset src="lib/freehep-graphics2d.jar"/>
<zipfileset src="lib/freehep-graphicsio.jar"/>
<zipfileset src="lib/freehep-graphicsio-emf.jar"/>
<zipfileset src="lib/freehep-graphicsio-svg.jar"/>
<zipfileset src="lib/usrdocjh.jar"/>
<zipfileset src="lib/JTattoo-1.6.11.jar"/>
<zipfileset src="lib/gson-2.8.2.jar"/>
<!-- <fileset dir="lib" excludes="antlr-2.6.1/**/*"/> -->
</jar>
</target>
<target depends="init" name="bindist">
<property file="${src}/ch/ehi/umleditor/application/Version.properties" prefix="buildnr."/>
<property name="buildnr" value="${buildnr.versionMajor}.${buildnr.versionMinor}.${buildnr.versionMicro}"/>
<delete file="${dist}/${ant.project.name}-${buildnr}.zip" quiet="true"/>
<zip zipfile="${dist}/${ant.project.name}-${buildnr}.zip">
<zipfileset dir="." includes="build/jar/umleditor.jar" fullpath="${ant.project.name}-${buildnr}/${ant.project.name}.jar"/>
<zipfileset dir="." includes="docs/bindist/CHANGELOG.txt" fullpath="${ant.project.name}-${buildnr}/CHANGELOG.txt"/>
<zipfileset dir="." includes="docs/bindist/README.txt" fullpath="${ant.project.name}-${buildnr}/README.txt"/>
<zipfileset dir="." includes="docs/bindist/README_de.txt" fullpath="${ant.project.name}-${buildnr}/README_de.txt"/>
<zipfileset dir="." includes="xmirose/*.ebs" prefix="${ant.project.name}-${buildnr}"/>
<zipfileset dir="." includes="lib/jh.jar" fullpath="${ant.project.name}-${buildnr}/jh.jar"/>
<zipfileset dir="." includes="lib/ili2c.jar" fullpath="${ant.project.name}-${buildnr}/ili2c.jar"/>
<zipfileset dir="." includes="other/LICENSE.lgpl" fullpath="${ant.project.name}-${buildnr}/LICENSE.lgpl"/>
<zipfileset dir="." includes="other/LICENSE.apache" fullpath="${ant.project.name}-${buildnr}/LICENSE.apache"/>
</zip>
</target>
<!--
<target depends="srcdist,bindist" name="dist"/>
<target depends="init" name="bindist">
<delete file="${dist}/${ant.project.name}-${DSTAMP}.zip" quiet="true"/>
<zip zipfile="${dist}/${ant.project.name}-${DSTAMP}.zip">
<zipfileset dir="." includes="build/jar/ili2c.jar" fullpath="${ant.project.name}-${DSTAMP}/${ant.project.name}.jar"/>
<zipfileset dir="." includes="doc/bindist/CHANGELOG.txt" fullpath="${ant.project.name}-${DSTAMP}/CHANGELOG.txt"/>
<zipfileset dir="." includes="doc/bindist/README.txt" fullpath="${ant.project.name}-${DSTAMP}/README.txt"/>
</zip>
</target>
-->
<target depends="init" name="srcdist">
<property file="${src}/ch/ehi/umleditor/application/Version.properties" prefix="buildnr."/>
<property name="buildnr" value="${buildnr.versionMajor}.${buildnr.versionMinor}.${buildnr.versionMicro}"/>
<delete file="${dist}/${ant.project.name}-${buildnr}.src.zip" quiet="true"/>
<zip zipfile="${dist}/${ant.project.name}-${buildnr}.src.zip">
<zipfileset dir="." prefix="${ant.project.name}-${buildnr}">
<patternset includes="build.xml"/>
<patternset includes="lib/**"/>
<!-- <patternset includes="model/**/*.sub"/>
<patternset includes="model/**/*.cat"/>
<patternset includes="model/**/*.mdl"/>
-->
<patternset includes="other/manifest"/>
<patternset includes="other/LICENSE.*"/>
<!-- <patternset includes="build/rosemodel/**"/>
-->
<patternset includes="src/**" excludes="**/CVS/*;**/bak~/*"/>
<patternset includes="resources/de/**/*.properties"/>
<patternset includes="resources/es/**/*.properties"/>
<patternset includes="resources/fr/**/*.properties"/>
<patternset includes="resources/es/**/*.properties"/>
<patternset includes="resources/it/**/*.properties"/>
<patternset includes="docs/bindist/*.txt"/>
<patternset includes="docs/README.src.txt"/>
<patternset includes="xmirose/*.ebs"/>
<!--
<patternset includes="doc/**"/>
<patternset includes="other/**"/>
<patternset includes="test/**"/>
<patternset includes="tools/**"/>
-->
</zipfileset>
</zip>
</target>
<target name="clean">
<delete dir="${build}"/>
</target>
<target name="removebackups">
<delete>
<fileset dir="${basedir}" defaultexcludes="no">
<include name="**/*.bak"/>
<include name="**/bak~/*"/>
<include name="**/*~"/>
</fileset>
</delete>
</target>
<target depends="init" name="cesrczip">
<delete file="${dist}/ce-src-${DSTAMP}.zip" quiet="true"/>
<zip zipfile="${dist}/ce-src-${DSTAMP}.zip">
<zipfileset dir="src">
<patternset includes="ch/ehi/umleditor/umlpresentation/**/*.java"/>
<patternset includes="ch/ehi/umleditor/umlpresentation/**/*.properties"/>
<patternset includes="ch/ehi/umleditor/format/**/*.java"/>
<patternset includes="ch/ehi/umleditor/format/**/*.properties"/>
<patternset includes="ch/ehi/umleditor/objectcatalog/**/*.java"/>
<patternset includes="ch/ehi/umleditor/objectcatalog/**/*.properties"/>
<patternset includes="ch/ehi/umleditor/interlis/**/*.java"/>
<patternset includes="ch/ehi/umleditor/interlis/**/*.properties"/>
<patternset includes="ch/ehi/umleditor/rose/**/*.java"/>
<patternset includes="ch/ehi/umleditor/rose/**/*.properties"/>
<patternset includes="ch/ehi/umleditor/xmiuml/**/*.java"/>
<patternset includes="ch/ehi/umleditor/xmiuml/**/*.properties"/>
<patternset includes="ch/ehi/interlis/**/*.java"/>
<patternset includes="ch/ehi/interlis/**/*.properties"/>
<patternset includes="ch/ehi/uml1_4/**/*.java"/>
<patternset includes="ch/ehi/uml1_4/**/*.properties"/>
<patternset includes="ch/ehi/basics/tools/**/*.java"/>
<patternset includes="ch/ehi/basics/tools/**/*.properties"/>
<patternset includes="ch/ehi/basics/types/**/*.java"/>
<patternset includes="ch/ehi/basics/types/**/*.properties"/>
<patternset includes="ch/ehi/basics/view/**/*.java"/>
<patternset includes="ch/ehi/basics/view/**/*.properties"/>
<patternset includes="ch/ehi/basics/i18n/**/*.java"/>
<patternset includes="ch/ehi/basics/i18n/**/*.properties"/>
<!--
-->
</zipfileset>
</zip>
</target>
<target depends="init" name="cemmzip">
<delete file="${dist}/ce-mm-${DSTAMP}.zip" quiet="true"/>
<zip zipfile="${dist}/ce-mm-${DSTAMP}.zip">
<zipfileset dir="model">
<patternset includes="*.cat"/>
<patternset includes="*.sub"/>
<patternset includes="*.mdl"/>
</zipfileset>
</zip>
</target>
<target depends="init" name="phsrczip">
<delete file="${dist}/ph-src-${DSTAMP}.zip" quiet="true"/>
<zip zipfile="${dist}/ph-src-${DSTAMP}.zip">
<zipfileset dir="src">
<patternset includes="ch/ehi/umleditor/application/**/*.java" excludes="**/bak~/*.java"/>
<patternset includes="ch/ehi/umleditor/umldrawingtools/**/*.java" excludes="**/bak~/*.java"/>
</zipfileset>
</zip>
</target>
<target depends="init" name="cesrcdiffzip">
<delete file="${dist}/ce-srcdiff-${DSTAMP}.zip" quiet="true"/>
<zip zipfile="${dist}/ce-srcdiff-${DSTAMP}.zip">
<zipfileset dir="src">
<patternset includes="**/EdgeFigure.java"/>
<patternset includes="**/AssociationAttributeFigure.java"/>
<patternset includes="**/PresentationRoleFigure.java"/>
<patternset includes="**/LinkFigure.java"/>
<patternset includes="**/ClassFigure.java"/>
<patternset includes="**/ClassDiagramView.java"/>
<patternset includes="**/AssociationLineConnection.java"/>
<!-- <patternset includes="**/TopicDepends.java"/>
-->
</zipfileset>
</zip>
</target>
<target depends="init" name="reszip">
<delete file="${dist}/resources-${DSTAMP}.zip" quiet="true"/>
<zip zipfile="${dist}/resources-${DSTAMP}.zip">
<zipfileset dir="resources">
<!-- <patternset includes="**/comments.txt"/> -->
<patternset includes="**/*.properties"/>
</zipfileset>
</zip>
</target>
<target depends="init" name="resdezip">
<delete file="${dist}/resources-de-${DSTAMP}.zip" quiet="true"/>
<zip zipfile="${dist}/resources-de-${DSTAMP}.zip">
<zipfileset dir="resources">
<!-- <patternset includes="**/comments.txt"/> -->
<patternset includes="de/**/*.properties"/>
</zipfileset>
</zip>
</target>
<target depends="init" name="copyres">
<copy toDir="${build}/classes">
<fileset dir="${src}" includes="**/*.properties"/>
<fileset dir="${src}" includes="**/*.gif"/>
<fileset dir="${src}" includes="**/*.jpg"/>
</copy>
</target>
<target depends="init" name="copyres2">
<copy toDir="${src}" overwrite="true">
<fileset dir="${basedir}/resources/en" includes="**/*.properties"/>
<fileset dir="${basedir}/resources/en" includes="**/*.gif"/>
<fileset dir="${basedir}/resources/en" includes="**/*.jpg"/>
</copy>
</target>
<target depends="init" name="copyres3">
<copy toDir="${basedir}/resources/it" overwrite="true">
<mapper type="glob" from="*_de.properties" to="*_it.properties"/>
<fileset dir="${basedir}/resources/de" includes="**/*.properties"/>
</copy>
</target>
<target depends="init" name="renresen">
<move toDir="${basedir}/resources/en">
<mapper type="glob" from="*_en.properties" to="*.properties"/>
<fileset dir="${basedir}/resources/en" includes="**/*_en.properties"/>
</move>
</target>
<target depends="init" name="cleanres">
<delete>
<fileset dir="${build}/classes" includes="**/*.properties"/>
<fileset dir="${build}/classes" includes="**/*.gif"/>
<fileset dir="${build}/classes" includes="**/*.jpg"/>
</delete>
</target>
<target depends="init" name="saveres">
<mkdir dir="res-${DSTAMP}"/>
<copy toDir="res-${DSTAMP}">
<fileset dir="${src}" includes="**/*.properties"/>
<fileset dir="${src}" includes="**/*.gif"/>
<fileset dir="${src}" includes="**/*.jpg"/>
</copy>
</target>
</project>