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