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