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