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