1 | <?xml version="1.0" encoding="UTF-8"?> |
---|
2 | <!-- |
---|
3 | *** GENERATED FROM project.xml - DO NOT EDIT *** |
---|
4 | *** EDIT ../build.xml INSTEAD *** |
---|
5 | |
---|
6 | For the purpose of easier reading the script |
---|
7 | is divided into following sections: |
---|
8 | |
---|
9 | - initialization |
---|
10 | - compilation |
---|
11 | - jar |
---|
12 | - execution |
---|
13 | - debugging |
---|
14 | - javadoc |
---|
15 | - junit compilation |
---|
16 | - junit execution |
---|
17 | - junit debugging |
---|
18 | - applet |
---|
19 | - cleanup |
---|
20 | |
---|
21 | --> |
---|
22 | <project xmlns:j2seproject1="http://www.netbeans.org/ns/j2se-project/1" xmlns:j2seproject3="http://www.netbeans.org/ns/j2se-project/3" xmlns:jaxrpc="http://www.netbeans.org/ns/j2se-project/jax-rpc" basedir=".." default="default" name="fmgVen-impl"> |
---|
23 | <fail message="Please build using Ant 1.8.0 or higher."> |
---|
24 | <condition> |
---|
25 | <not> |
---|
26 | <antversion atleast="1.8.0"/> |
---|
27 | </not> |
---|
28 | </condition> |
---|
29 | </fail> |
---|
30 | <target depends="test,jar,javadoc" description="Build and test whole project." name="default"/> |
---|
31 | <!-- |
---|
32 | ====================== |
---|
33 | INITIALIZATION SECTION |
---|
34 | ====================== |
---|
35 | --> |
---|
36 | <target name="-pre-init"> |
---|
37 | <!-- Empty placeholder for easier customization. --> |
---|
38 | <!-- You can override this target in the ../build.xml file. --> |
---|
39 | </target> |
---|
40 | <target depends="-pre-init" name="-init-private"> |
---|
41 | <property file="nbproject/private/config.properties"/> |
---|
42 | <property file="nbproject/private/configs/${config}.properties"/> |
---|
43 | <property file="nbproject/private/private.properties"/> |
---|
44 | </target> |
---|
45 | <target name="-pre-init-libraries"> |
---|
46 | <property location=".\lib\nblibraries.properties" name="libraries.path"/> |
---|
47 | <dirname file="${libraries.path}" property="libraries.dir.nativedirsep"/> |
---|
48 | <pathconvert dirsep="/" property="libraries.dir"> |
---|
49 | <path path="${libraries.dir.nativedirsep}"/> |
---|
50 | </pathconvert> |
---|
51 | <basename file="${libraries.path}" property="libraries.basename" suffix=".properties"/> |
---|
52 | <available file="${libraries.dir}/${libraries.basename}-private.properties" property="private.properties.available"/> |
---|
53 | </target> |
---|
54 | <target depends="-pre-init-libraries" if="private.properties.available" name="-init-private-libraries"> |
---|
55 | <loadproperties encoding="ISO-8859-1" srcfile="${libraries.dir}/${libraries.basename}-private.properties"> |
---|
56 | <filterchain> |
---|
57 | <replacestring from="$${base}" to="${libraries.dir}"/> |
---|
58 | <escapeunicode/> |
---|
59 | </filterchain> |
---|
60 | </loadproperties> |
---|
61 | </target> |
---|
62 | <target depends="-pre-init,-init-private,-init-private-libraries" name="-init-libraries"> |
---|
63 | <loadproperties encoding="ISO-8859-1" srcfile="${libraries.path}"> |
---|
64 | <filterchain> |
---|
65 | <replacestring from="$${base}" to="${libraries.dir}"/> |
---|
66 | <escapeunicode/> |
---|
67 | </filterchain> |
---|
68 | </loadproperties> |
---|
69 | </target> |
---|
70 | <target depends="-pre-init,-init-private,-init-libraries" name="-init-user"> |
---|
71 | <property file="${user.properties.file}"/> |
---|
72 | <!-- The two properties below are usually overridden --> |
---|
73 | <!-- by the active platform. Just a fallback. --> |
---|
74 | <property name="default.javac.source" value="1.4"/> |
---|
75 | <property name="default.javac.target" value="1.4"/> |
---|
76 | </target> |
---|
77 | <target depends="-pre-init,-init-private,-init-libraries,-init-user" name="-init-project"> |
---|
78 | <property file="nbproject/configs/${config}.properties"/> |
---|
79 | <property file="nbproject/project.properties"/> |
---|
80 | </target> |
---|
81 | <target depends="-pre-init,-init-private,-init-libraries,-init-user,-init-project,-init-macrodef-property" name="-do-init"> |
---|
82 | <available file="${manifest.file}" property="manifest.available"/> |
---|
83 | <condition property="splashscreen.available"> |
---|
84 | <and> |
---|
85 | <not> |
---|
86 | <equals arg1="${application.splash}" arg2="" trim="true"/> |
---|
87 | </not> |
---|
88 | <available file="${application.splash}"/> |
---|
89 | </and> |
---|
90 | </condition> |
---|
91 | <condition property="main.class.available"> |
---|
92 | <and> |
---|
93 | <isset property="main.class"/> |
---|
94 | <not> |
---|
95 | <equals arg1="${main.class}" arg2="" trim="true"/> |
---|
96 | </not> |
---|
97 | </and> |
---|
98 | </condition> |
---|
99 | <condition property="manifest.available+main.class"> |
---|
100 | <and> |
---|
101 | <isset property="manifest.available"/> |
---|
102 | <isset property="main.class.available"/> |
---|
103 | </and> |
---|
104 | </condition> |
---|
105 | <condition property="do.archive"> |
---|
106 | <not> |
---|
107 | <istrue value="${jar.archive.disabled}"/> |
---|
108 | </not> |
---|
109 | </condition> |
---|
110 | <condition property="do.mkdist"> |
---|
111 | <and> |
---|
112 | <isset property="do.archive"/> |
---|
113 | <isset property="libs.CopyLibs.classpath"/> |
---|
114 | <not> |
---|
115 | <istrue value="${mkdist.disabled}"/> |
---|
116 | </not> |
---|
117 | </and> |
---|
118 | </condition> |
---|
119 | <condition property="manifest.available+main.class+mkdist.available"> |
---|
120 | <and> |
---|
121 | <istrue value="${manifest.available+main.class}"/> |
---|
122 | <isset property="do.mkdist"/> |
---|
123 | </and> |
---|
124 | </condition> |
---|
125 | <condition property="do.archive+manifest.available"> |
---|
126 | <and> |
---|
127 | <isset property="manifest.available"/> |
---|
128 | <istrue value="${do.archive}"/> |
---|
129 | </and> |
---|
130 | </condition> |
---|
131 | <condition property="do.archive+main.class.available"> |
---|
132 | <and> |
---|
133 | <isset property="main.class.available"/> |
---|
134 | <istrue value="${do.archive}"/> |
---|
135 | </and> |
---|
136 | </condition> |
---|
137 | <condition property="do.archive+splashscreen.available"> |
---|
138 | <and> |
---|
139 | <isset property="splashscreen.available"/> |
---|
140 | <istrue value="${do.archive}"/> |
---|
141 | </and> |
---|
142 | </condition> |
---|
143 | <condition property="do.archive+manifest.available+main.class"> |
---|
144 | <and> |
---|
145 | <istrue value="${manifest.available+main.class}"/> |
---|
146 | <istrue value="${do.archive}"/> |
---|
147 | </and> |
---|
148 | </condition> |
---|
149 | <condition property="manifest.available-mkdist.available"> |
---|
150 | <or> |
---|
151 | <istrue value="${manifest.available}"/> |
---|
152 | <isset property="do.mkdist"/> |
---|
153 | </or> |
---|
154 | </condition> |
---|
155 | <condition property="manifest.available+main.class-mkdist.available"> |
---|
156 | <or> |
---|
157 | <istrue value="${manifest.available+main.class}"/> |
---|
158 | <isset property="do.mkdist"/> |
---|
159 | </or> |
---|
160 | </condition> |
---|
161 | <condition property="have.tests"> |
---|
162 | <or> |
---|
163 | <available file="${test.src.dir}"/> |
---|
164 | </or> |
---|
165 | </condition> |
---|
166 | <condition property="have.sources"> |
---|
167 | <or> |
---|
168 | <available file="${src.dir}"/> |
---|
169 | </or> |
---|
170 | </condition> |
---|
171 | <condition property="netbeans.home+have.tests"> |
---|
172 | <and> |
---|
173 | <isset property="netbeans.home"/> |
---|
174 | <isset property="have.tests"/> |
---|
175 | </and> |
---|
176 | </condition> |
---|
177 | <condition property="no.javadoc.preview"> |
---|
178 | <and> |
---|
179 | <isset property="javadoc.preview"/> |
---|
180 | <isfalse value="${javadoc.preview}"/> |
---|
181 | </and> |
---|
182 | </condition> |
---|
183 | <property name="run.jvmargs" value=""/> |
---|
184 | <property name="javac.compilerargs" value=""/> |
---|
185 | <property name="work.dir" value="${basedir}"/> |
---|
186 | <condition property="no.deps"> |
---|
187 | <and> |
---|
188 | <istrue value="${no.dependencies}"/> |
---|
189 | </and> |
---|
190 | </condition> |
---|
191 | <property name="javac.debug" value="true"/> |
---|
192 | <property name="javadoc.preview" value="true"/> |
---|
193 | <property name="application.args" value=""/> |
---|
194 | <property name="source.encoding" value="${file.encoding}"/> |
---|
195 | <property name="runtime.encoding" value="${source.encoding}"/> |
---|
196 | <condition property="javadoc.encoding.used" value="${javadoc.encoding}"> |
---|
197 | <and> |
---|
198 | <isset property="javadoc.encoding"/> |
---|
199 | <not> |
---|
200 | <equals arg1="${javadoc.encoding}" arg2=""/> |
---|
201 | </not> |
---|
202 | </and> |
---|
203 | </condition> |
---|
204 | <property name="javadoc.encoding.used" value="${source.encoding}"/> |
---|
205 | <property name="includes" value="**"/> |
---|
206 | <property name="excludes" value=""/> |
---|
207 | <property name="do.depend" value="false"/> |
---|
208 | <condition property="do.depend.true"> |
---|
209 | <istrue value="${do.depend}"/> |
---|
210 | </condition> |
---|
211 | <path id="endorsed.classpath.path" path="${endorsed.classpath}"/> |
---|
212 | <condition else="" property="endorsed.classpath.cmd.line.arg" value="-Xbootclasspath/p:'${toString:endorsed.classpath.path}'"> |
---|
213 | <length length="0" string="${endorsed.classpath}" when="greater"/> |
---|
214 | </condition> |
---|
215 | <condition else="false" property="jdkBug6558476"> |
---|
216 | <and> |
---|
217 | <matches pattern="1\.[56]" string="${java.specification.version}"/> |
---|
218 | <not> |
---|
219 | <os family="unix"/> |
---|
220 | </not> |
---|
221 | </and> |
---|
222 | </condition> |
---|
223 | <property name="javac.fork" value="${jdkBug6558476}"/> |
---|
224 | <property name="jar.index" value="false"/> |
---|
225 | <property name="jar.index.metainf" value="${jar.index}"/> |
---|
226 | <property name="copylibs.rebase" value="true"/> |
---|
227 | <available file="${meta.inf.dir}/persistence.xml" property="has.persistence.xml"/> |
---|
228 | </target> |
---|
229 | <target name="-post-init"> |
---|
230 | <!-- Empty placeholder for easier customization. --> |
---|
231 | <!-- You can override this target in the ../build.xml file. --> |
---|
232 | </target> |
---|
233 | <target depends="-pre-init,-init-private,-init-libraries,-init-user,-init-project,-do-init" name="-init-check"> |
---|
234 | <fail unless="src.dir">Must set src.dir</fail> |
---|
235 | <fail unless="test.src.dir">Must set test.src.dir</fail> |
---|
236 | <fail unless="build.dir">Must set build.dir</fail> |
---|
237 | <fail unless="dist.dir">Must set dist.dir</fail> |
---|
238 | <fail unless="build.classes.dir">Must set build.classes.dir</fail> |
---|
239 | <fail unless="dist.javadoc.dir">Must set dist.javadoc.dir</fail> |
---|
240 | <fail unless="build.test.classes.dir">Must set build.test.classes.dir</fail> |
---|
241 | <fail unless="build.test.results.dir">Must set build.test.results.dir</fail> |
---|
242 | <fail unless="build.classes.excludes">Must set build.classes.excludes</fail> |
---|
243 | <fail unless="dist.jar">Must set dist.jar</fail> |
---|
244 | </target> |
---|
245 | <target name="-init-macrodef-property"> |
---|
246 | <macrodef name="property" uri="http://www.netbeans.org/ns/j2se-project/1"> |
---|
247 | <attribute name="name"/> |
---|
248 | <attribute name="value"/> |
---|
249 | <sequential> |
---|
250 | <property name="@{name}" value="${@{value}}"/> |
---|
251 | </sequential> |
---|
252 | </macrodef> |
---|
253 | </target> |
---|
254 | <target depends="-init-ap-cmdline-properties" if="ap.supported.internal" name="-init-macrodef-javac-with-processors"> |
---|
255 | <macrodef name="javac" uri="http://www.netbeans.org/ns/j2se-project/3"> |
---|
256 | <attribute default="${src.dir}" name="srcdir"/> |
---|
257 | <attribute default="${build.classes.dir}" name="destdir"/> |
---|
258 | <attribute default="${javac.classpath}" name="classpath"/> |
---|
259 | <attribute default="${javac.processorpath}" name="processorpath"/> |
---|
260 | <attribute default="${build.generated.sources.dir}/ap-source-output" name="apgeneratedsrcdir"/> |
---|
261 | <attribute default="${includes}" name="includes"/> |
---|
262 | <attribute default="${excludes}" name="excludes"/> |
---|
263 | <attribute default="${javac.debug}" name="debug"/> |
---|
264 | <attribute default="${empty.dir}" name="sourcepath"/> |
---|
265 | <attribute default="${empty.dir}" name="gensrcdir"/> |
---|
266 | <element name="customize" optional="true"/> |
---|
267 | <sequential> |
---|
268 | <property location="${build.dir}/empty" name="empty.dir"/> |
---|
269 | <mkdir dir="${empty.dir}"/> |
---|
270 | <mkdir dir="@{apgeneratedsrcdir}"/> |
---|
271 | <javac debug="@{debug}" deprecation="${javac.deprecation}" destdir="@{destdir}" encoding="${source.encoding}" excludes="@{excludes}" fork="${javac.fork}" includeantruntime="false" includes="@{includes}" source="${javac.source}" sourcepath="@{sourcepath}" srcdir="@{srcdir}" target="${javac.target}" tempdir="${java.io.tmpdir}"> |
---|
272 | <src> |
---|
273 | <dirset dir="@{gensrcdir}" erroronmissingdir="false"> |
---|
274 | <include name="*"/> |
---|
275 | </dirset> |
---|
276 | </src> |
---|
277 | <classpath> |
---|
278 | <path path="@{classpath}"/> |
---|
279 | </classpath> |
---|
280 | <compilerarg line="${endorsed.classpath.cmd.line.arg}"/> |
---|
281 | <compilerarg line="${javac.compilerargs}"/> |
---|
282 | <compilerarg value="-processorpath"/> |
---|
283 | <compilerarg path="@{processorpath}:${empty.dir}"/> |
---|
284 | <compilerarg line="${ap.processors.internal}"/> |
---|
285 | <compilerarg line="${annotation.processing.processor.options}"/> |
---|
286 | <compilerarg value="-s"/> |
---|
287 | <compilerarg path="@{apgeneratedsrcdir}"/> |
---|
288 | <compilerarg line="${ap.proc.none.internal}"/> |
---|
289 | <customize/> |
---|
290 | </javac> |
---|
291 | </sequential> |
---|
292 | </macrodef> |
---|
293 | </target> |
---|
294 | <target depends="-init-ap-cmdline-properties" name="-init-macrodef-javac-without-processors" unless="ap.supported.internal"> |
---|
295 | <macrodef name="javac" uri="http://www.netbeans.org/ns/j2se-project/3"> |
---|
296 | <attribute default="${src.dir}" name="srcdir"/> |
---|
297 | <attribute default="${build.classes.dir}" name="destdir"/> |
---|
298 | <attribute default="${javac.classpath}" name="classpath"/> |
---|
299 | <attribute default="${javac.processorpath}" name="processorpath"/> |
---|
300 | <attribute default="${build.generated.sources.dir}/ap-source-output" name="apgeneratedsrcdir"/> |
---|
301 | <attribute default="${includes}" name="includes"/> |
---|
302 | <attribute default="${excludes}" name="excludes"/> |
---|
303 | <attribute default="${javac.debug}" name="debug"/> |
---|
304 | <attribute default="${empty.dir}" name="sourcepath"/> |
---|
305 | <attribute default="${empty.dir}" name="gensrcdir"/> |
---|
306 | <element name="customize" optional="true"/> |
---|
307 | <sequential> |
---|
308 | <property location="${build.dir}/empty" name="empty.dir"/> |
---|
309 | <mkdir dir="${empty.dir}"/> |
---|
310 | <javac debug="@{debug}" deprecation="${javac.deprecation}" destdir="@{destdir}" encoding="${source.encoding}" excludes="@{excludes}" fork="${javac.fork}" includeantruntime="false" includes="@{includes}" source="${javac.source}" sourcepath="@{sourcepath}" srcdir="@{srcdir}" target="${javac.target}" tempdir="${java.io.tmpdir}"> |
---|
311 | <src> |
---|
312 | <dirset dir="@{gensrcdir}" erroronmissingdir="false"> |
---|
313 | <include name="*"/> |
---|
314 | </dirset> |
---|
315 | </src> |
---|
316 | <classpath> |
---|
317 | <path path="@{classpath}"/> |
---|
318 | </classpath> |
---|
319 | <compilerarg line="${endorsed.classpath.cmd.line.arg}"/> |
---|
320 | <compilerarg line="${javac.compilerargs}"/> |
---|
321 | <customize/> |
---|
322 | </javac> |
---|
323 | </sequential> |
---|
324 | </macrodef> |
---|
325 | </target> |
---|
326 | <target depends="-init-macrodef-javac-with-processors,-init-macrodef-javac-without-processors" name="-init-macrodef-javac"> |
---|
327 | <macrodef name="depend" uri="http://www.netbeans.org/ns/j2se-project/3"> |
---|
328 | <attribute default="${src.dir}" name="srcdir"/> |
---|
329 | <attribute default="${build.classes.dir}" name="destdir"/> |
---|
330 | <attribute default="${javac.classpath}" name="classpath"/> |
---|
331 | <sequential> |
---|
332 | <depend cache="${build.dir}/depcache" destdir="@{destdir}" excludes="${excludes}" includes="${includes}" srcdir="@{srcdir}"> |
---|
333 | <classpath> |
---|
334 | <path path="@{classpath}"/> |
---|
335 | </classpath> |
---|
336 | </depend> |
---|
337 | </sequential> |
---|
338 | </macrodef> |
---|
339 | <macrodef name="force-recompile" uri="http://www.netbeans.org/ns/j2se-project/3"> |
---|
340 | <attribute default="${build.classes.dir}" name="destdir"/> |
---|
341 | <sequential> |
---|
342 | <fail unless="javac.includes">Must set javac.includes</fail> |
---|
343 | <pathconvert pathsep="${line.separator}" property="javac.includes.binary"> |
---|
344 | <path> |
---|
345 | <filelist dir="@{destdir}" files="${javac.includes}"/> |
---|
346 | </path> |
---|
347 | <globmapper from="*.java" to="*.class"/> |
---|
348 | </pathconvert> |
---|
349 | <tempfile deleteonexit="true" property="javac.includesfile.binary"/> |
---|
350 | <echo file="${javac.includesfile.binary}" message="${javac.includes.binary}"/> |
---|
351 | <delete> |
---|
352 | <files includesfile="${javac.includesfile.binary}"/> |
---|
353 | </delete> |
---|
354 | <delete> |
---|
355 | <fileset file="${javac.includesfile.binary}"/> |
---|
356 | </delete> |
---|
357 | </sequential> |
---|
358 | </macrodef> |
---|
359 | </target> |
---|
360 | <target name="-init-macrodef-junit"> |
---|
361 | <macrodef name="junit" uri="http://www.netbeans.org/ns/j2se-project/3"> |
---|
362 | <attribute default="${includes}" name="includes"/> |
---|
363 | <attribute default="${excludes}" name="excludes"/> |
---|
364 | <attribute default="**" name="testincludes"/> |
---|
365 | <sequential> |
---|
366 | <property name="junit.forkmode" value="perTest"/> |
---|
367 | <junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" forkmode="${junit.forkmode}" showoutput="true" tempdir="${build.dir}"> |
---|
368 | <batchtest todir="${build.test.results.dir}"> |
---|
369 | <fileset dir="${test.src.dir}" excludes="@{excludes},${excludes}" includes="@{includes}"> |
---|
370 | <filename name="@{testincludes}"/> |
---|
371 | </fileset> |
---|
372 | </batchtest> |
---|
373 | <classpath> |
---|
374 | <path path="${run.test.classpath}"/> |
---|
375 | </classpath> |
---|
376 | <syspropertyset> |
---|
377 | <propertyref prefix="test-sys-prop."/> |
---|
378 | <mapper from="test-sys-prop.*" to="*" type="glob"/> |
---|
379 | </syspropertyset> |
---|
380 | <formatter type="brief" usefile="false"/> |
---|
381 | <formatter type="xml"/> |
---|
382 | <jvmarg line="${endorsed.classpath.cmd.line.arg}"/> |
---|
383 | <jvmarg value="-ea"/> |
---|
384 | <jvmarg line="${run.jvmargs}"/> |
---|
385 | </junit> |
---|
386 | </sequential> |
---|
387 | </macrodef> |
---|
388 | </target> |
---|
389 | <target depends="-profile-pre-init, init, -profile-post-init, -profile-init-macrodef-profile, -profile-init-check" name="profile-init"/> |
---|
390 | <target name="-profile-pre-init"> |
---|
391 | <!-- Empty placeholder for easier customization. --> |
---|
392 | <!-- You can override this target in the ../build.xml file. --> |
---|
393 | </target> |
---|
394 | <target name="-profile-post-init"> |
---|
395 | <!-- Empty placeholder for easier customization. --> |
---|
396 | <!-- You can override this target in the ../build.xml file. --> |
---|
397 | </target> |
---|
398 | <target name="-profile-init-macrodef-profile"> |
---|
399 | <macrodef name="resolve"> |
---|
400 | <attribute name="name"/> |
---|
401 | <attribute name="value"/> |
---|
402 | <sequential> |
---|
403 | <property name="@{name}" value="${env.@{value}}"/> |
---|
404 | </sequential> |
---|
405 | </macrodef> |
---|
406 | <macrodef name="profile"> |
---|
407 | <attribute default="${main.class}" name="classname"/> |
---|
408 | <element name="customize" optional="true"/> |
---|
409 | <sequential> |
---|
410 | <property environment="env"/> |
---|
411 | <resolve name="profiler.current.path" value="${profiler.info.pathvar}"/> |
---|
412 | <java classname="@{classname}" dir="${profiler.info.dir}" fork="true" jvm="${profiler.info.jvm}"> |
---|
413 | <jvmarg line="${endorsed.classpath.cmd.line.arg}"/> |
---|
414 | <jvmarg value="${profiler.info.jvmargs.agent}"/> |
---|
415 | <jvmarg line="${profiler.info.jvmargs}"/> |
---|
416 | <env key="${profiler.info.pathvar}" path="${profiler.info.agentpath}:${profiler.current.path}"/> |
---|
417 | <arg line="${application.args}"/> |
---|
418 | <classpath> |
---|
419 | <path path="${run.classpath}"/> |
---|
420 | </classpath> |
---|
421 | <syspropertyset> |
---|
422 | <propertyref prefix="run-sys-prop."/> |
---|
423 | <mapper from="run-sys-prop.*" to="*" type="glob"/> |
---|
424 | </syspropertyset> |
---|
425 | <customize/> |
---|
426 | </java> |
---|
427 | </sequential> |
---|
428 | </macrodef> |
---|
429 | </target> |
---|
430 | <target depends="-profile-pre-init, init, -profile-post-init, -profile-init-macrodef-profile" name="-profile-init-check"> |
---|
431 | <fail unless="profiler.info.jvm">Must set JVM to use for profiling in profiler.info.jvm</fail> |
---|
432 | <fail unless="profiler.info.jvmargs.agent">Must set profiler agent JVM arguments in profiler.info.jvmargs.agent</fail> |
---|
433 | </target> |
---|
434 | <target depends="-init-debug-args" name="-init-macrodef-nbjpda"> |
---|
435 | <macrodef name="nbjpdastart" uri="http://www.netbeans.org/ns/j2se-project/1"> |
---|
436 | <attribute default="${main.class}" name="name"/> |
---|
437 | <attribute default="${debug.classpath}" name="classpath"/> |
---|
438 | <attribute default="" name="stopclassname"/> |
---|
439 | <sequential> |
---|
440 | <nbjpdastart addressproperty="jpda.address" name="@{name}" stopclassname="@{stopclassname}" transport="${debug-transport}"> |
---|
441 | <classpath> |
---|
442 | <path path="@{classpath}"/> |
---|
443 | </classpath> |
---|
444 | </nbjpdastart> |
---|
445 | </sequential> |
---|
446 | </macrodef> |
---|
447 | <macrodef name="nbjpdareload" uri="http://www.netbeans.org/ns/j2se-project/1"> |
---|
448 | <attribute default="${build.classes.dir}" name="dir"/> |
---|
449 | <sequential> |
---|
450 | <nbjpdareload> |
---|
451 | <fileset dir="@{dir}" includes="${fix.classes}"> |
---|
452 | <include name="${fix.includes}*.class"/> |
---|
453 | </fileset> |
---|
454 | </nbjpdareload> |
---|
455 | </sequential> |
---|
456 | </macrodef> |
---|
457 | </target> |
---|
458 | <target name="-init-debug-args"> |
---|
459 | <property name="version-output" value="java version "${ant.java.version}"/> |
---|
460 | <condition property="have-jdk-older-than-1.4"> |
---|
461 | <or> |
---|
462 | <contains string="${version-output}" substring="java version "1.0"/> |
---|
463 | <contains string="${version-output}" substring="java version "1.1"/> |
---|
464 | <contains string="${version-output}" substring="java version "1.2"/> |
---|
465 | <contains string="${version-output}" substring="java version "1.3"/> |
---|
466 | </or> |
---|
467 | </condition> |
---|
468 | <condition else="-Xdebug" property="debug-args-line" value="-Xdebug -Xnoagent -Djava.compiler=none"> |
---|
469 | <istrue value="${have-jdk-older-than-1.4}"/> |
---|
470 | </condition> |
---|
471 | <condition else="dt_socket" property="debug-transport-by-os" value="dt_shmem"> |
---|
472 | <os family="windows"/> |
---|
473 | </condition> |
---|
474 | <condition else="${debug-transport-by-os}" property="debug-transport" value="${debug.transport}"> |
---|
475 | <isset property="debug.transport"/> |
---|
476 | </condition> |
---|
477 | </target> |
---|
478 | <target depends="-init-debug-args" name="-init-macrodef-debug"> |
---|
479 | <macrodef name="debug" uri="http://www.netbeans.org/ns/j2se-project/3"> |
---|
480 | <attribute default="${main.class}" name="classname"/> |
---|
481 | <attribute default="${debug.classpath}" name="classpath"/> |
---|
482 | <element name="customize" optional="true"/> |
---|
483 | <sequential> |
---|
484 | <java classname="@{classname}" dir="${work.dir}" fork="true"> |
---|
485 | <jvmarg line="${endorsed.classpath.cmd.line.arg}"/> |
---|
486 | <jvmarg line="${debug-args-line}"/> |
---|
487 | <jvmarg value="-Xrunjdwp:transport=${debug-transport},address=${jpda.address}"/> |
---|
488 | <jvmarg value="-Dfile.encoding=${runtime.encoding}"/> |
---|
489 | <redirector errorencoding="${runtime.encoding}" inputencoding="${runtime.encoding}" outputencoding="${runtime.encoding}"/> |
---|
490 | <jvmarg line="${run.jvmargs}"/> |
---|
491 | <classpath> |
---|
492 | <path path="@{classpath}"/> |
---|
493 | </classpath> |
---|
494 | <syspropertyset> |
---|
495 | <propertyref prefix="run-sys-prop."/> |
---|
496 | <mapper from="run-sys-prop.*" to="*" type="glob"/> |
---|
497 | </syspropertyset> |
---|
498 | <customize/> |
---|
499 | </java> |
---|
500 | </sequential> |
---|
501 | </macrodef> |
---|
502 | </target> |
---|
503 | <target name="-init-macrodef-java"> |
---|
504 | <macrodef name="java" uri="http://www.netbeans.org/ns/j2se-project/1"> |
---|
505 | <attribute default="${main.class}" name="classname"/> |
---|
506 | <attribute default="${run.classpath}" name="classpath"/> |
---|
507 | <element name="customize" optional="true"/> |
---|
508 | <sequential> |
---|
509 | <java classname="@{classname}" dir="${work.dir}" fork="true"> |
---|
510 | <jvmarg line="${endorsed.classpath.cmd.line.arg}"/> |
---|
511 | <jvmarg value="-Dfile.encoding=${runtime.encoding}"/> |
---|
512 | <redirector errorencoding="${runtime.encoding}" inputencoding="${runtime.encoding}" outputencoding="${runtime.encoding}"/> |
---|
513 | <jvmarg line="${run.jvmargs}"/> |
---|
514 | <classpath> |
---|
515 | <path path="@{classpath}"/> |
---|
516 | </classpath> |
---|
517 | <syspropertyset> |
---|
518 | <propertyref prefix="run-sys-prop."/> |
---|
519 | <mapper from="run-sys-prop.*" to="*" type="glob"/> |
---|
520 | </syspropertyset> |
---|
521 | <customize/> |
---|
522 | </java> |
---|
523 | </sequential> |
---|
524 | </macrodef> |
---|
525 | </target> |
---|
526 | <target name="-init-macrodef-copylibs"> |
---|
527 | <macrodef name="copylibs" uri="http://www.netbeans.org/ns/j2se-project/3"> |
---|
528 | <attribute default="${manifest.file}" name="manifest"/> |
---|
529 | <element name="customize" optional="true"/> |
---|
530 | <sequential> |
---|
531 | <property location="${build.classes.dir}" name="build.classes.dir.resolved"/> |
---|
532 | <pathconvert property="run.classpath.without.build.classes.dir"> |
---|
533 | <path path="${run.classpath}"/> |
---|
534 | <map from="${build.classes.dir.resolved}" to=""/> |
---|
535 | </pathconvert> |
---|
536 | <pathconvert pathsep=" " property="jar.classpath"> |
---|
537 | <path path="${run.classpath.without.build.classes.dir}"/> |
---|
538 | <chainedmapper> |
---|
539 | <flattenmapper/> |
---|
540 | <globmapper from="*" to="lib/*"/> |
---|
541 | </chainedmapper> |
---|
542 | </pathconvert> |
---|
543 | <taskdef classname="org.netbeans.modules.java.j2seproject.copylibstask.CopyLibs" classpath="${libs.CopyLibs.classpath}" name="copylibs"/> |
---|
544 | <copylibs compress="${jar.compress}" index="${jar.index}" indexMetaInf="${jar.index.metainf}" jarfile="${dist.jar}" manifest="@{manifest}" rebase="${copylibs.rebase}" runtimeclasspath="${run.classpath.without.build.classes.dir}"> |
---|
545 | <fileset dir="${build.classes.dir}"/> |
---|
546 | <manifest> |
---|
547 | <attribute name="Class-Path" value="${jar.classpath}"/> |
---|
548 | <customize/> |
---|
549 | </manifest> |
---|
550 | </copylibs> |
---|
551 | </sequential> |
---|
552 | </macrodef> |
---|
553 | </target> |
---|
554 | <target name="-init-presetdef-jar"> |
---|
555 | <presetdef name="jar" uri="http://www.netbeans.org/ns/j2se-project/1"> |
---|
556 | <jar compress="${jar.compress}" index="${jar.index}" jarfile="${dist.jar}"> |
---|
557 | <j2seproject1:fileset dir="${build.classes.dir}"/> |
---|
558 | </jar> |
---|
559 | </presetdef> |
---|
560 | </target> |
---|
561 | <target name="-init-ap-cmdline-properties"> |
---|
562 | <property name="annotation.processing.enabled" value="true"/> |
---|
563 | <property name="annotation.processing.processors.list" value=""/> |
---|
564 | <property name="annotation.processing.processor.options" value=""/> |
---|
565 | <property name="annotation.processing.run.all.processors" value="true"/> |
---|
566 | <property name="javac.processorpath" value="${javac.classpath}"/> |
---|
567 | <property name="javac.test.processorpath" value="${javac.test.classpath}"/> |
---|
568 | <condition property="ap.supported.internal" value="true"> |
---|
569 | <not> |
---|
570 | <matches pattern="1\.[0-5](\..*)?" string="${javac.source}"/> |
---|
571 | </not> |
---|
572 | </condition> |
---|
573 | </target> |
---|
574 | <target depends="-init-ap-cmdline-properties" if="ap.supported.internal" name="-init-ap-cmdline-supported"> |
---|
575 | <condition else="" property="ap.processors.internal" value="-processor ${annotation.processing.processors.list}"> |
---|
576 | <isfalse value="${annotation.processing.run.all.processors}"/> |
---|
577 | </condition> |
---|
578 | <condition else="" property="ap.proc.none.internal" value="-proc:none"> |
---|
579 | <isfalse value="${annotation.processing.enabled}"/> |
---|
580 | </condition> |
---|
581 | </target> |
---|
582 | <target depends="-init-ap-cmdline-properties,-init-ap-cmdline-supported" name="-init-ap-cmdline"> |
---|
583 | <property name="ap.cmd.line.internal" value=""/> |
---|
584 | </target> |
---|
585 | <target depends="-pre-init,-init-private,-init-libraries,-init-user,-init-project,-do-init,-post-init,-init-check,-init-macrodef-property,-init-macrodef-javac,-init-macrodef-junit,-init-macrodef-nbjpda,-init-macrodef-debug,-init-macrodef-java,-init-presetdef-jar,-init-ap-cmdline" name="init"/> |
---|
586 | <!-- |
---|
587 | =================== |
---|
588 | COMPILATION SECTION |
---|
589 | =================== |
---|
590 | --> |
---|
591 | <target name="-deps-jar-init" unless="built-jar.properties"> |
---|
592 | <property location="${build.dir}/built-jar.properties" name="built-jar.properties"/> |
---|
593 | <delete file="${built-jar.properties}" quiet="true"/> |
---|
594 | </target> |
---|
595 | <target if="already.built.jar.${basedir}" name="-warn-already-built-jar"> |
---|
596 | <echo level="warn" message="Cycle detected: fmgVen was already built"/> |
---|
597 | </target> |
---|
598 | <target depends="init,-deps-jar-init" name="deps-jar" unless="no.deps"> |
---|
599 | <mkdir dir="${build.dir}"/> |
---|
600 | <touch file="${built-jar.properties}" verbose="false"/> |
---|
601 | <property file="${built-jar.properties}" prefix="already.built.jar."/> |
---|
602 | <antcall target="-warn-already-built-jar"/> |
---|
603 | <propertyfile file="${built-jar.properties}"> |
---|
604 | <entry key="${basedir}" value=""/> |
---|
605 | </propertyfile> |
---|
606 | </target> |
---|
607 | <target depends="init,-check-automatic-build,-clean-after-automatic-build" name="-verify-automatic-build"/> |
---|
608 | <target depends="init" name="-check-automatic-build"> |
---|
609 | <available file="${build.classes.dir}/.netbeans_automatic_build" property="netbeans.automatic.build"/> |
---|
610 | </target> |
---|
611 | <target depends="init" if="netbeans.automatic.build" name="-clean-after-automatic-build"> |
---|
612 | <antcall target="clean"/> |
---|
613 | </target> |
---|
614 | <target depends="init,deps-jar" name="-pre-pre-compile"> |
---|
615 | <mkdir dir="${build.classes.dir}"/> |
---|
616 | </target> |
---|
617 | <target name="-pre-compile"> |
---|
618 | <!-- Empty placeholder for easier customization. --> |
---|
619 | <!-- You can override this target in the ../build.xml file. --> |
---|
620 | </target> |
---|
621 | <target if="do.depend.true" name="-compile-depend"> |
---|
622 | <pathconvert property="build.generated.subdirs"> |
---|
623 | <dirset dir="${build.generated.sources.dir}" erroronmissingdir="false"> |
---|
624 | <include name="*"/> |
---|
625 | </dirset> |
---|
626 | </pathconvert> |
---|
627 | <j2seproject3:depend srcdir="${src.dir}:${build.generated.subdirs}"/> |
---|
628 | </target> |
---|
629 | <target depends="init,deps-jar,-pre-pre-compile,-pre-compile, -copy-persistence-xml,-compile-depend" if="have.sources" name="-do-compile"> |
---|
630 | <j2seproject3:javac gensrcdir="${build.generated.sources.dir}"/> |
---|
631 | <copy todir="${build.classes.dir}"> |
---|
632 | <fileset dir="${src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/> |
---|
633 | </copy> |
---|
634 | </target> |
---|
635 | <target if="has.persistence.xml" name="-copy-persistence-xml"> |
---|
636 | <mkdir dir="${build.classes.dir}/META-INF"/> |
---|
637 | <copy todir="${build.classes.dir}/META-INF"> |
---|
638 | <fileset dir="${meta.inf.dir}" includes="persistence.xml"/> |
---|
639 | </copy> |
---|
640 | </target> |
---|
641 | <target name="-post-compile"> |
---|
642 | <!-- Empty placeholder for easier customization. --> |
---|
643 | <!-- You can override this target in the ../build.xml file. --> |
---|
644 | </target> |
---|
645 | <target depends="init,deps-jar,-verify-automatic-build,-pre-pre-compile,-pre-compile,-do-compile,-post-compile" description="Compile project." name="compile"/> |
---|
646 | <target name="-pre-compile-single"> |
---|
647 | <!-- Empty placeholder for easier customization. --> |
---|
648 | <!-- You can override this target in the ../build.xml file. --> |
---|
649 | </target> |
---|
650 | <target depends="init,deps-jar,-pre-pre-compile" name="-do-compile-single"> |
---|
651 | <fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail> |
---|
652 | <j2seproject3:force-recompile/> |
---|
653 | <j2seproject3:javac excludes="" gensrcdir="${build.generated.sources.dir}" includes="${javac.includes}" sourcepath="${src.dir}"/> |
---|
654 | </target> |
---|
655 | <target name="-post-compile-single"> |
---|
656 | <!-- Empty placeholder for easier customization. --> |
---|
657 | <!-- You can override this target in the ../build.xml file. --> |
---|
658 | </target> |
---|
659 | <target depends="init,deps-jar,-verify-automatic-build,-pre-pre-compile,-pre-compile-single,-do-compile-single,-post-compile-single" name="compile-single"/> |
---|
660 | <!-- |
---|
661 | ==================== |
---|
662 | JAR BUILDING SECTION |
---|
663 | ==================== |
---|
664 | --> |
---|
665 | <target depends="init" name="-pre-pre-jar"> |
---|
666 | <dirname file="${dist.jar}" property="dist.jar.dir"/> |
---|
667 | <mkdir dir="${dist.jar.dir}"/> |
---|
668 | </target> |
---|
669 | <target name="-pre-jar"> |
---|
670 | <!-- Empty placeholder for easier customization. --> |
---|
671 | <!-- You can override this target in the ../build.xml file. --> |
---|
672 | </target> |
---|
673 | <target depends="init,compile,-pre-pre-jar,-pre-jar" if="do.archive" name="-do-jar-without-manifest" unless="manifest.available-mkdist.available"> |
---|
674 | <j2seproject1:jar/> |
---|
675 | </target> |
---|
676 | <target depends="init,compile,-pre-pre-jar,-pre-jar" if="do.archive+manifest.available" name="-do-jar-with-manifest" unless="manifest.available+main.class-mkdist.available"> |
---|
677 | <j2seproject1:jar manifest="${manifest.file}"/> |
---|
678 | </target> |
---|
679 | <target depends="init,compile,-pre-pre-jar,-pre-jar" if="do.archive+manifest.available+main.class" name="-do-jar-with-mainclass" unless="manifest.available+main.class+mkdist.available"> |
---|
680 | <j2seproject1:jar manifest="${manifest.file}"> |
---|
681 | <j2seproject1:manifest> |
---|
682 | <j2seproject1:attribute name="Main-Class" value="${main.class}"/> |
---|
683 | </j2seproject1:manifest> |
---|
684 | </j2seproject1:jar> |
---|
685 | <echo level="info">To run this application from the command line without Ant, try:</echo> |
---|
686 | <property location="${build.classes.dir}" name="build.classes.dir.resolved"/> |
---|
687 | <property location="${dist.jar}" name="dist.jar.resolved"/> |
---|
688 | <pathconvert property="run.classpath.with.dist.jar"> |
---|
689 | <path path="${run.classpath}"/> |
---|
690 | <map from="${build.classes.dir.resolved}" to="${dist.jar.resolved}"/> |
---|
691 | </pathconvert> |
---|
692 | <echo level="info">java -cp "${run.classpath.with.dist.jar}" ${main.class}</echo> |
---|
693 | </target> |
---|
694 | <target depends="init" if="do.archive" name="-do-jar-with-libraries-create-manifest" unless="manifest.available"> |
---|
695 | <tempfile deleteonexit="true" destdir="${build.dir}" property="tmp.manifest.file"/> |
---|
696 | <touch file="${tmp.manifest.file}" verbose="false"/> |
---|
697 | </target> |
---|
698 | <target depends="init" if="do.archive+manifest.available" name="-do-jar-with-libraries-copy-manifest"> |
---|
699 | <tempfile deleteonexit="true" destdir="${build.dir}" property="tmp.manifest.file"/> |
---|
700 | <copy file="${manifest.file}" tofile="${tmp.manifest.file}"/> |
---|
701 | </target> |
---|
702 | <target depends="init,-do-jar-with-libraries-create-manifest,-do-jar-with-libraries-copy-manifest" if="do.archive+main.class.available" name="-do-jar-with-libraries-set-main"> |
---|
703 | <manifest file="${tmp.manifest.file}" mode="update"> |
---|
704 | <attribute name="Main-Class" value="${main.class}"/> |
---|
705 | </manifest> |
---|
706 | </target> |
---|
707 | <target depends="init,-do-jar-with-libraries-create-manifest,-do-jar-with-libraries-copy-manifest" if="do.archive+splashscreen.available" name="-do-jar-with-libraries-set-splashscreen"> |
---|
708 | <basename file="${application.splash}" property="splashscreen.basename"/> |
---|
709 | <mkdir dir="${build.classes.dir}/META-INF"/> |
---|
710 | <copy failonerror="false" file="${application.splash}" todir="${build.classes.dir}/META-INF"/> |
---|
711 | <manifest file="${tmp.manifest.file}" mode="update"> |
---|
712 | <attribute name="SplashScreen-Image" value="META-INF/${splashscreen.basename}"/> |
---|
713 | </manifest> |
---|
714 | </target> |
---|
715 | <target depends="init,-init-macrodef-copylibs,compile,-pre-pre-jar,-pre-jar,-do-jar-with-libraries-create-manifest,-do-jar-with-libraries-copy-manifest,-do-jar-with-libraries-set-main,-do-jar-with-libraries-set-splashscreen" if="do.mkdist" name="-do-jar-with-libraries-pack"> |
---|
716 | <j2seproject3:copylibs manifest="${tmp.manifest.file}"/> |
---|
717 | <echo level="info">To run this application from the command line without Ant, try:</echo> |
---|
718 | <property location="${dist.jar}" name="dist.jar.resolved"/> |
---|
719 | <echo level="info">java -jar "${dist.jar.resolved}"</echo> |
---|
720 | </target> |
---|
721 | <target depends="-do-jar-with-libraries-pack" if="do.archive" name="-do-jar-with-libraries-delete-manifest"> |
---|
722 | <delete> |
---|
723 | <fileset file="${tmp.manifest.file}"/> |
---|
724 | </delete> |
---|
725 | </target> |
---|
726 | <target depends="init,compile,-pre-pre-jar,-pre-jar,-do-jar-with-libraries-create-manifest,-do-jar-with-libraries-copy-manifest,-do-jar-with-libraries-set-main,-do-jar-with-libraries-set-splashscreen,-do-jar-with-libraries-pack,-do-jar-with-libraries-delete-manifest" name="-do-jar-with-libraries"/> |
---|
727 | <target name="-post-jar"> |
---|
728 | <!-- Empty placeholder for easier customization. --> |
---|
729 | <!-- You can override this target in the ../build.xml file. --> |
---|
730 | </target> |
---|
731 | <target depends="init,compile,-pre-jar,-do-jar-with-manifest,-do-jar-without-manifest,-do-jar-with-mainclass,-do-jar-with-libraries,-post-jar" description="Build JAR." name="jar"/> |
---|
732 | <!-- |
---|
733 | ================= |
---|
734 | EXECUTION SECTION |
---|
735 | ================= |
---|
736 | --> |
---|
737 | <target depends="init,compile" description="Run a main class." name="run"> |
---|
738 | <j2seproject1:java> |
---|
739 | <customize> |
---|
740 | <arg line="${application.args}"/> |
---|
741 | </customize> |
---|
742 | </j2seproject1:java> |
---|
743 | </target> |
---|
744 | <target name="-do-not-recompile"> |
---|
745 | <property name="javac.includes.binary" value=""/> |
---|
746 | </target> |
---|
747 | <target depends="init,compile-single" name="run-single"> |
---|
748 | <fail unless="run.class">Must select one file in the IDE or set run.class</fail> |
---|
749 | <j2seproject1:java classname="${run.class}"/> |
---|
750 | </target> |
---|
751 | <target depends="init,compile-test-single" name="run-test-with-main"> |
---|
752 | <fail unless="run.class">Must select one file in the IDE or set run.class</fail> |
---|
753 | <j2seproject1:java classname="${run.class}" classpath="${run.test.classpath}"/> |
---|
754 | </target> |
---|
755 | <!-- |
---|
756 | ================= |
---|
757 | DEBUGGING SECTION |
---|
758 | ================= |
---|
759 | --> |
---|
760 | <target depends="init" if="netbeans.home" name="-debug-start-debugger"> |
---|
761 | <j2seproject1:nbjpdastart name="${debug.class}"/> |
---|
762 | </target> |
---|
763 | <target depends="init" if="netbeans.home" name="-debug-start-debugger-main-test"> |
---|
764 | <j2seproject1:nbjpdastart classpath="${debug.test.classpath}" name="${debug.class}"/> |
---|
765 | </target> |
---|
766 | <target depends="init,compile" name="-debug-start-debuggee"> |
---|
767 | <j2seproject3:debug> |
---|
768 | <customize> |
---|
769 | <arg line="${application.args}"/> |
---|
770 | </customize> |
---|
771 | </j2seproject3:debug> |
---|
772 | </target> |
---|
773 | <target depends="init,compile,-debug-start-debugger,-debug-start-debuggee" description="Debug project in IDE." if="netbeans.home" name="debug"/> |
---|
774 | <target depends="init" if="netbeans.home" name="-debug-start-debugger-stepinto"> |
---|
775 | <j2seproject1:nbjpdastart stopclassname="${main.class}"/> |
---|
776 | </target> |
---|
777 | <target depends="init,compile,-debug-start-debugger-stepinto,-debug-start-debuggee" if="netbeans.home" name="debug-stepinto"/> |
---|
778 | <target depends="init,compile-single" if="netbeans.home" name="-debug-start-debuggee-single"> |
---|
779 | <fail unless="debug.class">Must select one file in the IDE or set debug.class</fail> |
---|
780 | <j2seproject3:debug classname="${debug.class}"/> |
---|
781 | </target> |
---|
782 | <target depends="init,compile-single,-debug-start-debugger,-debug-start-debuggee-single" if="netbeans.home" name="debug-single"/> |
---|
783 | <target depends="init,compile-test-single" if="netbeans.home" name="-debug-start-debuggee-main-test"> |
---|
784 | <fail unless="debug.class">Must select one file in the IDE or set debug.class</fail> |
---|
785 | <j2seproject3:debug classname="${debug.class}" classpath="${debug.test.classpath}"/> |
---|
786 | </target> |
---|
787 | <target depends="init,compile-test-single,-debug-start-debugger-main-test,-debug-start-debuggee-main-test" if="netbeans.home" name="debug-test-with-main"/> |
---|
788 | <target depends="init" name="-pre-debug-fix"> |
---|
789 | <fail unless="fix.includes">Must set fix.includes</fail> |
---|
790 | <property name="javac.includes" value="${fix.includes}.java"/> |
---|
791 | </target> |
---|
792 | <target depends="init,-pre-debug-fix,compile-single" if="netbeans.home" name="-do-debug-fix"> |
---|
793 | <j2seproject1:nbjpdareload/> |
---|
794 | </target> |
---|
795 | <target depends="init,-pre-debug-fix,-do-debug-fix" if="netbeans.home" name="debug-fix"/> |
---|
796 | <!-- |
---|
797 | ================= |
---|
798 | PROFILING SECTION |
---|
799 | ================= |
---|
800 | --> |
---|
801 | <target depends="profile-init,compile" description="Profile a project in the IDE." if="netbeans.home" name="profile"> |
---|
802 | <nbprofiledirect> |
---|
803 | <classpath> |
---|
804 | <path path="${run.classpath}"/> |
---|
805 | </classpath> |
---|
806 | </nbprofiledirect> |
---|
807 | <profile/> |
---|
808 | </target> |
---|
809 | <target depends="profile-init,compile-single" description="Profile a selected class in the IDE." if="netbeans.home" name="profile-single"> |
---|
810 | <fail unless="profile.class">Must select one file in the IDE or set profile.class</fail> |
---|
811 | <nbprofiledirect> |
---|
812 | <classpath> |
---|
813 | <path path="${run.classpath}"/> |
---|
814 | </classpath> |
---|
815 | </nbprofiledirect> |
---|
816 | <profile classname="${profile.class}"/> |
---|
817 | </target> |
---|
818 | <!-- |
---|
819 | ========================= |
---|
820 | APPLET PROFILING SECTION |
---|
821 | ========================= |
---|
822 | --> |
---|
823 | <target depends="profile-init,compile-single" if="netbeans.home" name="profile-applet"> |
---|
824 | <nbprofiledirect> |
---|
825 | <classpath> |
---|
826 | <path path="${run.classpath}"/> |
---|
827 | </classpath> |
---|
828 | </nbprofiledirect> |
---|
829 | <profile classname="sun.applet.AppletViewer"> |
---|
830 | <customize> |
---|
831 | <arg value="${applet.url}"/> |
---|
832 | </customize> |
---|
833 | </profile> |
---|
834 | </target> |
---|
835 | <!-- |
---|
836 | ========================= |
---|
837 | TESTS PROFILING SECTION |
---|
838 | ========================= |
---|
839 | --> |
---|
840 | <target depends="profile-init,compile-test-single" if="netbeans.home" name="profile-test-single"> |
---|
841 | <nbprofiledirect> |
---|
842 | <classpath> |
---|
843 | <path path="${run.test.classpath}"/> |
---|
844 | </classpath> |
---|
845 | </nbprofiledirect> |
---|
846 | <junit dir="${profiler.info.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" jvm="${profiler.info.jvm}" showoutput="true"> |
---|
847 | <env key="${profiler.info.pathvar}" path="${profiler.info.agentpath}:${profiler.current.path}"/> |
---|
848 | <jvmarg value="${profiler.info.jvmargs.agent}"/> |
---|
849 | <jvmarg line="${profiler.info.jvmargs}"/> |
---|
850 | <test name="${profile.class}"/> |
---|
851 | <classpath> |
---|
852 | <path path="${run.test.classpath}"/> |
---|
853 | </classpath> |
---|
854 | <syspropertyset> |
---|
855 | <propertyref prefix="test-sys-prop."/> |
---|
856 | <mapper from="test-sys-prop.*" to="*" type="glob"/> |
---|
857 | </syspropertyset> |
---|
858 | <formatter type="brief" usefile="false"/> |
---|
859 | <formatter type="xml"/> |
---|
860 | </junit> |
---|
861 | </target> |
---|
862 | <!-- |
---|
863 | =============== |
---|
864 | JAVADOC SECTION |
---|
865 | =============== |
---|
866 | --> |
---|
867 | <target depends="init" if="have.sources" name="-javadoc-build"> |
---|
868 | <mkdir dir="${dist.javadoc.dir}"/> |
---|
869 | <condition else="" property="javadoc.endorsed.classpath.cmd.line.arg" value="-J${endorsed.classpath.cmd.line.arg}"> |
---|
870 | <and> |
---|
871 | <isset property="endorsed.classpath.cmd.line.arg"/> |
---|
872 | <not> |
---|
873 | <equals arg1="${endorsed.classpath.cmd.line.arg}" arg2=""/> |
---|
874 | </not> |
---|
875 | </and> |
---|
876 | </condition> |
---|
877 | <javadoc additionalparam="${javadoc.additionalparam}" author="${javadoc.author}" charset="UTF-8" destdir="${dist.javadoc.dir}" docencoding="UTF-8" encoding="${javadoc.encoding.used}" failonerror="true" noindex="${javadoc.noindex}" nonavbar="${javadoc.nonavbar}" notree="${javadoc.notree}" private="${javadoc.private}" source="${javac.source}" splitindex="${javadoc.splitindex}" use="${javadoc.use}" useexternalfile="true" version="${javadoc.version}" windowtitle="${javadoc.windowtitle}"> |
---|
878 | <classpath> |
---|
879 | <path path="${javac.classpath}"/> |
---|
880 | </classpath> |
---|
881 | <fileset dir="${src.dir}" excludes="*.java,${excludes}" includes="${includes}"> |
---|
882 | <filename name="**/*.java"/> |
---|
883 | </fileset> |
---|
884 | <fileset dir="${build.generated.sources.dir}" erroronmissingdir="false"> |
---|
885 | <include name="**/*.java"/> |
---|
886 | <exclude name="*.java"/> |
---|
887 | </fileset> |
---|
888 | <arg line="${javadoc.endorsed.classpath.cmd.line.arg}"/> |
---|
889 | </javadoc> |
---|
890 | <copy todir="${dist.javadoc.dir}"> |
---|
891 | <fileset dir="${src.dir}" excludes="${excludes}" includes="${includes}"> |
---|
892 | <filename name="**/doc-files/**"/> |
---|
893 | </fileset> |
---|
894 | <fileset dir="${build.generated.sources.dir}" erroronmissingdir="false"> |
---|
895 | <include name="**/doc-files/**"/> |
---|
896 | </fileset> |
---|
897 | </copy> |
---|
898 | </target> |
---|
899 | <target depends="init,-javadoc-build" if="netbeans.home" name="-javadoc-browse" unless="no.javadoc.preview"> |
---|
900 | <nbbrowse file="${dist.javadoc.dir}/index.html"/> |
---|
901 | </target> |
---|
902 | <target depends="init,-javadoc-build,-javadoc-browse" description="Build Javadoc." name="javadoc"/> |
---|
903 | <!-- |
---|
904 | ========================= |
---|
905 | JUNIT COMPILATION SECTION |
---|
906 | ========================= |
---|
907 | --> |
---|
908 | <target depends="init,compile" if="have.tests" name="-pre-pre-compile-test"> |
---|
909 | <mkdir dir="${build.test.classes.dir}"/> |
---|
910 | </target> |
---|
911 | <target name="-pre-compile-test"> |
---|
912 | <!-- Empty placeholder for easier customization. --> |
---|
913 | <!-- You can override this target in the ../build.xml file. --> |
---|
914 | </target> |
---|
915 | <target if="do.depend.true" name="-compile-test-depend"> |
---|
916 | <j2seproject3:depend classpath="${javac.test.classpath}" destdir="${build.test.classes.dir}" srcdir="${test.src.dir}"/> |
---|
917 | </target> |
---|
918 | <target depends="init,deps-jar,compile,-pre-pre-compile-test,-pre-compile-test,-compile-test-depend" if="have.tests" name="-do-compile-test"> |
---|
919 | <j2seproject3:javac apgeneratedsrcdir="${build.test.classes.dir}" classpath="${javac.test.classpath}" debug="true" destdir="${build.test.classes.dir}" processorpath="${javac.test.processorpath}" srcdir="${test.src.dir}"/> |
---|
920 | <copy todir="${build.test.classes.dir}"> |
---|
921 | <fileset dir="${test.src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/> |
---|
922 | </copy> |
---|
923 | </target> |
---|
924 | <target name="-post-compile-test"> |
---|
925 | <!-- Empty placeholder for easier customization. --> |
---|
926 | <!-- You can override this target in the ../build.xml file. --> |
---|
927 | </target> |
---|
928 | <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test,-do-compile-test,-post-compile-test" name="compile-test"/> |
---|
929 | <target name="-pre-compile-test-single"> |
---|
930 | <!-- Empty placeholder for easier customization. --> |
---|
931 | <!-- You can override this target in the ../build.xml file. --> |
---|
932 | </target> |
---|
933 | <target depends="init,deps-jar,compile,-pre-pre-compile-test,-pre-compile-test-single" if="have.tests" name="-do-compile-test-single"> |
---|
934 | <fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail> |
---|
935 | <j2seproject3:force-recompile destdir="${build.test.classes.dir}"/> |
---|
936 | <j2seproject3:javac apgeneratedsrcdir="${build.test.classes.dir}" classpath="${javac.test.classpath}" debug="true" destdir="${build.test.classes.dir}" excludes="" includes="${javac.includes}" processorpath="${javac.test.processorpath}" sourcepath="${test.src.dir}" srcdir="${test.src.dir}"/> |
---|
937 | <copy todir="${build.test.classes.dir}"> |
---|
938 | <fileset dir="${test.src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/> |
---|
939 | </copy> |
---|
940 | </target> |
---|
941 | <target name="-post-compile-test-single"> |
---|
942 | <!-- Empty placeholder for easier customization. --> |
---|
943 | <!-- You can override this target in the ../build.xml file. --> |
---|
944 | </target> |
---|
945 | <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test-single,-do-compile-test-single,-post-compile-test-single" name="compile-test-single"/> |
---|
946 | <!-- |
---|
947 | ======================= |
---|
948 | JUNIT EXECUTION SECTION |
---|
949 | ======================= |
---|
950 | --> |
---|
951 | <target depends="init" if="have.tests" name="-pre-test-run"> |
---|
952 | <mkdir dir="${build.test.results.dir}"/> |
---|
953 | </target> |
---|
954 | <target depends="init,compile-test,-pre-test-run" if="have.tests" name="-do-test-run"> |
---|
955 | <j2seproject3:junit testincludes="**/*Test.java"/> |
---|
956 | </target> |
---|
957 | <target depends="init,compile-test,-pre-test-run,-do-test-run" if="have.tests" name="-post-test-run"> |
---|
958 | <fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail> |
---|
959 | </target> |
---|
960 | <target depends="init" if="have.tests" name="test-report"/> |
---|
961 | <target depends="init" if="netbeans.home+have.tests" name="-test-browse"/> |
---|
962 | <target depends="init,compile-test,-pre-test-run,-do-test-run,test-report,-post-test-run,-test-browse" description="Run unit tests." name="test"/> |
---|
963 | <target depends="init" if="have.tests" name="-pre-test-run-single"> |
---|
964 | <mkdir dir="${build.test.results.dir}"/> |
---|
965 | </target> |
---|
966 | <target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-do-test-run-single"> |
---|
967 | <fail unless="test.includes">Must select some files in the IDE or set test.includes</fail> |
---|
968 | <j2seproject3:junit excludes="" includes="${test.includes}"/> |
---|
969 | </target> |
---|
970 | <target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single" if="have.tests" name="-post-test-run-single"> |
---|
971 | <fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail> |
---|
972 | </target> |
---|
973 | <target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single,-post-test-run-single" description="Run single unit test." name="test-single"/> |
---|
974 | <!-- |
---|
975 | ======================= |
---|
976 | JUNIT DEBUGGING SECTION |
---|
977 | ======================= |
---|
978 | --> |
---|
979 | <target depends="init,compile-test" if="have.tests" name="-debug-start-debuggee-test"> |
---|
980 | <fail unless="test.class">Must select one file in the IDE or set test.class</fail> |
---|
981 | <property location="${build.test.results.dir}/TEST-${test.class}.xml" name="test.report.file"/> |
---|
982 | <delete file="${test.report.file}"/> |
---|
983 | <mkdir dir="${build.test.results.dir}"/> |
---|
984 | <j2seproject3:debug classname="org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner" classpath="${ant.home}/lib/ant.jar:${ant.home}/lib/ant-junit.jar:${debug.test.classpath}"> |
---|
985 | <customize> |
---|
986 | <syspropertyset> |
---|
987 | <propertyref prefix="test-sys-prop."/> |
---|
988 | <mapper from="test-sys-prop.*" to="*" type="glob"/> |
---|
989 | </syspropertyset> |
---|
990 | <arg value="${test.class}"/> |
---|
991 | <arg value="showoutput=true"/> |
---|
992 | <arg value="formatter=org.apache.tools.ant.taskdefs.optional.junit.BriefJUnitResultFormatter"/> |
---|
993 | <arg value="formatter=org.apache.tools.ant.taskdefs.optional.junit.XMLJUnitResultFormatter,${test.report.file}"/> |
---|
994 | </customize> |
---|
995 | </j2seproject3:debug> |
---|
996 | </target> |
---|
997 | <target depends="init,compile-test" if="netbeans.home+have.tests" name="-debug-start-debugger-test"> |
---|
998 | <j2seproject1:nbjpdastart classpath="${debug.test.classpath}" name="${test.class}"/> |
---|
999 | </target> |
---|
1000 | <target depends="init,compile-test-single,-debug-start-debugger-test,-debug-start-debuggee-test" name="debug-test"/> |
---|
1001 | <target depends="init,-pre-debug-fix,compile-test-single" if="netbeans.home" name="-do-debug-fix-test"> |
---|
1002 | <j2seproject1:nbjpdareload dir="${build.test.classes.dir}"/> |
---|
1003 | </target> |
---|
1004 | <target depends="init,-pre-debug-fix,-do-debug-fix-test" if="netbeans.home" name="debug-fix-test"/> |
---|
1005 | <!-- |
---|
1006 | ========================= |
---|
1007 | APPLET EXECUTION SECTION |
---|
1008 | ========================= |
---|
1009 | --> |
---|
1010 | <target depends="init,compile-single" name="run-applet"> |
---|
1011 | <fail unless="applet.url">Must select one file in the IDE or set applet.url</fail> |
---|
1012 | <j2seproject1:java classname="sun.applet.AppletViewer"> |
---|
1013 | <customize> |
---|
1014 | <arg value="${applet.url}"/> |
---|
1015 | </customize> |
---|
1016 | </j2seproject1:java> |
---|
1017 | </target> |
---|
1018 | <!-- |
---|
1019 | ========================= |
---|
1020 | APPLET DEBUGGING SECTION |
---|
1021 | ========================= |
---|
1022 | --> |
---|
1023 | <target depends="init,compile-single" if="netbeans.home" name="-debug-start-debuggee-applet"> |
---|
1024 | <fail unless="applet.url">Must select one file in the IDE or set applet.url</fail> |
---|
1025 | <j2seproject3:debug classname="sun.applet.AppletViewer"> |
---|
1026 | <customize> |
---|
1027 | <arg value="${applet.url}"/> |
---|
1028 | </customize> |
---|
1029 | </j2seproject3:debug> |
---|
1030 | </target> |
---|
1031 | <target depends="init,compile-single,-debug-start-debugger,-debug-start-debuggee-applet" if="netbeans.home" name="debug-applet"/> |
---|
1032 | <!-- |
---|
1033 | =============== |
---|
1034 | CLEANUP SECTION |
---|
1035 | =============== |
---|
1036 | --> |
---|
1037 | <target name="-deps-clean-init" unless="built-clean.properties"> |
---|
1038 | <property location="${build.dir}/built-clean.properties" name="built-clean.properties"/> |
---|
1039 | <delete file="${built-clean.properties}" quiet="true"/> |
---|
1040 | </target> |
---|
1041 | <target if="already.built.clean.${basedir}" name="-warn-already-built-clean"> |
---|
1042 | <echo level="warn" message="Cycle detected: fmgVen was already built"/> |
---|
1043 | </target> |
---|
1044 | <target depends="init,-deps-clean-init" name="deps-clean" unless="no.deps"> |
---|
1045 | <mkdir dir="${build.dir}"/> |
---|
1046 | <touch file="${built-clean.properties}" verbose="false"/> |
---|
1047 | <property file="${built-clean.properties}" prefix="already.built.clean."/> |
---|
1048 | <antcall target="-warn-already-built-clean"/> |
---|
1049 | <propertyfile file="${built-clean.properties}"> |
---|
1050 | <entry key="${basedir}" value=""/> |
---|
1051 | </propertyfile> |
---|
1052 | </target> |
---|
1053 | <target depends="init" name="-do-clean"> |
---|
1054 | <delete dir="${build.dir}"/> |
---|
1055 | <delete dir="${dist.dir}" followsymlinks="false" includeemptydirs="true"/> |
---|
1056 | </target> |
---|
1057 | <target name="-post-clean"> |
---|
1058 | <!-- Empty placeholder for easier customization. --> |
---|
1059 | <!-- You can override this target in the ../build.xml file. --> |
---|
1060 | </target> |
---|
1061 | <target depends="init,deps-clean,-do-clean,-post-clean" description="Clean build products." name="clean"/> |
---|
1062 | <target name="-check-call-dep"> |
---|
1063 | <property file="${call.built.properties}" prefix="already.built."/> |
---|
1064 | <condition property="should.call.dep"> |
---|
1065 | <not> |
---|
1066 | <isset property="already.built.${call.subproject}"/> |
---|
1067 | </not> |
---|
1068 | </condition> |
---|
1069 | </target> |
---|
1070 | <target depends="-check-call-dep" if="should.call.dep" name="-maybe-call-dep"> |
---|
1071 | <ant antfile="${call.script}" inheritall="false" target="${call.target}"> |
---|
1072 | <propertyset> |
---|
1073 | <propertyref prefix="transfer."/> |
---|
1074 | <mapper from="transfer.*" to="*" type="glob"/> |
---|
1075 | </propertyset> |
---|
1076 | </ant> |
---|
1077 | </target> |
---|
1078 | </project> |
---|