forked from blackears/svgSalamander
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build-NBUtil.xml
executable file
·316 lines (277 loc) · 12.9 KB
/
build-NBUtil.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
<?xml version="1.0" encoding="UTF-8"?>
<project name="NetBeans support tasks">
<!--description>
Collection of common tasks used by many other projects.
</description-->
<property name="jvm.debug" location="C:\bin\jdk1.6.0\fastdebug\bin\java.exe"/>
<taskdef resource="proguard/ant/task.properties" classpath="C:\java\proguard4.0beta\lib\proguard.jar" />
<target name="compile-selected-files" depends="init">
<fail unless="files">Must set property 'files'</fail>
<mkdir dir="${classes.main.dir}"/>
<javac debug="true" destdir="${classes.main.dir}" srcdir="${src.main.dir}" includes="${files}" source="1.5" fork="yes">
<compilerarg value="-Xlint"/>
<classpath>
<path refid="path.classpath"/>
</classpath>
</javac>
</target>
<target name="compile-selected-files-test" depends="jar">
<fail unless="files">Must set property 'files'</fail>
<mkdir dir="${classes.test.dir}"/>
<javac debug="true" destdir="${classes.test.dir}" srcdir="${src.test.dir}" includes="${files}" source="1.5" fork="yes">
<compilerarg value="-Xlint"/>
<classpath>
<pathelement path="${classes.main.dir}"/>
<path refid="path.classpath"/>
</classpath>
</javac>
</target>
<target name="run-selected-files" depends="compile" description="Run Single File">
<fail unless="classname">Must set property 'classname'</fail>
<java fork="true" classname="${classname}">
<jvmarg value="-ea"/>
<jvmarg value="-Djogl.verbose"/>
<!--jvmarg value="-XX:+HeapDumpOnOutOfMemoryError"/-->
<classpath>
<pathelement path="${classes.main.dir}"/>
<path refid="path.classpath"/>
</classpath>
</java>
</target>
<target name="run-selected-files-test" depends="compile-test" description="Run Single File">
<fail unless="classname">Must set property 'classname'</fail>
<!--java fork="true" classname="${classname}" jvm="${project.run.jvm}"-->
<java fork="true" classname="${classname}">
<jvmarg value="-ea"/>
<jvmarg value="-Djogl.verbose"/>
<!--jvmarg value="-agentlib:hprof=file=snapshot.hprof,format=b"/-->
<!--jvmarg value="-XX:+HeapDumpOnOutOfMemoryError"/-->
<classpath>
<pathelement path="${classes.main.dir}"/>
<pathelement path="${classes.test.dir}"/>
<path refid="path.classpath"/>
</classpath>
</java>
</target>
<target name="debug" depends="init,compile" if="netbeans.home" description="Debug Project">
<nbjpdastart name="${project.debug.name}" addressproperty="jpda.address" transport="dt_socket">
<sourcepath>
<path refid="path.sourcepath.debug"/>
</sourcepath>
<classpath>
<pathelement path="${classes.main.dir}"/>
<path refid="path.classpath"/>
</classpath>
</nbjpdastart>
<java fork="true" classname="${project.debug.mainClass}" jvm="${jvm.debug}">
<jvmarg value="-ea"/>
<jvmarg value="-Xdebug"/>
<jvmarg value="-Xnoagent"/>
<jvmarg value="-Djava.compiler=none"/>
<jvmarg value="-Xrunjdwp:transport=dt_socket,address=${jpda.address}"/>
<classpath>
<pathelement path="${classes.main.dir}"/>
<path refid="path.classpath"/>
</classpath>
</java>
</target>
<target name="debug-selected-files" depends="init,compile" if="netbeans.home" description="Debug a Single File">
<fail unless="classname">Must set property 'classname'</fail>
<nbjpdastart name="${classname}" addressproperty="jpda.address" transport="dt_socket">
<sourcepath>
<path refid="path.sourcepath.debug"/>
</sourcepath>
<classpath>
<pathelement path="${classes.main.dir}"/>
<path refid="path.classpath"/>
</classpath>
</nbjpdastart>
<java fork="true" classname="${classname}" jvm="${jvm.debug}">
<jvmarg value="-Xdebug"/>
<jvmarg value="-Xnoagent"/>
<jvmarg value="-Djava.compiler=none"/>
<jvmarg value="-Xrunjdwp:transport=dt_socket,address=${jpda.address}"/>
<classpath>
<pathelement path="${classes.main.dir}"/>
<path refid="path.classpath"/>
</classpath>
</java>
</target>
<target name="debug-selected-files-test" depends="init,compile" if="netbeans.home" description="Debug a Single File">
<fail unless="classname">Must set property 'classname'</fail>
<nbjpdastart name="${classname}" addressproperty="jpda.address" transport="dt_socket">
<sourcepath>
<path refid="path.sourcepath.debug"/>
</sourcepath>
<classpath>
<pathelement path="${classes.main.dir}"/>
<pathelement path="${classes.test.dir}"/>
<path refid="path.classpath"/>
</classpath>
</nbjpdastart>
<java fork="true" classname="${classname}" jvm="${jvm.debug}">
<jvmarg value="-Xdebug"/>
<jvmarg value="-Xnoagent"/>
<jvmarg value="-Djava.compiler=none"/>
<jvmarg value="-Xrunjdwp:transport=dt_socket,address=${jpda.address}"/>
<classpath>
<pathelement path="${classes.main.dir}"/>
<pathelement path="${classes.test.dir}"/>
<path refid="path.classpath"/>
</classpath>
</java>
</target>
<target name="debug-fix" depends="init" if="netbeans.home" description="Recompile a file during a debug session and reload it into the debugger without stopping it">
<javac destdir="${classes.main.dir}" srcdir="${src.main.dir}" debug="true" >
<classpath>
<path refid="path.classpath"/>
</classpath>
<include name="${fix.file}.java"/>
</javac>
<nbjpdareload>
<fileset dir="${classes.main.dir}">
<include name="${fix.file}.class"/>
</fileset>
</nbjpdareload>
</target>
<target name="test-selected-files" depends="init">
<fail unless="classname">Must set property 'classname'</fail>
<echo message="test selected files not implemented yet"/>
</target>
<target name="profile" depends="init,compile" description="Profile project">
<fail unless="netbeans.home">This target can only run inside the NetBeans IDE.</fail>
<nbprofiledirect>
<classpath>
<pathelement path="${classes.main.dir}"/>
<pathelement path="${classes.test.dir}"/>
<path refid="path.classpath"/>
</classpath>
</nbprofiledirect>
<java classname="${project.run.mainClass}" fork="true">
<jvmarg value="${profiler.info.jvmargs.agent}"/>
<jvmarg value="-ea"/>
<jvmarg value="-Xmx256M"/>
<jvmarg value="-Djogl.verbose"/>
<classpath>
<pathelement path="${classes.main.dir}"/>
<pathelement path="${classes.test.dir}"/>
<path refid="path.classpath"/>
</classpath>
</java>
</target>
<target name="profile-single" depends="compile" description="Profile single file">
<fail unless="netbeans.home">This target can only run inside the NetBeans IDE.</fail>
<fail unless="profile.class">Class to profile must be specified.</fail>
<!--echo message="*************main*************"/-->
<nbprofiledirect>
<classpath>
<pathelement path="${classes.main.dir}"/>
<pathelement path="${classes.test.dir}"/>
<path refid="path.classpath"/>
</classpath>
</nbprofiledirect>
<java classname="${profile.class}" fork="true">
<jvmarg value="${profiler.info.jvmargs.agent}"/>
<jvmarg value="-ea"/>
<jvmarg value="-Xmx256M"/>
<classpath>
<pathelement path="${classes.main.dir}"/>
<pathelement path="${classes.test.dir}"/>
<path refid="path.classpath"/>
</classpath>
</java>
</target>
<target name="profile-single-test" depends="compile" description="Profile single file">
<fail unless="netbeans.home">This target can only run inside the NetBeans IDE.</fail>
<fail unless="profile.class">Class to profile must be specified.</fail>
<!--echo message="*************test*************"/-->
<nbprofiledirect>
<classpath>
<pathelement path="${classes.main.dir}"/>
<pathelement path="${classes.test.dir}"/>
<path refid="path.classpath"/>
</classpath>
</nbprofiledirect>
<java classname="${profile.class}" fork="true">
<jvmarg value="${profiler.info.jvmargs.agent}"/>
<jvmarg value="-ea"/>
<jvmarg value="-Xmx256M"/>
<classpath>
<pathelement path="${classes.main.dir}"/>
<pathelement path="${classes.test.dir}"/>
<path refid="path.classpath"/>
</classpath>
</java>
</target>
<target name="generateKey" depends="init" description="Create a key to sign our jar files with.">
<delete file="${key.location}"/>
<genkey alias="${key.user}" storepass="${key.password}" keystore="${key.location}" validity="1000" verbose="true">
<dname>
<param name="CN" value="Mark McKay, [email protected]"/>
<param name="OU" value="kitfox.com"/>
<param name="O" value="kitfox"/>
<param name="L" value="Toronto"/>
<param name="S" value="Ontario"/>
<param name="C" value="CA"/>
</dname>
</genkey>
</target>
<taskdef name="findbugs" classname="edu.umd.cs.findbugs.anttask.FindBugsTask" classpath="C:\dev\cvs.sourceforge.net\findbugs\lib\findbugs-ant.jar" />
<taskdef name="findbugs-viewer" classname="edu.umd.cs.findbugs.anttask.FindBugsViewerTask" classpath="C:\dev\cvs.sourceforge.net\findbugs\lib\findbugs-ant.jar" />
<property name="findbugs.home" location="C:\dev\cvs.sourceforge.net\findbugs" />
<property name="findbugs.bugReport" location="bcel-fb.xml" />
<target name="findbugs" depends="jar">
<findbugs home="${findbugs.home}" output="xml" outputFile="${findbugs.bugReport}" >
<auxClasspath>
<path refid="path.classpath"/>
</auxClasspath>
<sourcePath path="${src.dir}"/>
<class location="${project.jar}" />
</findbugs>
</target>
<target name="findbugs-viewer" depends="jar">
<findbugs-viewer home="${findbugs.home}" look="native" loadbugs="${findbugs.bugReport}"/>
</target>
<target name="javadoc" depends="init,compile" description="Javadoc for my API.">
<javadoc destdir="${javadoc.dir}" packagenames="*">
<sourcepath>
<path refid="path.sourcepath"/>
</sourcepath>
<classpath>
<pathelement path="${classes.dir}"/>
<path refid="path.classpath"/>
</classpath>
</javadoc>
<zip destfile="${javadoc.zip}" basedir="${javadoc.dir}" compress="true">
<exclude name="${javadoc.zip}"/>
</zip>
</target>
<target name="javadoc-browse" if="netbeans.home" unless="no.javadoc.preview" depends="init">
<nbbrowse file="${javadoc.dir}/index.html"/>
</target>
<target name="-test" depends="init,compile" description="runs a series of tests on svgSalamander">
<junit printsummary="withOutAndErr" haltonfailure="true">
<formatter type="plain" usefile="false"/>
<test name="${test.suite}" />
<classpath>
<pathelement location="${classes.dir}"/>
<path refid="path.classpath"/>
</classpath>
</junit>
</target>
<target name="smoketest" depends="init" description="runs smoke tests on svgSalamander">
<antcall target="-test">
<param name="test.suite" value="SmokeTests"/>
</antcall>
</target>
<target name="checkintest" depends="init" description="runs check in tests on svgSalamander">
<antcall target="-test">
<param name="test.suite" value="CheckInTests"/>
</antcall>
</target>
<target name="releasetest" depends="init" description="runs release tests on svgSalamander">
<antcall target="-test">
<param name="test.suite" value="ReleaseTests"/>
</antcall>
</target>
</project>