Adicionado Adicionado Classe TipoLog
[simdecs.git] / build-impl.xml
... / ...
CommitLineData
1<?xml version="1.0" encoding="UTF-8"?>\r
2<!--\r
3 *** GENERATED FROM project.xml - DO NOT EDIT ***\r
4 *** EDIT ../build.xml INSTEAD ***\r
5\r
6 For the purpose of easier reading the script\r
7 is divided into following sections:\r
8 - initialization\r
9 - compilation\r
10 - dist\r
11 - execution\r
12 - debugging\r
13 - javadoc\r
14 - junit compilation\r
15 - junit execution\r
16 - junit debugging\r
17 - cleanup\r
18\r
19 -->\r
20<project xmlns:webproject1="http://www.netbeans.org/ns/web-project/1" xmlns:webproject2="http://www.netbeans.org/ns/web-project/2" xmlns:webproject3="http://www.netbeans.org/ns/web-project/3" basedir=".." default="default" name="simdecs-impl">\r
21 <import file="ant-deploy.xml"/>\r
22 <fail message="Please build using Ant 1.7.1 or higher.">\r
23 <condition>\r
24 <not>\r
25 <antversion atleast="1.7.1"/>\r
26 </not>\r
27 </condition>\r
28 </fail>\r
29 <target depends="dist,javadoc" description="Build whole project." name="default"/>\r
30 <!--\r
31 INITIALIZATION SECTION\r
32 -->\r
33 <target name="-pre-init">\r
34 <!-- Empty placeholder for easier customization. -->\r
35 <!-- You can override this target in the ../build.xml file. -->\r
36 </target>\r
37 <target depends="-pre-init" name="-init-private">\r
38 <property file="nbproject/private/private.properties"/>\r
39 </target>\r
40 <target depends="-pre-init,-init-private" name="-init-user">\r
41 <property file="${user.properties.file}"/>\r
42 <!-- The two properties below are usually overridden -->\r
43 <!-- by the active platform. Just a fallback. -->\r
44 <property name="default.javac.source" value="1.4"/>\r
45 <property name="default.javac.target" value="1.4"/>\r
46 </target>\r
47 <target depends="-pre-init,-init-private,-init-user" name="-init-project">\r
48 <property file="nbproject/project.properties"/>\r
49 </target>\r
50 <target depends="-pre-init,-init-private,-init-user,-init-project,-init-macrodef-property" if="dist.ear.dir" name="-do-ear-init"/>\r
51 <target depends="-pre-init,-init-private,-init-user,-init-project,-init-macrodef-property" name="-do-init">\r
52 <condition property="have.tests">\r
53 <or>\r
54 <available file="${test.src.dir}"/>\r
55 </or>\r
56 </condition>\r
57 <condition property="have.sources">\r
58 <or>\r
59 <available file="${src.dir}"/>\r
60 </or>\r
61 </condition>\r
62 <condition property="netbeans.home+have.tests">\r
63 <and>\r
64 <isset property="netbeans.home"/>\r
65 <isset property="have.tests"/>\r
66 </and>\r
67 </condition>\r
68 <condition property="no.javadoc.preview">\r
69 <isfalse value="${javadoc.preview}"/>\r
70 </condition>\r
71 <property name="javac.compilerargs" value=""/>\r
72 <condition property="no.deps">\r
73 <and>\r
74 <istrue value="${no.dependencies}"/>\r
75 </and>\r
76 </condition>\r
77 <condition property="no.dist.ear.dir">\r
78 <not>\r
79 <isset property="dist.ear.dir"/>\r
80 </not>\r
81 </condition>\r
82 <property name="build.web.excludes" value="${build.classes.excludes}"/>\r
83 <condition property="do.compile.jsps">\r
84 <istrue value="${compile.jsps}"/>\r
85 </condition>\r
86 <condition property="do.debug.server">\r
87 <or>\r
88 <not>\r
89 <isset property="debug.server"/>\r
90 </not>\r
91 <istrue value="${debug.server}"/>\r
92 <and>\r
93 <not>\r
94 <istrue value="${debug.server}"/>\r
95 </not>\r
96 <not>\r
97 <istrue value="${debug.client}"/>\r
98 </not>\r
99 </and>\r
100 </or>\r
101 </condition>\r
102 <condition property="do.debug.client">\r
103 <istrue value="${debug.client}"/>\r
104 </condition>\r
105 <condition property="do.display.browser">\r
106 <istrue value="${display.browser}"/>\r
107 </condition>\r
108 <condition property="do.display.browser.debug">\r
109 <and>\r
110 <isset property="do.display.browser"/>\r
111 <not>\r
112 <isset property="do.debug.client"/>\r
113 </not>\r
114 </and>\r
115 </condition>\r
116 <available file="${conf.dir}/MANIFEST.MF" property="has.custom.manifest"/>\r
117 <available file="${persistence.xml.dir}/persistence.xml" property="has.persistence.xml"/>\r
118 <condition property="do.war.package.with.custom.manifest">\r
119 <isset property="has.custom.manifest"/>\r
120 </condition>\r
121 <condition property="do.war.package.without.custom.manifest">\r
122 <not>\r
123 <isset property="has.custom.manifest"/>\r
124 </not>\r
125 </condition>\r
126 <condition property="do.tmp.war.package.with.custom.manifest">\r
127 <and>\r
128 <isset property="has.custom.manifest"/>\r
129 <or>\r
130 <isfalse value="${directory.deployment.supported}"/>\r
131 <isset property="dist.ear.dir"/>\r
132 </or>\r
133 </and>\r
134 </condition>\r
135 <condition property="do.tmp.war.package.without.custom.manifest">\r
136 <and>\r
137 <not>\r
138 <isset property="has.custom.manifest"/>\r
139 </not>\r
140 <or>\r
141 <isfalse value="${directory.deployment.supported}"/>\r
142 <isset property="dist.ear.dir"/>\r
143 </or>\r
144 </and>\r
145 </condition>\r
146 <condition property="do.tmp.war.package">\r
147 <or>\r
148 <isfalse value="${directory.deployment.supported}"/>\r
149 <isset property="dist.ear.dir"/>\r
150 </or>\r
151 </condition>\r
152 <property name="build.meta.inf.dir" value="${build.web.dir}/META-INF"/>\r
153 <condition else="" property="application.args.param" value="${application.args}">\r
154 <and>\r
155 <isset property="application.args"/>\r
156 <not>\r
157 <equals arg1="${application.args}" arg2="" trim="true"/>\r
158 </not>\r
159 </and>\r
160 </condition>\r
161 <property name="source.encoding" value="${file.encoding}"/>\r
162 <condition property="javadoc.encoding.used" value="${javadoc.encoding}">\r
163 <and>\r
164 <isset property="javadoc.encoding"/>\r
165 <not>\r
166 <equals arg1="${javadoc.encoding}" arg2=""/>\r
167 </not>\r
168 </and>\r
169 </condition>\r
170 <property name="javadoc.encoding.used" value="${source.encoding}"/>\r
171 <property name="includes" value="**"/>\r
172 <property name="excludes" value=""/>\r
173 <property name="runmain.jvmargs" value=""/>\r
174 <path id="endorsed.classpath.path" path="${endorsed.classpath}"/>\r
175 <condition else="" property="endorsed.classpath.cmd.line.arg" value="-Xbootclasspath/p:'${toString:endorsed.classpath.path}'">\r
176 <and>\r
177 <isset property="endorsed.classpath"/>\r
178 <length length="0" string="${endorsed.classpath}" when="greater"/>\r
179 </and>\r
180 </condition>\r
181 <condition else="false" property="jdkBug6558476">\r
182 <and>\r
183 <matches pattern="1\.[56]" string="${java.specification.version}"/>\r
184 <not>\r
185 <os family="unix"/>\r
186 </not>\r
187 </and>\r
188 </condition>\r
189 <property name="javac.fork" value="${jdkBug6558476}"/>\r
190 </target>\r
191 <target depends="init" name="-init-cos" unless="deploy.on.save">\r
192 <condition property="deploy.on.save" value="true">\r
193 <or>\r
194 <istrue value="${j2ee.deploy.on.save}"/>\r
195 <istrue value="${j2ee.compile.on.save}"/>\r
196 </or>\r
197 </condition>\r
198 </target>\r
199 <target name="-post-init">\r
200 <!-- Empty placeholder for easier customization. -->\r
201 <!-- You can override this target in the ../build.xml file. -->\r
202 </target>\r
203 <target depends="-pre-init,-init-private,-init-user,-init-project,-do-init" name="-init-check">\r
204 <fail unless="src.dir">Must set src.dir</fail>\r
205 <fail unless="test.src.dir">Must set test.src.dir</fail>\r
206 <fail unless="build.dir">Must set build.dir</fail>\r
207 <fail unless="build.web.dir">Must set build.web.dir</fail>\r
208 <fail unless="build.generated.dir">Must set build.generated.dir</fail>\r
209 <fail unless="dist.dir">Must set dist.dir</fail>\r
210 <fail unless="build.classes.dir">Must set build.classes.dir</fail>\r
211 <fail unless="dist.javadoc.dir">Must set dist.javadoc.dir</fail>\r
212 <fail unless="build.test.classes.dir">Must set build.test.classes.dir</fail>\r
213 <fail unless="build.test.results.dir">Must set build.test.results.dir</fail>\r
214 <fail unless="build.classes.excludes">Must set build.classes.excludes</fail>\r
215 <fail unless="dist.war">Must set dist.war</fail>\r
216 <condition property="missing.j2ee.server.home">\r
217 <and>\r
218 <matches pattern="j2ee.server.home" string="${j2ee.platform.classpath}"/>\r
219 <not>\r
220 <isset property="j2ee.server.home"/>\r
221 </not>\r
222 </and>\r
223 </condition>\r
224 <fail if="missing.j2ee.server.home">\r
225The Java EE server classpath is not correctly set up - server home directory is missing.\r
226Either open the project in the IDE and assign the server or setup the server classpath manually.\r
227For example like this:\r
228 ant -Dj2ee.server.home=&lt;app_server_installation_directory&gt;\r
229 </fail>\r
230 <fail unless="j2ee.platform.classpath">\r
231The Java EE server classpath is not correctly set up. Your active server type is ${j2ee.server.type}.\r
232Either open the project in the IDE and assign the server or setup the server classpath manually.\r
233For example like this:\r
234 ant -Duser.properties.file=&lt;path_to_property_file&gt; (where you put the property "j2ee.platform.classpath" in a .properties file)\r
235or ant -Dj2ee.platform.classpath=&lt;server_classpath&gt; (where no properties file is used)\r
236 </fail>\r
237 </target>\r
238 <target name="-init-macrodef-property">\r
239 <macrodef name="property" uri="http://www.netbeans.org/ns/web-project/1">\r
240 <attribute name="name"/>\r
241 <attribute name="value"/>\r
242 <sequential>\r
243 <property name="@{name}" value="${@{value}}"/>\r
244 </sequential>\r
245 </macrodef>\r
246 </target>\r
247 <target depends="-init-ap-cmdline-properties" if="ap.supported.internal" name="-init-macrodef-javac-with-processors">\r
248 <macrodef name="javac" uri="http://www.netbeans.org/ns/web-project/2">\r
249 <attribute default="${src.dir}" name="srcdir"/>\r
250 <attribute default="${build.classes.dir}" name="destdir"/>\r
251 <attribute default="${javac.classpath}:${j2ee.platform.classpath}" name="classpath"/>\r
252 <attribute default="${javac.processorpath}" name="processorpath"/>\r
253 <attribute default="${build.generated.sources.dir}/ap-source-output" name="apgeneratedsrcdir"/>\r
254 <attribute default="${includes}" name="includes"/>\r
255 <attribute default="${excludes}" name="excludes"/>\r
256 <attribute default="${javac.debug}" name="debug"/>\r
257 <attribute default="${empty.dir}" name="gensrcdir"/>\r
258 <element name="customize" optional="true"/>\r
259 <sequential>\r
260 <property location="${build.dir}/empty" name="empty.dir"/>\r
261 <mkdir dir="${empty.dir}"/>\r
262 <mkdir dir="@{apgeneratedsrcdir}"/>\r
263 <javac debug="@{debug}" deprecation="${javac.deprecation}" destdir="@{destdir}" encoding="${source.encoding}" excludes="@{excludes}" fork="${javac.fork}" includeantruntime="false" includes="@{includes}" source="${javac.source}" srcdir="@{srcdir}" target="${javac.target}">\r
264 <src>\r
265 <dirset dir="@{gensrcdir}" erroronmissingdir="false">\r
266 <include name="*"/>\r
267 </dirset>\r
268 </src>\r
269 <classpath>\r
270 <path path="@{classpath}"/>\r
271 </classpath>\r
272 <compilerarg line="${endorsed.classpath.cmd.line.arg}"/>\r
273 <compilerarg line="${javac.compilerargs}"/>\r
274 <compilerarg value="-processorpath"/>\r
275 <compilerarg path="@{processorpath}:${empty.dir}"/>\r
276 <compilerarg line="${ap.processors.internal}"/>\r
277 <compilerarg value="-s"/>\r
278 <compilerarg path="@{apgeneratedsrcdir}"/>\r
279 <compilerarg line="${ap.proc.none.internal}"/>\r
280 <customize/>\r
281 </javac>\r
282 </sequential>\r
283 </macrodef>\r
284 </target>\r
285 <target depends="-init-ap-cmdline-properties" name="-init-macrodef-javac-without-processors" unless="ap.supported.internal">\r
286 <macrodef name="javac" uri="http://www.netbeans.org/ns/web-project/2">\r
287 <attribute default="${src.dir}" name="srcdir"/>\r
288 <attribute default="${build.classes.dir}" name="destdir"/>\r
289 <attribute default="${javac.classpath}:${j2ee.platform.classpath}" name="classpath"/>\r
290 <attribute default="${javac.processorpath}" name="processorpath"/>\r
291 <attribute default="${build.generated.sources.dir}/ap-source-output" name="apgeneratedsrcdir"/>\r
292 <attribute default="${includes}" name="includes"/>\r
293 <attribute default="${excludes}" name="excludes"/>\r
294 <attribute default="${javac.debug}" name="debug"/>\r
295 <attribute default="${empty.dir}" name="gensrcdir"/>\r
296 <element name="customize" optional="true"/>\r
297 <sequential>\r
298 <property location="${build.dir}/empty" name="empty.dir"/>\r
299 <mkdir dir="${empty.dir}"/>\r
300 <javac debug="@{debug}" deprecation="${javac.deprecation}" destdir="@{destdir}" encoding="${source.encoding}" excludes="@{excludes}" includeantruntime="false" includes="@{includes}" source="${javac.source}" srcdir="@{srcdir}" target="${javac.target}">\r
301 <src>\r
302 <dirset dir="@{gensrcdir}" erroronmissingdir="false">\r
303 <include name="*"/>\r
304 </dirset>\r
305 </src>\r
306 <classpath>\r
307 <path path="@{classpath}"/>\r
308 </classpath>\r
309 <compilerarg line="${endorsed.classpath.cmd.line.arg}"/>\r
310 <compilerarg line="${javac.compilerargs}"/>\r
311 <customize/>\r
312 </javac>\r
313 </sequential>\r
314 </macrodef>\r
315 </target>\r
316 <target depends="-init-macrodef-javac-with-processors,-init-macrodef-javac-without-processors" name="-init-macrodef-javac">\r
317 <macrodef name="depend" uri="http://www.netbeans.org/ns/web-project/2">\r
318 <attribute default="${src.dir}" name="srcdir"/>\r
319 <attribute default="${build.classes.dir}" name="destdir"/>\r
320 <attribute default="${javac.classpath}:${j2ee.platform.classpath}" name="classpath"/>\r
321 <sequential>\r
322 <depend cache="${build.dir}/depcache" destdir="@{destdir}" excludes="${excludes}" includes="${includes}" srcdir="@{srcdir}">\r
323 <classpath>\r
324 <path path="@{classpath}"/>\r
325 </classpath>\r
326 </depend>\r
327 </sequential>\r
328 </macrodef>\r
329 <macrodef name="force-recompile" uri="http://www.netbeans.org/ns/web-project/2">\r
330 <attribute default="${build.classes.dir}" name="destdir"/>\r
331 <sequential>\r
332 <fail unless="javac.includes">Must set javac.includes</fail>\r
333 <pathconvert pathsep="${line.separator}" property="javac.includes.binary">\r
334 <path>\r
335 <filelist dir="@{destdir}" files="${javac.includes}"/>\r
336 </path>\r
337 <globmapper from="*.java" to="*.class"/>\r
338 </pathconvert>\r
339 <tempfile deleteonexit="true" property="javac.includesfile.binary"/>\r
340 <echo file="${javac.includesfile.binary}" message="${javac.includes.binary}"/>\r
341 <delete>\r
342 <files includesfile="${javac.includesfile.binary}"/>\r
343 </delete>\r
344 <delete file="${javac.includesfile.binary}"/>\r
345 </sequential>\r
346 </macrodef>\r
347 </target>\r
348 <target name="-init-macrodef-junit">\r
349 <macrodef name="junit" uri="http://www.netbeans.org/ns/web-project/2">\r
350 <attribute default="${includes}" name="includes"/>\r
351 <attribute default="${excludes}" name="excludes"/>\r
352 <attribute default="**" name="testincludes"/>\r
353 <sequential>\r
354 <junit dir="${basedir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" showoutput="true" tempdir="${java.io.tmpdir}">\r
355 <batchtest todir="${build.test.results.dir}">\r
356 <fileset dir="${test.src.dir}" excludes="@{excludes},${excludes}" includes="@{includes}">\r
357 <filename name="@{testincludes}"/>\r
358 </fileset>\r
359 </batchtest>\r
360 <classpath>\r
361 <path path="${run.test.classpath}:${j2ee.platform.classpath}:${j2ee.platform.embeddableejb.classpath}"/>\r
362 </classpath>\r
363 <syspropertyset>\r
364 <propertyref prefix="test-sys-prop."/>\r
365 <mapper from="test-sys-prop.*" to="*" type="glob"/>\r
366 </syspropertyset>\r
367 <formatter type="brief" usefile="false"/>\r
368 <formatter type="xml"/>\r
369 <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>\r
370 <jvmarg value="-ea"/>\r
371 <jvmarg line="${runmain.jvmargs}"/>\r
372 </junit>\r
373 </sequential>\r
374 </macrodef>\r
375 </target>\r
376 <target name="-init-macrodef-java">\r
377 <macrodef name="java" uri="http://www.netbeans.org/ns/web-project/1">\r
378 <attribute default="${main.class}" name="classname"/>\r
379 <attribute default="${debug.classpath}" name="classpath"/>\r
380 <element name="customize" optional="true"/>\r
381 <sequential>\r
382 <java classname="@{classname}" fork="true">\r
383 <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>\r
384 <jvmarg line="${runmain.jvmargs}"/>\r
385 <classpath>\r
386 <path path="@{classpath}:${j2ee.platform.classpath}"/>\r
387 </classpath>\r
388 <syspropertyset>\r
389 <propertyref prefix="run-sys-prop."/>\r
390 <mapper from="run-sys-prop.*" to="*" type="glob"/>\r
391 </syspropertyset>\r
392 <customize/>\r
393 </java>\r
394 </sequential>\r
395 </macrodef>\r
396 </target>\r
397 <target name="-init-macrodef-nbjsdebug">\r
398 <macrodef name="nbjsdebugstart" uri="http://www.netbeans.org/ns/web-project/1">\r
399 <attribute default="${client.url}" name="webUrl"/>\r
400 <sequential>\r
401 <nbjsdebugstart urlPart="${client.urlPart}" webUrl="@{webUrl}"/>\r
402 </sequential>\r
403 </macrodef>\r
404 </target>\r
405 <target depends="-init-debug-args" name="-init-macrodef-nbjpda">\r
406 <macrodef name="nbjpdastart" uri="http://www.netbeans.org/ns/web-project/1">\r
407 <attribute default="${main.class}" name="name"/>\r
408 <attribute default="${debug.classpath}:${j2ee.platform.classpath}" name="classpath"/>\r
409 <sequential>\r
410 <nbjpdastart addressproperty="jpda.address" name="@{name}" transport="${debug-transport}">\r
411 <classpath>\r
412 <path path="@{classpath}"/>\r
413 </classpath>\r
414 </nbjpdastart>\r
415 </sequential>\r
416 </macrodef>\r
417 <macrodef name="nbjpdareload" uri="http://www.netbeans.org/ns/web-project/1">\r
418 <attribute default="${build.classes.dir}" name="dir"/>\r
419 <sequential>\r
420 <nbjpdareload>\r
421 <fileset dir="@{dir}" includes="${fix.classes}">\r
422 <include name="${fix.includes}*.class"/>\r
423 </fileset>\r
424 </nbjpdareload>\r
425 </sequential>\r
426 </macrodef>\r
427 <macrodef name="nbjpdaappreloaded" uri="http://www.netbeans.org/ns/web-project/1">\r
428 <sequential>\r
429 <nbjpdaappreloaded/>\r
430 </sequential>\r
431 </macrodef>\r
432 </target>\r
433 <target name="-init-debug-args">\r
434 <property name="version-output" value="java version &quot;${ant.java.version}"/>\r
435 <condition property="have-jdk-older-than-1.4">\r
436 <or>\r
437 <contains string="${version-output}" substring="java version &quot;1.0"/>\r
438 <contains string="${version-output}" substring="java version &quot;1.1"/>\r
439 <contains string="${version-output}" substring="java version &quot;1.2"/>\r
440 <contains string="${version-output}" substring="java version &quot;1.3"/>\r
441 </or>\r
442 </condition>\r
443 <condition else="-Xdebug" property="debug-args-line" value="-Xdebug -Xnoagent -Djava.compiler=none">\r
444 <istrue value="${have-jdk-older-than-1.4}"/>\r
445 </condition>\r
446 <condition else="dt_socket" property="debug-transport-by-os" value="dt_shmem">\r
447 <os family="windows"/>\r
448 </condition>\r
449 <condition else="${debug-transport-by-os}" property="debug-transport" value="${debug.transport}">\r
450 <isset property="debug.transport"/>\r
451 </condition>\r
452 </target>\r
453 <target depends="-init-debug-args" name="-init-macrodef-debug">\r
454 <macrodef name="debug" uri="http://www.netbeans.org/ns/web-project/1">\r
455 <attribute default="${main.class}" name="classname"/>\r
456 <attribute default="${debug.classpath}:${j2ee.platform.classpath}" name="classpath"/>\r
457 <attribute default="${application.args.param}" name="args"/>\r
458 <element name="customize" optional="true"/>\r
459 <sequential>\r
460 <java classname="@{classname}" fork="true">\r
461 <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>\r
462 <jvmarg line="${debug-args-line}"/>\r
463 <jvmarg value="-Xrunjdwp:transport=${debug-transport},address=${jpda.address}"/>\r
464 <jvmarg line="${runmain.jvmargs}"/>\r
465 <classpath>\r
466 <path path="@{classpath}"/>\r
467 </classpath>\r
468 <syspropertyset>\r
469 <propertyref prefix="run-sys-prop."/>\r
470 <mapper from="run-sys-prop.*" to="*" type="glob"/>\r
471 </syspropertyset>\r
472 <arg line="@{args}"/>\r
473 <customize/>\r
474 </java>\r
475 </sequential>\r
476 </macrodef>\r
477 </target>\r
478 <target name="-init-taskdefs">\r
479 <fail unless="libs.CopyLibs.classpath">\r
480The libs.CopyLibs.classpath property is not set up.\r
481This property must point to \r
482org-netbeans-modules-java-j2seproject-copylibstask.jar file which is part\r
483of NetBeans IDE installation and is usually located at \r
484&lt;netbeans_installation&gt;/java&lt;version&gt;/ant/extra folder.\r
485Either open the project in the IDE and make sure CopyLibs library\r
486exists or setup the property manually. For example like this:\r
487 ant -Dlibs.CopyLibs.classpath=a/path/to/org-netbeans-modules-java-j2seproject-copylibstask.jar\r
488 </fail>\r
489 <taskdef classpath="${libs.CopyLibs.classpath}" resource="org/netbeans/modules/java/j2seproject/copylibstask/antlib.xml"/>\r
490 </target>\r
491 <target name="-init-ap-cmdline-properties">\r
492 <property name="annotation.processing.enabled" value="true"/>\r
493 <property name="annotation.processing.processors.list" value=""/>\r
494 <property name="annotation.processing.run.all.processors" value="true"/>\r
495 <property name="javac.processorpath" value="${javac.classpath}"/>\r
496 <property name="javac.test.processorpath" value="${javac.test.classpath}"/>\r
497 <condition property="ap.supported.internal" value="true">\r
498 <not>\r
499 <matches pattern="1\.[0-5](\..*)?" string="${javac.source}"/>\r
500 </not>\r
501 </condition>\r
502 </target>\r
503 <target depends="-init-ap-cmdline-properties" if="ap.supported.internal" name="-init-ap-cmdline-supported">\r
504 <condition else="" property="ap.processors.internal" value="-processor ${annotation.processing.processors.list}">\r
505 <isfalse value="${annotation.processing.run.all.processors}"/>\r
506 </condition>\r
507 <condition else="" property="ap.proc.none.internal" value="-proc:none">\r
508 <isfalse value="${annotation.processing.enabled}"/>\r
509 </condition>\r
510 </target>\r
511 <target depends="-init-ap-cmdline-properties,-init-ap-cmdline-supported" name="-init-ap-cmdline">\r
512 <property name="ap.cmd.line.internal" value=""/>\r
513 </target>\r
514 <target depends="-profile-pre-init, init, -profile-post-init, -profile-init-check" name="profile-init"/>\r
515 <target name="-profile-pre-init">\r
516 <!-- Empty placeholder for easier customization. -->\r
517 <!-- You can override this target in the ../build.xml file. -->\r
518 </target>\r
519 <target name="-profile-post-init">\r
520 <!-- Empty placeholder for easier customization. -->\r
521 <!-- You can override this target in the ../build.xml file. -->\r
522 </target>\r
523 <target depends="-profile-pre-init, init, -profile-post-init" name="-profile-init-check">\r
524 <fail unless="profiler.info.jvm">Must set JVM to use for profiling in profiler.info.jvm</fail>\r
525 <fail unless="profiler.info.jvmargs.agent">Must set profiler agent JVM arguments in profiler.info.jvmargs.agent</fail>\r
526 </target>\r
527 <target depends="-pre-init,-init-private,-init-user,-init-project,-do-init,-post-init,-init-check,-init-macrodef-property,-init-macrodef-javac,-init-macrodef-junit,-init-macrodef-java,-init-macrodef-nbjpda,-init-macrodef-nbjsdebug,-init-macrodef-debug,-init-taskdefs,-init-ap-cmdline" name="init"/>\r
528 <!--\r
529 COMPILATION SECTION\r
530 -->\r
531 <target depends="init" if="no.dist.ear.dir" name="deps-module-jar" unless="no.deps"/>\r
532 <target depends="init" if="dist.ear.dir" name="deps-ear-jar" unless="no.deps"/>\r
533 <target depends="init, deps-module-jar, deps-ear-jar" name="deps-jar" unless="no.deps"/>\r
534 <target depends="init,deps-jar" name="-pre-pre-compile">\r
535 <mkdir dir="${build.classes.dir}"/>\r
536 </target>\r
537 <target name="-pre-compile">\r
538 <!-- Empty placeholder for easier customization. -->\r
539 <!-- You can override this target in the ../build.xml file. -->\r
540 </target>\r
541 <target name="-copy-webdir">\r
542 <copy todir="${build.web.dir}">\r
543 <fileset dir="${web.docbase.dir}" excludes="${build.web.excludes},${excludes}" includes="${includes}"/>\r
544 </copy>\r
545 <copy todir="${build.web.dir}/WEB-INF">\r
546 <fileset dir="${webinf.dir}" excludes="${build.web.excludes}"/>\r
547 </copy>\r
548 </target>\r
549 <target depends="init, deps-jar, -pre-pre-compile, -pre-compile, -copy-manifest, -copy-persistence-xml, -copy-webdir, library-inclusion-in-archive,library-inclusion-in-manifest" if="have.sources" name="-do-compile">\r
550 <webproject2:javac destdir="${build.classes.dir}" gensrcdir="${build.generated.sources.dir}"/>\r
551 <copy todir="${build.classes.dir}">\r
552 <fileset dir="${src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>\r
553 </copy>\r
554 </target>\r
555 <target if="has.custom.manifest" name="-copy-manifest">\r
556 <mkdir dir="${build.meta.inf.dir}"/>\r
557 <copy todir="${build.meta.inf.dir}">\r
558 <fileset dir="${conf.dir}" includes="MANIFEST.MF"/>\r
559 </copy>\r
560 </target>\r
561 <target if="has.persistence.xml" name="-copy-persistence-xml">\r
562 <mkdir dir="${build.web.dir}/WEB-INF/classes/META-INF"/>\r
563 <copy todir="${build.web.dir}/WEB-INF/classes/META-INF">\r
564 <fileset dir="${persistence.xml.dir}" includes="persistence.xml"/>\r
565 </copy>\r
566 </target>\r
567 <target name="-post-compile">\r
568 <!-- Empty placeholder for easier customization. -->\r
569 <!-- You can override this target in the ../build.xml file. -->\r
570 </target>\r
571 <target depends="init,deps-jar,-pre-pre-compile,-pre-compile,-do-compile,-post-compile" description="Compile project." name="compile"/>\r
572 <target name="-pre-compile-single">\r
573 <!-- Empty placeholder for easier customization. -->\r
574 <!-- You can override this target in the ../build.xml file. -->\r
575 </target>\r
576 <target depends="init,deps-jar,-pre-pre-compile" name="-do-compile-single">\r
577 <fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail>\r
578 <webproject2:javac excludes="" gensrcdir="${build.generated.sources.dir}" includes="${javac.includes}"/>\r
579 <copy todir="${build.classes.dir}">\r
580 <fileset dir="${src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>\r
581 </copy>\r
582 </target>\r
583 <target name="-post-compile-single">\r
584 <!-- Empty placeholder for easier customization. -->\r
585 <!-- You can override this target in the ../build.xml file. -->\r
586 </target>\r
587 <target depends="init,deps-jar,-pre-pre-compile,-pre-compile-single,-do-compile-single,-post-compile-single" name="compile-single"/>\r
588 <property name="jspc.schemas" value="/resources/schemas/"/>\r
589 <property name="jspc.dtds" value="/resources/dtds/"/>\r
590 <target depends="compile" description="Test compile JSP pages to expose compilation errors." if="do.compile.jsps" name="compile-jsps">\r
591 <mkdir dir="${build.generated.dir}/src"/>\r
592 <java classname="org.netbeans.modules.web.project.ant.JspC" failonerror="true" fork="true">\r
593 <arg value="-uriroot"/>\r
594 <arg file="${basedir}/${build.web.dir}"/>\r
595 <arg value="-d"/>\r
596 <arg file="${basedir}/${build.generated.dir}/src"/>\r
597 <arg value="-die1"/>\r
598 <arg value="-schemas ${jspc.schemas}"/>\r
599 <arg value="-dtds ${jspc.dtds}"/>\r
600 <arg value="-compilerSourceVM ${javac.source}"/>\r
601 <arg value="-compilerTargetVM ${javac.target}"/>\r
602 <arg value="-javaEncoding ${source.encoding}"/>\r
603 <arg value="-sysClasspath ${libs.jsp-compilation-syscp.classpath}"/>\r
604 <classpath path="${java.home}/../lib/tools.jar:${libs.jsp-compiler.classpath}:${libs.jsp-compilation.classpath}"/>\r
605 </java>\r
606 <mkdir dir="${build.generated.dir}/classes"/>\r
607 <webproject2:javac classpath="${build.classes.dir}:${libs.jsp-compilation.classpath}:${javac.classpath}:${j2ee.platform.classpath}" destdir="${build.generated.dir}/classes" srcdir="${build.generated.dir}/src"/>\r
608 </target>\r
609 <target depends="compile" if="jsp.includes" name="-do-compile-single-jsp">\r
610 <fail unless="javac.jsp.includes">Must select some files in the IDE or set javac.jsp.includes</fail>\r
611 <mkdir dir="${build.generated.dir}/src"/>\r
612 <java classname="org.netbeans.modules.web.project.ant.JspCSingle" failonerror="true" fork="true">\r
613 <arg value="-uriroot"/>\r
614 <arg file="${basedir}/${build.web.dir}"/>\r
615 <arg value="-d"/>\r
616 <arg file="${basedir}/${build.generated.dir}/src"/>\r
617 <arg value="-die1"/>\r
618 <arg value="-schemas ${jspc.schemas}"/>\r
619 <arg value="-dtds ${jspc.dtds}"/>\r
620 <arg value="-sysClasspath ${libs.jsp-compilation-syscp.classpath}"/>\r
621 <arg value="-jspc.files"/>\r
622 <arg path="${jsp.includes}"/>\r
623 <arg value="-compilerSourceVM ${javac.source}"/>\r
624 <arg value="-compilerTargetVM ${javac.target}"/>\r
625 <arg value="-javaEncoding ${source.encoding}"/>\r
626 <classpath path="${java.home}/../lib/tools.jar:${libs.jsp-compiler.classpath}:${libs.jsp-compilation.classpath}"/>\r
627 </java>\r
628 <mkdir dir="${build.generated.dir}/classes"/>\r
629 <webproject2:javac classpath="${build.classes.dir}:${libs.jsp-compilation.classpath}:${javac.classpath}:${j2ee.platform.classpath}" destdir="${build.generated.dir}/classes" srcdir="${build.generated.dir}/src">\r
630 <customize>\r
631 <patternset includes="${javac.jsp.includes}"/>\r
632 </customize>\r
633 </webproject2:javac>\r
634 </target>\r
635 <target name="compile-single-jsp">\r
636 <fail unless="jsp.includes">Must select a file in the IDE or set jsp.includes</fail>\r
637 <antcall target="-do-compile-single-jsp"/>\r
638 </target>\r
639 <!--\r
640 DIST BUILDING SECTION\r
641 -->\r
642 <target name="-pre-dist">\r
643 <!-- Empty placeholder for easier customization. -->\r
644 <!-- You can override this target in the ../build.xml file. -->\r
645 </target>\r
646 <target depends="init,compile,compile-jsps,-pre-dist" if="do.war.package.without.custom.manifest" name="-do-dist-without-manifest">\r
647 <dirname file="${dist.war}" property="dist.jar.dir"/>\r
648 <mkdir dir="${dist.jar.dir}"/>\r
649 <jar compress="${jar.compress}" jarfile="${dist.war}">\r
650 <fileset dir="${build.web.dir}"/>\r
651 </jar>\r
652 </target>\r
653 <target depends="init,compile,compile-jsps,-pre-dist" if="do.war.package.with.custom.manifest" name="-do-dist-with-manifest">\r
654 <dirname file="${dist.war}" property="dist.jar.dir"/>\r
655 <mkdir dir="${dist.jar.dir}"/>\r
656 <jar compress="${jar.compress}" jarfile="${dist.war}" manifest="${build.meta.inf.dir}/MANIFEST.MF">\r
657 <fileset dir="${build.web.dir}"/>\r
658 </jar>\r
659 </target>\r
660 <target depends="init,compile,compile-jsps,-pre-dist" if="do.tmp.war.package.without.custom.manifest" name="-do-tmp-dist-without-manifest">\r
661 <dirname file="${dist.war}" property="dist.jar.dir"/>\r
662 <mkdir dir="${dist.jar.dir}"/>\r
663 <jar compress="${jar.compress}" jarfile="${dist.war}">\r
664 <fileset dir="${build.web.dir}"/>\r
665 </jar>\r
666 </target>\r
667 <target depends="init,compile,compile-jsps,-pre-dist" if="do.tmp.war.package.with.custom.manifest" name="-do-tmp-dist-with-manifest">\r
668 <dirname file="${dist.war}" property="dist.jar.dir"/>\r
669 <mkdir dir="${dist.jar.dir}"/>\r
670 <jar compress="${jar.compress}" jarfile="${dist.war}" manifest="${build.meta.inf.dir}/MANIFEST.MF">\r
671 <fileset dir="${build.web.dir}"/>\r
672 </jar>\r
673 </target>\r
674 <target depends="init,compile,compile-jsps,-pre-dist,-do-dist-with-manifest,-do-dist-without-manifest" name="do-dist"/>\r
675 <target depends="init" if="dist.ear.dir" name="library-inclusion-in-manifest">\r
676 <copyfiles files="${libs.primefaces.classpath}" iftldtodir="${build.web.dir}/WEB-INF" todir="${dist.ear.dir}/lib"/>\r
677 <copyfiles files="${libs.hibernate-support.classpath}" iftldtodir="${build.web.dir}/WEB-INF" todir="${dist.ear.dir}/lib"/>\r
678 <copyfiles files="${file.reference.avalon-framework-4.1.3.jar}" iftldtodir="${build.web.dir}/WEB-INF" todir="${dist.ear.dir}/lib"/>\r
679 <copyfiles files="${file.reference.commons-logging-1.1.jar}" iftldtodir="${build.web.dir}/WEB-INF" todir="${dist.ear.dir}/lib"/>\r
680 <copyfiles files="${file.reference.icu4j-3.8.jar}" iftldtodir="${build.web.dir}/WEB-INF" todir="${dist.ear.dir}/lib"/>\r
681 <copyfiles files="${file.reference.javahelp-2.0.02.jar}" iftldtodir="${build.web.dir}/WEB-INF" todir="${dist.ear.dir}/lib"/>\r
682 <copyfiles files="${file.reference.jaxme2-0.5.1.jar}" iftldtodir="${build.web.dir}/WEB-INF" todir="${dist.ear.dir}/lib"/>\r
683 <copyfiles files="${file.reference.jaxme2-rt-0.5.1.jar}" iftldtodir="${build.web.dir}/WEB-INF" todir="${dist.ear.dir}/lib"/>\r
684 <copyfiles files="${file.reference.jaxmeapi-0.5.1.jar}" iftldtodir="${build.web.dir}/WEB-INF" todir="${dist.ear.dir}/lib"/>\r
685 <copyfiles files="${file.reference.jaxmejs-0.5.1.jar}" iftldtodir="${build.web.dir}/WEB-INF" todir="${dist.ear.dir}/lib"/>\r
686 <copyfiles files="${file.reference.jaxmexs-0.5.1.jar}" iftldtodir="${build.web.dir}/WEB-INF" todir="${dist.ear.dir}/lib"/>\r
687 <copyfiles files="${file.reference.jpf-1.5.jar}" iftldtodir="${build.web.dir}/WEB-INF" todir="${dist.ear.dir}/lib"/>\r
688 <copyfiles files="${file.reference.junit-4.1.jar}" iftldtodir="${build.web.dir}/WEB-INF" todir="${dist.ear.dir}/lib"/>\r
689 <copyfiles files="${file.reference.log4j-1.2.12.jar}" iftldtodir="${build.web.dir}/WEB-INF" todir="${dist.ear.dir}/lib"/>\r
690 <copyfiles files="${file.reference.logkit-1.0.1.jar}" iftldtodir="${build.web.dir}/WEB-INF" todir="${dist.ear.dir}/lib"/>\r
691 <copyfiles files="${file.reference.servlet-api-2.3.jar}" iftldtodir="${build.web.dir}/WEB-INF" todir="${dist.ear.dir}/lib"/>\r
692 <copyfiles files="${file.reference.unbbayes-4.10.4-1s.jar}" iftldtodir="${build.web.dir}/WEB-INF" todir="${dist.ear.dir}/lib"/>\r
693 <copyfiles files="${file.reference.xalan-2.7.0.jar}" iftldtodir="${build.web.dir}/WEB-INF" todir="${dist.ear.dir}/lib"/>\r
694 <copyfiles files="${file.reference.xml-apis-1.0.b2.jar}" iftldtodir="${build.web.dir}/WEB-INF" todir="${dist.ear.dir}/lib"/>\r
695 <mkdir dir="${build.web.dir}/META-INF"/>\r
696 <manifest file="${build.web.dir}/META-INF/MANIFEST.MF" mode="update"/>\r
697 </target>\r
698 <target depends="init" name="library-inclusion-in-archive" unless="dist.ear.dir">\r
699 <copyfiles files="${libs.primefaces.classpath}" todir="${build.web.dir}/WEB-INF/lib"/>\r
700 <copyfiles files="${libs.hibernate-support.classpath}" todir="${build.web.dir}/WEB-INF/lib"/>\r
701 <copyfiles files="${file.reference.avalon-framework-4.1.3.jar}" todir="${build.web.dir}/WEB-INF/lib"/>\r
702 <copyfiles files="${file.reference.commons-logging-1.1.jar}" todir="${build.web.dir}/WEB-INF/lib"/>\r
703 <copyfiles files="${file.reference.icu4j-3.8.jar}" todir="${build.web.dir}/WEB-INF/lib"/>\r
704 <copyfiles files="${file.reference.javahelp-2.0.02.jar}" todir="${build.web.dir}/WEB-INF/lib"/>\r
705 <copyfiles files="${file.reference.jaxme2-0.5.1.jar}" todir="${build.web.dir}/WEB-INF/lib"/>\r
706 <copyfiles files="${file.reference.jaxme2-rt-0.5.1.jar}" todir="${build.web.dir}/WEB-INF/lib"/>\r
707 <copyfiles files="${file.reference.jaxmeapi-0.5.1.jar}" todir="${build.web.dir}/WEB-INF/lib"/>\r
708 <copyfiles files="${file.reference.jaxmejs-0.5.1.jar}" todir="${build.web.dir}/WEB-INF/lib"/>\r
709 <copyfiles files="${file.reference.jaxmexs-0.5.1.jar}" todir="${build.web.dir}/WEB-INF/lib"/>\r
710 <copyfiles files="${file.reference.jpf-1.5.jar}" todir="${build.web.dir}/WEB-INF/lib"/>\r
711 <copyfiles files="${file.reference.junit-4.1.jar}" todir="${build.web.dir}/WEB-INF/lib"/>\r
712 <copyfiles files="${file.reference.log4j-1.2.12.jar}" todir="${build.web.dir}/WEB-INF/lib"/>\r
713 <copyfiles files="${file.reference.logkit-1.0.1.jar}" todir="${build.web.dir}/WEB-INF/lib"/>\r
714 <copyfiles files="${file.reference.servlet-api-2.3.jar}" todir="${build.web.dir}/WEB-INF/lib"/>\r
715 <copyfiles files="${file.reference.unbbayes-4.10.4-1s.jar}" todir="${build.web.dir}/WEB-INF/lib"/>\r
716 <copyfiles files="${file.reference.xalan-2.7.0.jar}" todir="${build.web.dir}/WEB-INF/lib"/>\r
717 <copyfiles files="${file.reference.xml-apis-1.0.b2.jar}" todir="${build.web.dir}/WEB-INF/lib"/>\r
718 </target>\r
719 <target depends="init" if="dist.ear.dir" name="-clean-webinf-lib">\r
720 <delete dir="${build.web.dir}/WEB-INF/lib"/>\r
721 </target>\r
722 <target depends="init,-clean-webinf-lib,compile,compile-jsps,-pre-dist,library-inclusion-in-manifest" if="do.tmp.war.package" name="do-ear-dist">\r
723 <dirname file="${dist.ear.war}" property="dist.jar.dir"/>\r
724 <mkdir dir="${dist.jar.dir}"/>\r
725 <jar compress="${jar.compress}" jarfile="${dist.ear.war}" manifest="${build.web.dir}/META-INF/MANIFEST.MF">\r
726 <fileset dir="${build.web.dir}"/>\r
727 </jar>\r
728 </target>\r
729 <target name="-post-dist">\r
730 <!-- Empty placeholder for easier customization. -->\r
731 <!-- You can override this target in the ../build.xml file. -->\r
732 </target>\r
733 <target depends="init,compile,-pre-dist,do-dist,-post-dist" description="Build distribution (WAR)." name="dist"/>\r
734 <target depends="init,-clean-webinf-lib,-init-cos,compile,-pre-dist,do-ear-dist,-post-dist" description="Build distribution (WAR) to be packaged into an EAR." name="dist-ear"/>\r
735 <!--\r
736 EXECUTION SECTION\r
737 -->\r
738 <target depends="run-deploy,run-display-browser" description="Deploy to server and show in browser." name="run"/>\r
739 <target name="-pre-run-deploy">\r
740 <!-- Empty placeholder for easier customization. -->\r
741 <!-- You can override this target in the ../build.xml file. -->\r
742 </target>\r
743 <target name="-post-run-deploy">\r
744 <!-- Empty placeholder for easier customization. -->\r
745 <!-- You can override this target in the ../build.xml file. -->\r
746 </target>\r
747 <target name="-pre-nbmodule-run-deploy">\r
748 <!-- Empty placeholder for easier customization. -->\r
749 <!-- This target can be overriden by NetBeans modules. Don't override it directly, use -pre-run-deploy task instead. -->\r
750 </target>\r
751 <target name="-post-nbmodule-run-deploy">\r
752 <!-- Empty placeholder for easier customization. -->\r
753 <!-- This target can be overriden by NetBeans modules. Don't override it directly, use -post-run-deploy task instead. -->\r
754 </target>\r
755 <target name="-run-deploy-am">\r
756 <!-- Task to deploy to the Access Manager runtime. -->\r
757 </target>\r
758 <target depends="init,-init-cos,compile,compile-jsps,-do-compile-single-jsp,-pre-dist,-do-tmp-dist-with-manifest,-do-tmp-dist-without-manifest,-pre-run-deploy,-pre-nbmodule-run-deploy,-run-deploy-nb,-init-deploy-ant,-deploy-ant,-run-deploy-am,-post-nbmodule-run-deploy,-post-run-deploy,-do-update-breakpoints" name="run-deploy"/>\r
759 <target if="netbeans.home" name="-run-deploy-nb">\r
760 <nbdeploy clientUrlPart="${client.urlPart}" debugmode="false" forceRedeploy="${forceRedeploy}"/>\r
761 </target>\r
762 <target name="-init-deploy-ant" unless="netbeans.home">\r
763 <property name="deploy.ant.archive" value="${dist.war}"/>\r
764 <property name="deploy.ant.docbase.dir" value="${web.docbase.dir}"/>\r
765 <property name="deploy.ant.resource.dir" value="${resource.dir}"/>\r
766 <property name="deploy.ant.enabled" value="true"/>\r
767 </target>\r
768 <target depends="dist,-run-undeploy-nb,-init-deploy-ant,-undeploy-ant" name="run-undeploy"/>\r
769 <target if="netbeans.home" name="-run-undeploy-nb">\r
770 <fail message="Undeploy is not supported from within the IDE"/>\r
771 </target>\r
772 <target depends="init,-pre-dist,dist,-post-dist" name="verify">\r
773 <nbverify file="${dist.war}"/>\r
774 </target>\r
775 <target depends="run-deploy,-init-display-browser,-display-browser-nb,-display-browser-cl" name="run-display-browser"/>\r
776 <target if="do.display.browser" name="-init-display-browser">\r
777 <condition property="do.display.browser.nb">\r
778 <isset property="netbeans.home"/>\r
779 </condition>\r
780 <condition property="do.display.browser.cl">\r
781 <isset property="deploy.ant.enabled"/>\r
782 </condition>\r
783 </target>\r
784 <target if="do.display.browser.nb" name="-display-browser-nb">\r
785 <nbbrowse url="${client.url}"/>\r
786 </target>\r
787 <target if="do.display.browser.cl" name="-get-browser" unless="browser">\r
788 <condition property="browser" value="rundll32">\r
789 <os family="windows"/>\r
790 </condition>\r
791 <condition else="" property="browser.args" value="url.dll,FileProtocolHandler">\r
792 <os family="windows"/>\r
793 </condition>\r
794 <condition property="browser" value="/usr/bin/open">\r
795 <os family="mac"/>\r
796 </condition>\r
797 <property environment="env"/>\r
798 <condition property="browser" value="${env.BROWSER}">\r
799 <isset property="env.BROWSER"/>\r
800 </condition>\r
801 <condition property="browser" value="/usr/bin/firefox">\r
802 <available file="/usr/bin/firefox"/>\r
803 </condition>\r
804 <condition property="browser" value="/usr/local/firefox/firefox">\r
805 <available file="/usr/local/firefox/firefox"/>\r
806 </condition>\r
807 <condition property="browser" value="/usr/bin/mozilla">\r
808 <available file="/usr/bin/mozilla"/>\r
809 </condition>\r
810 <condition property="browser" value="/usr/local/mozilla/mozilla">\r
811 <available file="/usr/local/mozilla/mozilla"/>\r
812 </condition>\r
813 <condition property="browser" value="/usr/sfw/lib/firefox/firefox">\r
814 <available file="/usr/sfw/lib/firefox/firefox"/>\r
815 </condition>\r
816 <condition property="browser" value="/opt/csw/bin/firefox">\r
817 <available file="/opt/csw/bin/firefox"/>\r
818 </condition>\r
819 <condition property="browser" value="/usr/sfw/lib/mozilla/mozilla">\r
820 <available file="/usr/sfw/lib/mozilla/mozilla"/>\r
821 </condition>\r
822 <condition property="browser" value="/opt/csw/bin/mozilla">\r
823 <available file="/opt/csw/bin/mozilla"/>\r
824 </condition>\r
825 </target>\r
826 <target depends="-get-browser" if="do.display.browser.cl" name="-display-browser-cl">\r
827 <fail unless="browser">\r
828 Browser not found, cannot launch the deployed application. Try to set the BROWSER environment variable.\r
829 </fail>\r
830 <property name="browse.url" value="${deploy.ant.client.url}${client.urlPart}"/>\r
831 <echo>Launching ${browse.url}</echo>\r
832 <exec executable="${browser}" spawn="true">\r
833 <arg line="${browser.args} ${browse.url}"/>\r
834 </exec>\r
835 </target>\r
836 <target depends="init,-init-cos,compile-single" name="run-main">\r
837 <fail unless="run.class">Must select one file in the IDE or set run.class</fail>\r
838 <webproject1:java classname="${run.class}"/>\r
839 </target>\r
840 <target depends="init,compile-test-single,-pre-test-run-single" name="run-test-with-main">\r
841 <fail unless="run.class">Must select one file in the IDE or set run.class</fail>\r
842 <webproject1:java classname="${run.class}" classpath="${run.test.classpath}"/>\r
843 </target>\r
844 <target depends="init" if="netbeans.home" name="-do-update-breakpoints">\r
845 <webproject1:nbjpdaappreloaded/>\r
846 </target>\r
847 <!--\r
848 DEBUGGING SECTION\r
849 -->\r
850 <target depends="init,-init-cos,compile,compile-jsps,-do-compile-single-jsp,-pre-dist,-do-tmp-dist-with-manifest,-do-tmp-dist-without-manifest" description="Debug project in IDE." if="netbeans.home" name="debug">\r
851 <nbstartserver debugmode="true"/>\r
852 <antcall target="connect-debugger"/>\r
853 <nbdeploy clientUrlPart="${client.urlPart}" debugmode="true" forceRedeploy="true"/>\r
854 <antcall target="debug-display-browser"/>\r
855 <antcall target="connect-client-debugger"/>\r
856 </target>\r
857 <target if="do.debug.server" name="connect-debugger" unless="is.debugged">\r
858 <nbjpdaconnect address="${jpda.address}" host="${jpda.host}" name="${name}" transport="${jpda.transport}">\r
859 <classpath>\r
860 <path path="${debug.classpath}:${j2ee.platform.classpath}"/>\r
861 </classpath>\r
862 <sourcepath>\r
863 <path path="${web.docbase.dir}"/>\r
864 </sourcepath>\r
865 </nbjpdaconnect>\r
866 </target>\r
867 <target if="do.display.browser.debug" name="debug-display-browser">\r
868 <nbbrowse url="${client.url}"/>\r
869 </target>\r
870 <target if="do.debug.client" name="connect-client-debugger">\r
871 <webproject1:nbjsdebugstart webUrl="${client.url}"/>\r
872 </target>\r
873 <target depends="init,compile-test-single" if="netbeans.home" name="-debug-start-debuggee-main-test">\r
874 <fail unless="debug.class">Must select one file in the IDE or set debug.class</fail>\r
875 <webproject1:debug classname="${debug.class}" classpath="${debug.test.classpath}"/>\r
876 </target>\r
877 <target depends="init,compile-test-single,-debug-start-debugger-main-test,-debug-start-debuggee-main-test" if="netbeans.home" name="debug-test-with-main"/>\r
878 <target depends="init,compile,compile-jsps,-do-compile-single-jsp,debug" if="netbeans.home" name="debug-single"/>\r
879 <target depends="init" if="netbeans.home" name="-debug-start-debugger-main-test">\r
880 <webproject1:nbjpdastart classpath="${debug.test.classpath}" name="${debug.class}"/>\r
881 </target>\r
882 <target depends="init" if="netbeans.home" name="-debug-start-debugger">\r
883 <webproject1:nbjpdastart name="${debug.class}"/>\r
884 </target>\r
885 <target depends="init,compile-single" if="netbeans.home" name="-debug-start-debuggee-single">\r
886 <fail unless="debug.class">Must select one file in the IDE or set debug.class</fail>\r
887 <webproject1:debug classname="${debug.class}"/>\r
888 </target>\r
889 <target depends="init,compile-single,-debug-start-debugger,-debug-start-debuggee-single" if="netbeans.home" name="debug-single-main"/>\r
890 <target depends="init" name="-pre-debug-fix">\r
891 <fail unless="fix.includes">Must set fix.includes</fail>\r
892 <property name="javac.includes" value="${fix.includes}.java"/>\r
893 </target>\r
894 <target depends="init,-pre-debug-fix,compile-single" if="netbeans.home" name="-do-debug-fix">\r
895 <webproject1:nbjpdareload/>\r
896 </target>\r
897 <target depends="init,-pre-debug-fix,-do-debug-fix" if="netbeans.home" name="debug-fix"/>\r
898 <!--\r
899 =================\r
900 PROFILING SECTION\r
901 =================\r
902 -->\r
903 <target description="Profile a J2EE project in the IDE." name="profile">\r
904 <condition else="start-profiled-server" property="profiler.startserver.target" value="start-profiled-server-extraargs">\r
905 <isset property="profiler.info.jvmargs.extra"/>\r
906 </condition>\r
907 <antcall target="${profiler.startserver.target}"/>\r
908 <antcall target="run"/>\r
909 <antcall target="start-loadgen"/>\r
910 </target>\r
911 <target name="start-profiled-server">\r
912 <nbstartprofiledserver forceRestart="${profiler.j2ee.serverForceRestart}" javaPlatform="${profiler.info.javaPlatform}" startupTimeout="${profiler.j2ee.serverStartupTimeout}">\r
913 <jvmarg value="${profiler.info.jvmargs.agent}"/>\r
914 <jvmarg value="${profiler.j2ee.agentID}"/>\r
915 </nbstartprofiledserver>\r
916 </target>\r
917 <target name="start-profiled-server-extraargs">\r
918 <nbstartprofiledserver forceRestart="${profiler.j2ee.serverForceRestart}" javaPlatform="${profiler.info.javaPlatform}" startupTimeout="${profiler.j2ee.serverStartupTimeout}">\r
919 <jvmarg value="${profiler.info.jvmargs.extra}"/>\r
920 <jvmarg value="${profiler.info.jvmargs.agent}"/>\r
921 <jvmarg value="${profiler.j2ee.agentID}"/>\r
922 </nbstartprofiledserver>\r
923 </target>\r
924 <target if="profiler.loadgen.path" name="start-loadgen">\r
925 <loadgenstart path="${profiler.loadgen.path}"/>\r
926 </target>\r
927 <!--\r
928 JAVADOC SECTION\r
929 -->\r
930 <target depends="init" if="have.sources" name="javadoc-build">\r
931 <mkdir dir="${dist.javadoc.dir}"/>\r
932 <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}">\r
933 <classpath>\r
934 <path path="${javac.classpath}:${j2ee.platform.classpath}"/>\r
935 </classpath>\r
936 <fileset dir="${src.dir}" excludes="${excludes}" includes="${includes}">\r
937 <filename name="**/*.java"/>\r
938 </fileset>\r
939 <fileset dir="${build.generated.sources.dir}" erroronmissingdir="false">\r
940 <include name="**/*.java"/>\r
941 </fileset>\r
942 </javadoc>\r
943 <copy todir="${dist.javadoc.dir}">\r
944 <fileset dir="${src.dir}" excludes="${excludes}" includes="${includes}">\r
945 <filename name="**/doc-files/**"/>\r
946 </fileset>\r
947 <fileset dir="${build.generated.sources.dir}" erroronmissingdir="false">\r
948 <include name="**/doc-files/**"/>\r
949 </fileset>\r
950 </copy>\r
951 </target>\r
952 <target depends="init,javadoc-build" if="netbeans.home" name="javadoc-browse" unless="no.javadoc.preview">\r
953 <nbbrowse file="${dist.javadoc.dir}/index.html"/>\r
954 </target>\r
955 <target depends="init,javadoc-build,javadoc-browse" description="Build Javadoc." name="javadoc"/>\r
956 <!--\r
957 \r
958 JUNIT COMPILATION SECTION\r
959 -->\r
960 <target depends="init,compile" if="have.tests" name="-pre-pre-compile-test">\r
961 <mkdir dir="${build.test.classes.dir}"/>\r
962 <property name="j2ee.platform.embeddableejb.classpath" value=""/>\r
963 </target>\r
964 <target name="-pre-compile-test">\r
965 <!-- Empty placeholder for easier customization. -->\r
966 <!-- You can override this target in the ../build.xml file. -->\r
967 </target>\r
968 <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test" if="have.tests" name="-do-compile-test">\r
969 <webproject2:javac classpath="${javac.test.classpath}:${j2ee.platform.classpath}:${j2ee.platform.embeddableejb.classpath}" debug="true" destdir="${build.test.classes.dir}" srcdir="${test.src.dir}"/>\r
970 <copy todir="${build.test.classes.dir}">\r
971 <fileset dir="${test.src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>\r
972 </copy>\r
973 </target>\r
974 <target name="-post-compile-test">\r
975 <!-- Empty placeholder for easier customization. -->\r
976 <!-- You can override this target in the ../build.xml file. -->\r
977 </target>\r
978 <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test,-do-compile-test,-post-compile-test" name="compile-test"/>\r
979 <target name="-pre-compile-test-single">\r
980 <!-- Empty placeholder for easier customization. -->\r
981 <!-- You can override this target in the ../build.xml file. -->\r
982 </target>\r
983 <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test-single" if="have.tests" name="-do-compile-test-single">\r
984 <fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail>\r
985 <webproject2:javac classpath="${javac.test.classpath}:${j2ee.platform.classpath}:${j2ee.platform.embeddableejb.classpath}" debug="true" destdir="${build.test.classes.dir}" excludes="" includes="${javac.includes}" srcdir="${test.src.dir}"/>\r
986 <copy todir="${build.test.classes.dir}">\r
987 <fileset dir="${test.src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>\r
988 </copy>\r
989 </target>\r
990 <target name="-post-compile-test-single">\r
991 <!-- Empty placeholder for easier customization. -->\r
992 <!-- You can override this target in the ../build.xml file. -->\r
993 </target>\r
994 <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test-single,-do-compile-test-single,-post-compile-test-single" name="compile-test-single"/>\r
995 <!--\r
996 \r
997 JUNIT EXECUTION SECTION\r
998 -->\r
999 <target depends="init" if="have.tests" name="-pre-test-run">\r
1000 <mkdir dir="${build.test.results.dir}"/>\r
1001 </target>\r
1002 <target depends="init,compile-test,-pre-test-run" if="have.tests" name="-do-test-run">\r
1003 <webproject2:junit testincludes="**/*Test.java"/>\r
1004 </target>\r
1005 <target depends="init,compile-test,-pre-test-run,-do-test-run" if="have.tests" name="-post-test-run">\r
1006 <fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail>\r
1007 </target>\r
1008 <target depends="init" if="have.tests" name="test-report"/>\r
1009 <target depends="init" if="netbeans.home+have.tests" name="-test-browse"/>\r
1010 <target depends="init,compile-test,-pre-test-run,-do-test-run,test-report,-post-test-run,-test-browse" description="Run unit tests." name="test"/>\r
1011 <target depends="init" if="have.tests" name="-pre-test-run-single">\r
1012 <mkdir dir="${build.test.results.dir}"/>\r
1013 </target>\r
1014 <target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-do-test-run-single">\r
1015 <fail unless="test.includes">Must select some files in the IDE or set test.includes</fail>\r
1016 <webproject2:junit excludes="" includes="${test.includes}"/>\r
1017 </target>\r
1018 <target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single" if="have.tests" name="-post-test-run-single">\r
1019 <fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail>\r
1020 </target>\r
1021 <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"/>\r
1022 <!--\r
1023 \r
1024 JUNIT DEBUGGING SECTION\r
1025 -->\r
1026 <target depends="init,compile-test" if="have.tests" name="-debug-start-debuggee-test">\r
1027 <fail unless="test.class">Must select one file in the IDE or set test.class</fail>\r
1028 <property location="${build.test.results.dir}/TEST-${test.class}.xml" name="test.report.file"/>\r
1029 <delete file="${test.report.file}"/>\r
1030 <!-- must exist, otherwise the XML formatter would fail -->\r
1031 <mkdir dir="${build.test.results.dir}"/>\r
1032 <webproject1:debug args="${test.class}" classname="org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner" classpath="${ant.home}/lib/ant.jar:${ant.home}/lib/ant-junit.jar:${debug.test.classpath}:${j2ee.platform.embeddableejb.classpath}">\r
1033 <customize>\r
1034 <arg value="showoutput=true"/>\r
1035 <arg value="formatter=org.apache.tools.ant.taskdefs.optional.junit.BriefJUnitResultFormatter"/>\r
1036 <arg value="formatter=org.apache.tools.ant.taskdefs.optional.junit.XMLJUnitResultFormatter,${test.report.file}"/>\r
1037 </customize>\r
1038 </webproject1:debug>\r
1039 </target>\r
1040 <target depends="init,compile-test" if="netbeans.home+have.tests" name="-debug-start-debugger-test">\r
1041 <webproject1:nbjpdastart classpath="${debug.test.classpath}" name="${test.class}"/>\r
1042 </target>\r
1043 <target depends="init,compile-test,-debug-start-debugger-test,-debug-start-debuggee-test" name="debug-test"/>\r
1044 <target depends="init,-pre-debug-fix,compile-test-single" if="netbeans.home" name="-do-debug-fix-test">\r
1045 <webproject1:nbjpdareload dir="${build.test.classes.dir}"/>\r
1046 </target>\r
1047 <target depends="init,-pre-debug-fix,-do-debug-fix-test" if="netbeans.home" name="debug-fix-test"/>\r
1048 <!--\r
1049 =========================\r
1050 TESTS PROFILING SECTION\r
1051 =========================\r
1052 -->\r
1053 <target depends="profile-init,compile-test-single" if="netbeans.home" name="profile-test-single">\r
1054 <nbprofiledirect>\r
1055 <classpath>\r
1056 <path path="${run.test.classpath}"/>\r
1057 <path path="${j2ee.platform.classpath}"/>\r
1058 </classpath>\r
1059 </nbprofiledirect>\r
1060 <junit dir="${profiler.info.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" jvm="${profiler.info.jvm}" showoutput="true">\r
1061 <env key="${profiler.info.pathvar}" path="${profiler.info.agentpath}:${profiler.current.path}"/>\r
1062 <jvmarg value="${profiler.info.jvmargs.agent}"/>\r
1063 <jvmarg line="${profiler.info.jvmargs}"/>\r
1064 <test name="${profile.class}"/>\r
1065 <classpath>\r
1066 <path path="${run.test.classpath}"/>\r
1067 <path path="${j2ee.platform.classpath}"/>\r
1068 </classpath>\r
1069 <syspropertyset>\r
1070 <propertyref prefix="test-sys-prop."/>\r
1071 <mapper from="test-sys-prop.*" to="*" type="glob"/>\r
1072 </syspropertyset>\r
1073 <formatter type="brief" usefile="false"/>\r
1074 <formatter type="xml"/>\r
1075 </junit>\r
1076 </target>\r
1077 <!--\r
1078 \r
1079 CLEANUP SECTION\r
1080 -->\r
1081 <target depends="init" name="deps-clean" unless="no.deps"/>\r
1082 <target depends="init" name="do-clean">\r
1083 <condition property="build.dir.to.clean" value="${build.web.dir}">\r
1084 <isset property="dist.ear.dir"/>\r
1085 </condition>\r
1086 <property name="build.dir.to.clean" value="${build.web.dir}"/>\r
1087 <delete includeEmptyDirs="true" quiet="true">\r
1088 <fileset dir="${build.dir.to.clean}/WEB-INF/lib"/>\r
1089 </delete>\r
1090 <delete dir="${build.dir}"/>\r
1091 <available file="${build.dir.to.clean}/WEB-INF/lib" property="status.clean-failed" type="dir"/>\r
1092 <delete dir="${dist.dir}"/>\r
1093 </target>\r
1094 <target depends="do-clean" if="status.clean-failed" name="check-clean">\r
1095 <echo message="Warning: unable to delete some files in ${build.web.dir}/WEB-INF/lib - they are probably locked by the J2EE server. "/>\r
1096 <echo level="info" message="To delete all files undeploy the module from Server Registry in Runtime tab and then use Clean again."/>\r
1097 </target>\r
1098 <target depends="init" if="netbeans.home" name="undeploy-clean">\r
1099 <nbundeploy failOnError="false" startServer="false"/>\r
1100 </target>\r
1101 <target name="-post-clean">\r
1102 <!-- Empty placeholder for easier customization. -->\r
1103 <!-- You can override this target in the ../build.xml file. -->\r
1104 </target>\r
1105 <target depends="init,undeploy-clean,deps-clean,do-clean,check-clean,-post-clean" description="Clean build products." name="clean"/>\r
1106 <target depends="clean" description="Clean build products." name="clean-ear"/>\r
1107</project>\r