]> git.mxchange.org Git - jjobs-ejb.git/blob - nbproject/build-impl.xml
initial import
[jjobs-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="jjobs-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="${javac.compilerargs}"/>
261                     <compilerarg value="-processorpath"/>
262                     <compilerarg path="@{processorpath}:${empty.dir}"/>
263                     <compilerarg line="${ap.processors.internal}"/>
264                     <compilerarg value="-s"/>
265                     <compilerarg path="@{apgeneratedsrcdir}"/>
266                     <compilerarg line="${ap.proc.none.internal}"/>
267                     <customize/>
268                 </javac>
269             </sequential>
270         </macrodef>
271     </target>
272     <target depends="-init-ap-cmdline-properties" name="-init-macrodef-javac-without-processors" unless="ap.supported.internal">
273         <macrodef name="javac" uri="http://www.netbeans.org/ns/j2ee-ejbjarproject/2">
274             <attribute default="${src.dir}" name="srcdir"/>
275             <attribute default="${build.classes.dir}" name="destdir"/>
276             <attribute default="${javac.classpath}:${j2ee.platform.classpath}" name="classpath"/>
277             <attribute default="${javac.processorpath}" name="processorpath"/>
278             <attribute default="${build.generated.sources.dir}/ap-source-output" name="apgeneratedsrcdir"/>
279             <attribute default="${includes}" name="includes"/>
280             <attribute default="${excludes}" name="excludes"/>
281             <attribute default="${javac.debug}" name="debug"/>
282             <attribute default="${empty.dir}" name="gensrcdir"/>
283             <element name="customize" optional="true"/>
284             <sequential>
285                 <property name="javac.compilerargs" value=""/>
286                 <property location="${build.dir}/empty" name="empty.dir"/>
287                 <mkdir dir="${empty.dir}"/>
288                 <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}">
289                     <src>
290                         <dirset dir="@{gensrcdir}" erroronmissingdir="false">
291                             <include name="*"/>
292                         </dirset>
293                     </src>
294                     <classpath>
295                         <path path="@{classpath}"/>
296                     </classpath>
297                     <compilerarg line="${javac.compilerargs}"/>
298                     <customize/>
299                 </javac>
300             </sequential>
301         </macrodef>
302     </target>
303     <target depends="-init-macrodef-javac-with-processors,-init-macrodef-javac-without-processors" name="-init-macrodef-javac">
304         <macrodef name="depend" uri="http://www.netbeans.org/ns/j2ee-ejbjarproject/2">
305             <attribute default="${src.dir}" name="srcdir"/>
306             <attribute default="${build.classes.dir}" name="destdir"/>
307             <attribute default="${javac.classpath}:${j2ee.platform.classpath}" name="classpath"/>
308             <sequential>
309                 <depend cache="${build.dir}/depcache" destdir="@{destdir}" excludes="${excludes}" includes="${includes}" srcdir="@{srcdir}">
310                     <classpath>
311                         <path path="@{classpath}"/>
312                     </classpath>
313                 </depend>
314             </sequential>
315         </macrodef>
316         <macrodef name="force-recompile" uri="http://www.netbeans.org/ns/j2ee-ejbjarproject/2">
317             <attribute default="${build.classes.dir}" name="destdir"/>
318             <sequential>
319                 <fail unless="javac.includes">Must set javac.includes</fail>
320                 <pathconvert pathsep="${line.separator}" property="javac.includes.binary">
321                     <path>
322                         <filelist dir="@{destdir}" files="${javac.includes}"/>
323                     </path>
324                     <globmapper from="*.java" to="*.class"/>
325                 </pathconvert>
326                 <tempfile deleteonexit="true" property="javac.includesfile.binary"/>
327                 <echo file="${javac.includesfile.binary}" message="${javac.includes.binary}"/>
328                 <delete>
329                     <files includesfile="${javac.includesfile.binary}"/>
330                 </delete>
331                 <delete file="${javac.includesfile.binary}"/>
332             </sequential>
333         </macrodef>
334     </target>
335     <target if="${junit.available}" name="-init-macrodef-junit-init">
336         <condition else="false" property="nb.junit.batch" value="true">
337             <and>
338                 <istrue value="${junit.available}"/>
339                 <not>
340                     <isset property="test.method"/>
341                 </not>
342             </and>
343         </condition>
344         <condition else="false" property="nb.junit.single" value="true">
345             <and>
346                 <istrue value="${junit.available}"/>
347                 <isset property="test.method"/>
348             </and>
349         </condition>
350     </target>
351     <target name="-init-test-properties">
352         <property name="test.binaryincludes" value="&lt;nothing&gt;"/>
353         <property name="test.binarytestincludes" value=""/>
354         <property name="test.binaryexcludes" value=""/>
355     </target>
356     <target if="${nb.junit.single}" name="-init-macrodef-junit-single" unless="${nb.junit.batch}">
357         <macrodef name="junit" uri="http://www.netbeans.org/ns/j2ee-ejbjarproject/2">
358             <attribute default="${includes}" name="includes"/>
359             <attribute default="${excludes}" name="excludes"/>
360             <attribute default="**" name="testincludes"/>
361             <attribute default="" name="testmethods"/>
362             <element name="customize" optional="true"/>
363             <sequential>
364                 <junit dir="${basedir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" showoutput="true" tempdir="${java.io.tmpdir}">
365                     <test methods="@{testmethods}" name="@{testincludes}" todir="${build.test.results.dir}"/>
366                     <syspropertyset>
367                         <propertyref prefix="test-sys-prop."/>
368                         <mapper from="test-sys-prop.*" to="*" type="glob"/>
369                     </syspropertyset>
370                     <formatter type="brief" usefile="false"/>
371                     <formatter type="xml"/>
372                     <jvmarg value="-ea"/>
373                     <customize/>
374                 </junit>
375             </sequential>
376         </macrodef>
377     </target>
378     <target depends="-init-test-properties" if="${nb.junit.batch}" name="-init-macrodef-junit-batch" unless="${nb.junit.single}">
379         <macrodef name="junit" uri="http://www.netbeans.org/ns/j2ee-ejbjarproject/2">
380             <attribute default="${includes}" name="includes"/>
381             <attribute default="${excludes}" name="excludes"/>
382             <attribute default="**" name="testincludes"/>
383             <attribute default="" name="testmethods"/>
384             <element name="customize" optional="true"/>
385             <sequential>
386                 <property name="run.jvmargs.ide" value=""/>
387                 <junit dir="${basedir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" showoutput="true" tempdir="${build.dir}">
388                     <batchtest todir="${build.test.results.dir}">
389                         <fileset dir="${test.src.dir}" excludes="@{excludes},${excludes}" includes="@{includes}">
390                             <filename name="@{testincludes}"/>
391                         </fileset>
392                         <fileset dir="${build.test.classes.dir}" excludes="@{excludes},${excludes},${test.binaryexcludes}" includes="${test.binaryincludes}">
393                             <filename name="${test.binarytestincludes}"/>
394                         </fileset>
395                     </batchtest>
396                     <syspropertyset>
397                         <propertyref prefix="test-sys-prop."/>
398                         <mapper from="test-sys-prop.*" to="*" type="glob"/>
399                     </syspropertyset>
400                     <formatter type="brief" usefile="false"/>
401                     <formatter type="xml"/>
402                     <jvmarg value="-ea"/>
403                     <jvmarg line="${run.jvmargs.ide}"/>
404                     <customize/>
405                 </junit>
406             </sequential>
407         </macrodef>
408     </target>
409     <target depends="-init-macrodef-junit-init,-init-macrodef-junit-single, -init-macrodef-junit-batch" if="${junit.available}" name="-init-macrodef-junit"/>
410     <target if="${testng.available}" name="-init-macrodef-testng">
411         <macrodef name="testng" uri="http://www.netbeans.org/ns/j2ee-ejbjarproject/2">
412             <attribute default="${includes}" name="includes"/>
413             <attribute default="${excludes}" name="excludes"/>
414             <attribute default="**" name="testincludes"/>
415             <attribute default="" name="testmethods"/>
416             <element name="customize" optional="true"/>
417             <sequential>
418                 <condition else="" property="testng.methods.arg" value="@{testincludes}.@{testmethods}">
419                     <isset property="test.method"/>
420                 </condition>
421                 <union id="test.set">
422                     <fileset dir="${test.src.dir}" excludes="@{excludes},**/*.xml,${excludes}" includes="@{includes}">
423                         <filename name="@{testincludes}"/>
424                     </fileset>
425                 </union>
426                 <taskdef classname="org.testng.TestNGAntTask" classpath="${run.test.classpath}" name="testng"/>
427                 <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="jjobs-ejb" testname="TestNG tests" workingDir="${basedir}">
428                     <xmlfileset dir="${build.test.classes.dir}" includes="@{testincludes}"/>
429                     <propertyset>
430                         <propertyref prefix="test-sys-prop."/>
431                         <mapper from="test-sys-prop.*" to="*" type="glob"/>
432                     </propertyset>
433                     <customize/>
434                 </testng>
435             </sequential>
436         </macrodef>
437     </target>
438     <target name="-init-macrodef-test-impl">
439         <macrodef name="test-impl" uri="http://www.netbeans.org/ns/j2ee-ejbjarproject/2">
440             <attribute default="${includes}" name="includes"/>
441             <attribute default="${excludes}" name="excludes"/>
442             <attribute default="**" name="testincludes"/>
443             <attribute default="" name="testmethods"/>
444             <element implicit="true" name="customize" optional="true"/>
445             <sequential>
446                 <echo>No tests executed.</echo>
447             </sequential>
448         </macrodef>
449     </target>
450     <target depends="-init-macrodef-junit" if="${junit.available}" name="-init-macrodef-junit-impl">
451         <macrodef name="test-impl" uri="http://www.netbeans.org/ns/j2ee-ejbjarproject/2">
452             <attribute default="${includes}" name="includes"/>
453             <attribute default="${excludes}" name="excludes"/>
454             <attribute default="**" name="testincludes"/>
455             <attribute default="" name="testmethods"/>
456             <element implicit="true" name="customize" optional="true"/>
457             <sequential>
458                 <ejbjarproject2:junit excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}">
459                     <customize/>
460                 </ejbjarproject2:junit>
461             </sequential>
462         </macrodef>
463     </target>
464     <target depends="-init-macrodef-testng" if="${testng.available}" name="-init-macrodef-testng-impl">
465         <macrodef name="test-impl" uri="http://www.netbeans.org/ns/j2ee-ejbjarproject/2">
466             <attribute default="${includes}" name="includes"/>
467             <attribute default="${excludes}" name="excludes"/>
468             <attribute default="**" name="testincludes"/>
469             <attribute default="" name="testmethods"/>
470             <element implicit="true" name="customize" optional="true"/>
471             <sequential>
472                 <ejbjarproject2:testng excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}">
473                     <customize/>
474                 </ejbjarproject2:testng>
475             </sequential>
476         </macrodef>
477     </target>
478     <target depends="-init-macrodef-test-impl,-init-macrodef-junit-impl,-init-macrodef-testng-impl" name="-init-macrodef-test">
479         <macrodef name="test" uri="http://www.netbeans.org/ns/j2ee-ejbjarproject/2">
480             <attribute default="${includes}" name="includes"/>
481             <attribute default="${excludes}" name="excludes"/>
482             <attribute default="**" name="testincludes"/>
483             <attribute default="" name="testmethods"/>
484             <sequential>
485                 <ejbjarproject2:test-impl excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}">
486                     <customize>
487                         <classpath>
488                             <path path="${run.test.classpath}"/>
489                             <path path="${j2ee.platform.classpath}"/>
490                             <path path="${j2ee.platform.embeddableejb.classpath}"/>
491                         </classpath>
492                         <jvmarg line="${runmain.jvmargs}"/>
493                     </customize>
494                 </ejbjarproject2:test-impl>
495             </sequential>
496         </macrodef>
497     </target>
498     <target if="${junit.available}" name="-init-macrodef-junit-debug" unless="${nb.junit.batch}">
499         <macrodef name="junit-debug" uri="http://www.netbeans.org/ns/j2ee-ejbjarproject/2">
500             <attribute default="${includes}" name="includes"/>
501             <attribute default="${excludes}" name="excludes"/>
502             <attribute default="**" name="testincludes"/>
503             <attribute default="" name="testmethods"/>
504             <element name="customize" optional="true"/>
505             <sequential>
506                 <junit dir="${basedir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" showoutput="true" tempdir="${java.io.tmpdir}">
507                     <test methods="@{testmethods}" name="@{testincludes}" todir="${build.test.results.dir}"/>
508                     <syspropertyset>
509                         <propertyref prefix="test-sys-prop."/>
510                         <mapper from="test-sys-prop.*" to="*" type="glob"/>
511                     </syspropertyset>
512                     <formatter type="brief" usefile="false"/>
513                     <formatter type="xml"/>
514                     <jvmarg value="-ea"/>
515                     <jvmarg line="${debug-args-line}"/>
516                     <jvmarg value="-Xrunjdwp:transport=${debug-transport},address=${jpda.address}"/>
517                     <customize/>
518                 </junit>
519             </sequential>
520         </macrodef>
521     </target>
522     <target depends="-init-test-properties" if="${nb.junit.batch}" name="-init-macrodef-junit-debug-batch">
523         <macrodef name="junit-debug" uri="http://www.netbeans.org/ns/j2ee-ejbjarproject/2">
524             <attribute default="${includes}" name="includes"/>
525             <attribute default="${excludes}" name="excludes"/>
526             <attribute default="**" name="testincludes"/>
527             <attribute default="" name="testmethods"/>
528             <element name="customize" optional="true"/>
529             <sequential>
530                 <property name="run.jvmargs.ide" value=""/>
531                 <junit dir="${basedir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" showoutput="true" tempdir="${build.dir}">
532                     <batchtest todir="${build.test.results.dir}">
533                         <fileset dir="${test.src.dir}" excludes="@{excludes},${excludes}" includes="@{includes}">
534                             <filename name="@{testincludes}"/>
535                         </fileset>
536                         <fileset dir="${build.test.classes.dir}" excludes="@{excludes},${excludes},${test.binaryexcludes}" includes="${test.binaryincludes}">
537                             <filename name="${test.binarytestincludes}"/>
538                         </fileset>
539                     </batchtest>
540                     <syspropertyset>
541                         <propertyref prefix="test-sys-prop."/>
542                         <mapper from="test-sys-prop.*" to="*" type="glob"/>
543                     </syspropertyset>
544                     <formatter type="brief" usefile="false"/>
545                     <formatter type="xml"/>
546                     <jvmarg value="-ea"/>
547                     <jvmarg line="${run.jvmargs.ide}"/>
548                     <jvmarg line="${debug-args-line}"/>
549                     <jvmarg value="-Xrunjdwp:transport=${debug-transport},address=${jpda.address}"/>
550                     <customize/>
551                 </junit>
552             </sequential>
553         </macrodef>
554     </target>
555     <target depends="-init-macrodef-junit-debug,-init-macrodef-junit-debug-batch" if="${junit.available}" name="-init-macrodef-junit-debug-impl">
556         <macrodef name="test-debug-impl" uri="http://www.netbeans.org/ns/j2ee-ejbjarproject/2">
557             <attribute default="${includes}" name="includes"/>
558             <attribute default="${excludes}" name="excludes"/>
559             <attribute default="**" name="testincludes"/>
560             <attribute default="" name="testmethods"/>
561             <element implicit="true" name="customize" optional="true"/>
562             <sequential>
563                 <ejbjarproject2:junit-debug excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}">
564                     <customize/>
565                 </ejbjarproject2:junit-debug>
566             </sequential>
567         </macrodef>
568     </target>
569     <target if="${testng.available}" name="-init-macrodef-testng-debug">
570         <macrodef name="testng-debug" uri="http://www.netbeans.org/ns/j2ee-ejbjarproject/2">
571             <attribute default="${main.class}" name="testClass"/>
572             <attribute default="" name="testMethod"/>
573             <element name="customize2" optional="true"/>
574             <sequential>
575                 <condition else="-testclass @{testClass}" property="test.class.or.method" value="-methods @{testClass}.@{testMethod}">
576                     <isset property="test.method"/>
577                 </condition>
578                 <condition else="-suitename jjobs-ejb -testname @{testClass} ${test.class.or.method}" property="testng.cmd.args" value="@{testClass}">
579                     <matches pattern=".*\.xml" string="@{testClass}"/>
580                 </condition>
581                 <delete dir="${build.test.results.dir}" quiet="true"/>
582                 <mkdir dir="${build.test.results.dir}"/>
583                 <ejbjarproject1:debug args="${testng.cmd.args}" classname="org.testng.TestNG" classpath="${debug.test.classpath}:${j2ee.platform.embeddableejb.classpath}">
584                     <customize>
585                         <customize2/>
586                         <jvmarg value="-ea"/>
587                         <arg line="${testng.debug.mode}"/>
588                         <arg line="-d ${build.test.results.dir}"/>
589                         <arg line="-listener org.testng.reporters.VerboseReporter"/>
590                     </customize>
591                 </ejbjarproject1:debug>
592             </sequential>
593         </macrodef>
594     </target>
595     <target depends="-init-macrodef-testng-debug" if="${testng.available}" name="-init-macrodef-testng-debug-impl">
596         <macrodef name="testng-debug-impl" uri="http://www.netbeans.org/ns/j2ee-ejbjarproject/2">
597             <attribute default="${main.class}" name="testClass"/>
598             <attribute default="" name="testMethod"/>
599             <element implicit="true" name="customize2" optional="true"/>
600             <sequential>
601                 <ejbjarproject2:testng-debug testClass="@{testClass}" testMethod="@{testMethod}">
602                     <customize2/>
603                 </ejbjarproject2:testng-debug>
604             </sequential>
605         </macrodef>
606     </target>
607     <target depends="-init-macrodef-junit-debug-impl" if="${junit.available}" name="-init-macrodef-test-debug-junit">
608         <macrodef name="test-debug" uri="http://www.netbeans.org/ns/j2ee-ejbjarproject/2">
609             <attribute default="${includes}" name="includes"/>
610             <attribute default="${excludes}" name="excludes"/>
611             <attribute default="**" name="testincludes"/>
612             <attribute default="" name="testmethods"/>
613             <attribute default="${main.class}" name="testClass"/>
614             <attribute default="" name="testMethod"/>
615             <sequential>
616                 <ejbjarproject2:test-debug-impl excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}">
617                     <customize>
618                         <classpath>
619                             <path path="${run.test.classpath}"/>
620                             <path path="${j2ee.platform.classpath}"/>
621                             <path path="${j2ee.platform.embeddableejb.classpath}"/>
622                         </classpath>
623                         <jvmarg line="${runmain.jvmargs}"/>
624                     </customize>
625                 </ejbjarproject2:test-debug-impl>
626             </sequential>
627         </macrodef>
628     </target>
629     <target depends="-init-macrodef-testng-debug-impl" if="${testng.available}" name="-init-macrodef-test-debug-testng">
630         <macrodef name="test-debug" uri="http://www.netbeans.org/ns/j2ee-ejbjarproject/2">
631             <attribute default="${includes}" name="includes"/>
632             <attribute default="${excludes}" name="excludes"/>
633             <attribute default="**" name="testincludes"/>
634             <attribute default="" name="testmethods"/>
635             <attribute default="${main.class}" name="testClass"/>
636             <attribute default="" name="testMethod"/>
637             <sequential>
638                 <ejbjarproject2:testng-debug-impl testClass="@{testClass}" testMethod="@{testMethod}">
639                     <customize2>
640                         <syspropertyset>
641                             <propertyref prefix="test-sys-prop."/>
642                             <mapper from="test-sys-prop.*" to="*" type="glob"/>
643                         </syspropertyset>
644                     </customize2>
645                 </ejbjarproject2:testng-debug-impl>
646             </sequential>
647         </macrodef>
648     </target>
649     <target depends="-init-macrodef-test-debug-junit,-init-macrodef-test-debug-testng" name="-init-macrodef-test-debug"/>
650     <target name="-init-macrodef-java">
651         <macrodef name="java" uri="http://www.netbeans.org/ns/j2ee-ejbjarproject/3">
652             <attribute default="${main.class}" name="classname"/>
653             <element name="customize" optional="true"/>
654             <sequential>
655                 <java classname="@{classname}" fork="true">
656                     <jvmarg line="${runmain.jvmargs}"/>
657                     <classpath>
658                         <path path="${build.classes.dir}:${javac.classpath}:${j2ee.platform.classpath}"/>
659                     </classpath>
660                     <syspropertyset>
661                         <propertyref prefix="run-sys-prop."/>
662                         <mapper from="run-sys-prop.*" to="*" type="glob"/>
663                     </syspropertyset>
664                     <customize/>
665                 </java>
666             </sequential>
667         </macrodef>
668     </target>
669     <target depends="-init-debug-args" name="-init-macrodef-nbjpda">
670         <macrodef name="nbjpdastart" uri="http://www.netbeans.org/ns/j2ee-ejbjarproject/1">
671             <attribute default="${main.class}" name="name"/>
672             <attribute default="${debug.classpath}" name="classpath"/>
673             <sequential>
674                 <nbjpdastart addressproperty="jpda.address" name="@{name}" transport="${debug-transport}">
675                     <classpath>
676                         <path path="@{classpath}"/>
677                     </classpath>
678                 </nbjpdastart>
679             </sequential>
680         </macrodef>
681         <macrodef name="nbjpdareload" uri="http://www.netbeans.org/ns/j2ee-ejbjarproject/1">
682             <attribute default="${build.classes.dir}" name="dir"/>
683             <sequential>
684                 <nbjpdareload>
685                     <fileset dir="@{dir}" includes="${fix.classes}">
686                         <include name="${fix.includes}*.class"/>
687                     </fileset>
688                 </nbjpdareload>
689             </sequential>
690         </macrodef>
691         <macrodef name="nbjpdaappreloaded" uri="http://www.netbeans.org/ns/j2ee-ejbjarproject/1">
692             <sequential>
693                 <nbjpdaappreloaded/>
694             </sequential>
695         </macrodef>
696     </target>
697     <target name="-init-debug-args">
698         <property name="version-output" value="java version &quot;${ant.java.version}"/>
699         <condition property="have-jdk-older-than-1.4">
700             <or>
701                 <contains string="${version-output}" substring="java version &quot;1.0"/>
702                 <contains string="${version-output}" substring="java version &quot;1.1"/>
703                 <contains string="${version-output}" substring="java version &quot;1.2"/>
704                 <contains string="${version-output}" substring="java version &quot;1.3"/>
705             </or>
706         </condition>
707         <condition else="-Xdebug" property="debug-args-line" value="-Xdebug -Xnoagent -Djava.compiler=none">
708             <istrue value="${have-jdk-older-than-1.4}"/>
709         </condition>
710         <condition else="dt_socket" property="debug-transport-by-os" value="dt_shmem">
711             <os family="windows"/>
712         </condition>
713         <condition else="${debug-transport-by-os}" property="debug-transport" value="${debug.transport}">
714             <isset property="debug.transport"/>
715         </condition>
716     </target>
717     <target depends="-init-debug-args" name="-init-macrodef-debug">
718         <macrodef name="debug" uri="http://www.netbeans.org/ns/j2ee-ejbjarproject/1">
719             <attribute default="${main.class}" name="classname"/>
720             <attribute default="${debug.classpath}" name="classpath"/>
721             <attribute default="${application.args}" name="args"/>
722             <element name="customize" optional="true"/>
723             <sequential>
724                 <java classname="@{classname}" fork="true">
725                     <jvmarg line="${debug-args-line}"/>
726                     <jvmarg value="-Xrunjdwp:transport=${debug-transport},address=${jpda.address}"/>
727                     <jvmarg line="${runmain.jvmargs}"/>
728                     <classpath>
729                         <path path="@{classpath}"/>
730                     </classpath>
731                     <arg line="@{args}"/>
732                     <customize/>
733                 </java>
734             </sequential>
735         </macrodef>
736     </target>
737     <target name="-init-taskdefs">
738         <fail unless="libs.CopyLibs.classpath">
739 The libs.CopyLibs.classpath property is not set up.
740 This property must point to 
741 org-netbeans-modules-java-j2seproject-copylibstask.jar file which is part
742 of NetBeans IDE installation and is usually located at 
743 &lt;netbeans_installation&gt;/java&lt;version&gt;/ant/extra folder.
744 Either open the project in the IDE and make sure CopyLibs library
745 exists or setup the property manually. For example like this:
746  ant -Dlibs.CopyLibs.classpath=a/path/to/org-netbeans-modules-java-j2seproject-copylibstask.jar
747                 </fail>
748         <taskdef classpath="${libs.CopyLibs.classpath}" resource="org/netbeans/modules/java/j2seproject/copylibstask/antlib.xml"/>
749     </target>
750     <target name="-init-ap-cmdline-properties">
751         <property name="annotation.processing.enabled" value="true"/>
752         <property name="annotation.processing.processors.list" value=""/>
753         <property name="annotation.processing.run.all.processors" value="true"/>
754         <property name="javac.processorpath" value="${javac.classpath}"/>
755         <property name="javac.test.processorpath" value="${javac.test.classpath}"/>
756         <condition property="ap.supported.internal" value="true">
757             <not>
758                 <matches pattern="1\.[0-5](\..*)?" string="${javac.source}"/>
759             </not>
760         </condition>
761     </target>
762     <target depends="-init-ap-cmdline-properties" if="ap.supported.internal" name="-init-ap-cmdline-supported">
763         <condition else="" property="ap.processors.internal" value="-processor ${annotation.processing.processors.list}">
764             <isfalse value="${annotation.processing.run.all.processors}"/>
765         </condition>
766         <condition else="" property="ap.proc.none.internal" value="-proc:none">
767             <isfalse value="${annotation.processing.enabled}"/>
768         </condition>
769     </target>
770     <target depends="-init-ap-cmdline-properties,-init-ap-cmdline-supported" name="-init-ap-cmdline">
771         <property name="ap.cmd.line.internal" value=""/>
772     </target>
773     <!--
774                 pre NB7.2 profiling section; consider it deprecated
775             -->
776     <target depends="-profile-pre-init, init, -profile-post-init, -profile-init-check" if="profiler.info.jvmargs.agent" name="profile-init"/>
777     <target if="profiler.info.jvmargs.agent" name="-profile-pre-init">
778         <!-- Empty placeholder for easier customization. -->
779         <!-- You can override this target in the ../build.xml file. -->
780     </target>
781     <target if="profiler.info.jvmargs.agent" name="-profile-post-init">
782         <!-- Empty placeholder for easier customization. -->
783         <!-- You can override this target in the ../build.xml file. -->
784     </target>
785     <target depends="-profile-pre-init, init, -profile-post-init" if="profiler.info.jvmargs.agent" name="-profile-init-check">
786         <fail unless="profiler.info.jvm">Must set JVM to use for profiling in profiler.info.jvm</fail>
787         <fail unless="profiler.info.jvmargs.agent">Must set profiler agent JVM arguments in profiler.info.jvmargs.agent</fail>
788     </target>
789     <!--
790                 end of pre NB7.2 profiling section
791             -->
792     <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"/>
793     <!--
794                 COMPILATION SECTION
795             -->
796     <target depends="init" if="no.dist.ear.dir" name="-deps-module-jar" unless="no.deps">
797         <ant antfile="${project.jjobs-lib}/build.xml" inheritall="false" target="jar">
798             <property name="deploy.on.save" value="false"/>
799         </ant>
800     </target>
801     <target depends="init" if="dist.ear.dir" name="-deps-ear-jar" unless="no.deps">
802         <ant antfile="${project.jjobs-lib}/build.xml" inheritall="false" target="jar">
803             <property name="deploy.on.save" value="false"/>
804         </ant>
805     </target>
806     <target depends="init, -deps-module-jar, -deps-ear-jar" name="deps-jar"/>
807     <target depends="init,deps-jar" name="-pre-pre-compile">
808         <mkdir dir="${build.classes.dir}"/>
809         <mkdir dir="${build.ear.classes.dir}"/>
810     </target>
811     <target name="-pre-compile">
812         <!-- Empty placeholder for easier customization. -->
813         <!-- You can override this target in the ../build.xml file. -->
814     </target>
815     <target depends="compile,-library-inclusion-in-archive-weblogic,-library-inclusion-in-archive-by-user" name="library-inclusion-in-archive"/>
816     <target if="is.jars.in.ejbjar" name="-library-inclusion-in-archive-by-user">
817         <copyfiles files="${reference.jjobs-lib.jar}" todir="${build.classes.dir}"/>
818     </target>
819     <target if="is.server.weblogic" name="-library-inclusion-in-archive-weblogic">
820         <basename file="${reference.jjobs-lib.jar}" property="manifest.reference.jjobs-lib.jar"/>
821         <manifest file="${build.ear.classes.dir}/META-INF/MANIFEST.MF" mode="update">
822             <attribute name="Extension-List" value="jar-1 "/>
823             <attribute name="jar-1-Extension-Name" value="${manifest.reference.jjobs-lib.jar}"/>
824         </manifest>
825     </target>
826     <target depends="compile" name="library-inclusion-in-manifest">
827         <copyfiles files="${reference.jjobs-lib.jar}" todir="${dist.ear.dir}/lib"/>
828         <manifest file="${build.ear.classes.dir}/META-INF/MANIFEST.MF" mode="update"/>
829     </target>
830     <target name="-copy-meta-inf">
831         <copy todir="${classes.dir}">
832             <fileset dir="${meta.inf}" includes="**/*.dbschema"/>
833         </copy>
834         <copy todir="${classes.dir}/META-INF">
835             <fileset dir="${meta.inf}" excludes="**/*.dbschema **/xml-resources/** ${meta.inf.excludes}"/>
836         </copy>
837     </target>
838     <target depends="init,deps-jar,-pre-pre-compile,-pre-compile,-copy-meta-inf" if="have.sources" name="-do-compile">
839         <ejbjarproject2:javac destdir="${classes.dir}" gensrcdir="${build.generated.sources.dir}"/>
840         <copy todir="${classes.dir}">
841             <fileset dir="${src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
842         </copy>
843     </target>
844     <target name="-post-compile">
845         <!-- Empty placeholder for easier customization. -->
846         <!-- You can override this target in the ../build.xml file. -->
847     </target>
848     <target depends="init,deps-jar,-pre-pre-compile,-pre-compile,-do-compile,-post-compile" description="Compile project." name="compile"/>
849     <target name="-pre-compile-single">
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" name="-do-compile-single">
854         <fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail>
855         <ejbjarproject2:javac excludes="" gensrcdir="${build.generated.sources.dir}" includes="${javac.includes}"/>
856     </target>
857     <target name="-post-compile-single">
858         <!-- Empty placeholder for easier customization. -->
859         <!-- You can override this target in the ../build.xml file. -->
860     </target>
861     <target depends="init,deps-jar,-pre-pre-compile,-pre-compile-single,-do-compile-single,-post-compile-single" name="compile-single"/>
862     <!--
863                 DIST BUILDING SECTION
864             -->
865     <target name="-pre-dist">
866         <!-- Empty placeholder for easier customization. -->
867         <!-- You can override this target in the ../build.xml file. -->
868     </target>
869     <target depends="init,compile,-pre-dist,library-inclusion-in-archive" if="has.custom.manifest" name="-do-dist-with-manifest">
870         <dirname file="${dist.jar}" property="dist.jar.dir"/>
871         <mkdir dir="${dist.jar.dir}"/>
872         <jar compress="${jar.compress}" jarfile="${dist.jar}" manifest="${build.classes.dir}/META-INF/MANIFEST.MF">
873             <fileset dir="${build.classes.dir}"/>
874         </jar>
875     </target>
876     <target depends="init,compile,-pre-dist,library-inclusion-in-archive" name="-do-dist-without-manifest" unless="has.custom.manifest">
877         <dirname file="${dist.jar}" property="dist.jar.dir"/>
878         <mkdir dir="${dist.jar.dir}"/>
879         <jar compress="${jar.compress}" jarfile="${dist.jar}">
880             <fileset dir="${build.classes.dir}"/>
881         </jar>
882     </target>
883     <!--
884                 TARGETS NEEDED TO SUPPORT DIRECTORY DEPLOYMENT
885             -->
886     <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">
887         <dirname file="${dist.jar}" property="dist.jar.dir"/>
888         <mkdir dir="${dist.jar.dir}"/>
889         <jar compress="${jar.compress}" jarfile="${dist.jar}" manifest="${build.classes.dir}/META-INF/MANIFEST.MF">
890             <fileset dir="${build.classes.dir}"/>
891         </jar>
892     </target>
893     <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">
894         <dirname file="${dist.jar}" property="dist.jar.dir"/>
895         <mkdir dir="${dist.jar.dir}"/>
896         <jar compress="${jar.compress}" jarfile="${dist.jar}">
897             <fileset dir="${build.classes.dir}"/>
898         </jar>
899     </target>
900     <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"/>
901     <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"/>
902     <!--
903                 END TARGETS NEEDED TO SUPPORT DIRECTORY DEPLOYMENT
904             -->
905     <target depends="init,compile,-pre-dist,library-inclusion-in-archive, -do-dist-without-manifest, -do-dist-with-manifest" name="-do-dist"/>
906     <target depends="init,compile,-pre-dist,library-inclusion-in-manifest" name="-do-ear-dist">
907         <dirname file="${dist.ear.jar}" property="dist.jar.dir"/>
908         <mkdir dir="${dist.jar.dir}"/>
909         <jar compress="${jar.compress}" jarfile="${dist.ear.jar}" manifest="${build.ear.classes.dir}/META-INF/MANIFEST.MF">
910             <fileset dir="${build.ear.classes.dir}"/>
911         </jar>
912     </target>
913     <target name="-post-dist">
914         <!-- Empty placeholder for easier customization. -->
915         <!-- You can override this target in the ../build.xml file. -->
916     </target>
917     <target depends="init,compile,-pre-dist,-do-dist,-post-dist" description="Build distribution (JAR)." name="dist"/>
918     <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"/>
919     <!--
920                 EXECUTION SECTION
921             -->
922     <target depends="run-deploy" description="Deploy to server." name="run"/>
923     <target name="-init-deploy">
924         <property name="include.jar.manifest" value=""/>
925     </target>
926     <target name="pre-run-deploy">
927         <!-- Empty placeholder for easier customization. -->
928         <!-- You can override this target in the ../build.xml file. -->
929     </target>
930     <target name="post-run-deploy">
931         <!-- Empty placeholder for easier customization. -->
932         <!-- You can override this target in the ../build.xml file. -->
933     </target>
934     <target name="-pre-nbmodule-run-deploy">
935         <!-- Empty placeholder for easier customization. -->
936         <!-- This target can be overriden by NetBeans modules. Don't override it directly, use -pre-run-deploy task instead. -->
937     </target>
938     <target name="-post-nbmodule-run-deploy">
939         <!-- Empty placeholder for easier customization. -->
940         <!-- This target can be overriden by NetBeans modules. Don't override it directly, use -post-run-deploy task instead. -->
941     </target>
942     <target name="-run-deploy-am">
943         <!-- Task to deploy to the Access Manager runtime. -->
944     </target>
945     <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"/>
946     <target if="netbeans.home" name="-run-deploy-nb">
947         <nbdeploy debugmode="false" forceRedeploy="${forceRedeploy}"/>
948     </target>
949     <target name="-init-deploy-ant" unless="netbeans.home">
950         <property name="deploy.ant.archive" value="${dist.jar}"/>
951         <property name="deploy.ant.resource.dir" value="${resource.dir}"/>
952         <property name="deploy.ant.enabled" value="true"/>
953     </target>
954     <target depends="dist,-run-undeploy-nb,-init-deploy-ant,-undeploy-ant" name="run-undeploy"/>
955     <target if="netbeans.home" name="-run-undeploy-nb">
956         <fail message="Undeploy is not supported from within the IDE"/>
957     </target>
958     <target depends="dist" name="verify">
959         <nbverify file="${dist.jar}"/>
960     </target>
961     <target depends="init,compile-single" name="run-main">
962         <fail unless="run.class">Must select one file in the IDE or set run.class</fail>
963         <ejbjarproject3:java classname="${run.class}"/>
964     </target>
965     <target depends="init" if="netbeans.home" name="-do-update-breakpoints">
966         <ejbjarproject1:nbjpdaappreloaded/>
967     </target>
968     <!--
969                 DEBUGGING SECTION
970             -->
971     <target depends="init,compile,dist-directory-deploy" description="Debug project in IDE." if="netbeans.home" name="debug">
972         <nbdeploy debugmode="true"/>
973         <antcall target="connect-debugger"/>
974     </target>
975     <target name="connect-debugger" unless="is.debugged">
976         <condition property="listeningcp" value="sourcepath">
977             <istrue value="${j2ee.compile.on.save}"/>
978         </condition>
979         <nbjpdaconnect address="${jpda.address}" host="${jpda.host}" listeningcp="${listeningcp}" name="${name}" transport="${jpda.transport}">
980             <classpath>
981                 <path path="${debug.classpath}"/>
982             </classpath>
983             <sourcepath>
984                 <path path="${web.docbase.dir}"/>
985             </sourcepath>
986         </nbjpdaconnect>
987     </target>
988     <target depends="init" if="netbeans.home" name="-debug-start-debugger">
989         <ejbjarproject1:nbjpdastart/>
990     </target>
991     <target depends="init,compile-single" if="netbeans.home" name="-debug-start-debuggee-single">
992         <fail unless="main.class">Must select one file in the IDE or set main.class</fail>
993         <ejbjarproject1:debug/>
994     </target>
995     <target depends="init,compile-single,-debug-start-debugger,-debug-start-debuggee-single" if="netbeans.home" name="debug-single-main"/>
996     <target depends="init" name="-pre-debug-fix">
997         <fail unless="fix.includes">Must set fix.includes</fail>
998         <property name="javac.includes" value="${fix.includes}.java"/>
999     </target>
1000     <target depends="init,-pre-debug-fix,compile-single" if="netbeans.home" name="-do-debug-fix">
1001         <ejbjarproject1:nbjpdareload/>
1002     </target>
1003     <target depends="init,-pre-debug-fix,-do-debug-fix" if="netbeans.home" name="debug-fix"/>
1004     <!--
1005             =================
1006             PROFILING SECTION
1007             =================
1008             -->
1009     <!--
1010                 pre NB7.2 profiling section; consider it deprecated
1011             -->
1012     <target description="Profile a J2EE project in the IDE." if="profiler.info.jvmargs.agent" name="-profile-pre72">
1013         <fail unless="netbeans.home">This target only works when run from inside the NetBeans IDE.</fail>
1014         <condition else="start-profiled-server" property="profiler.startserver.target" value="start-profiled-server-extraargs">
1015             <isset property="profiler.info.jvmargs.extra"/>
1016         </condition>
1017         <antcall target="${profiler.startserver.target}"/>
1018         <antcall target="run"/>
1019         <antcall target="-profile-start-loadgen"/>
1020     </target>
1021     <target depends="profile-init,compile-test-single" if="profiler.info.jvmargs.agent" name="-profile-test-single-pre72">
1022         <fail unless="netbeans.home">This target only works when run from inside the NetBeans IDE.</fail>
1023         <nbprofiledirect>
1024             <classpath>
1025                 <path path="${run.test.classpath}"/>
1026                 <path path="${j2ee.platform.classpath}"/>
1027             </classpath>
1028         </nbprofiledirect>
1029         <junit dir="${profiler.info.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" jvm="${profiler.info.jvm}" showoutput="true">
1030             <env key="${profiler.info.pathvar}" path="${profiler.info.agentpath}:${profiler.current.path}"/>
1031             <jvmarg value="${profiler.info.jvmargs.agent}"/>
1032             <jvmarg line="${profiler.info.jvmargs}"/>
1033             <test name="${profile.class}"/>
1034             <classpath>
1035                 <path path="${run.test.classpath}"/>
1036                 <path path="${j2ee.platform.classpath}"/>
1037             </classpath>
1038             <syspropertyset>
1039                 <propertyref prefix="test-sys-prop."/>
1040                 <mapper from="test-sys-prop.*" to="*" type="glob"/>
1041             </syspropertyset>
1042             <formatter type="brief" usefile="false"/>
1043             <formatter type="xml"/>
1044         </junit>
1045     </target>
1046     <target name="start-profiled-server">
1047         <nbstartprofiledserver forceRestart="${profiler.j2ee.serverForceRestart}" javaPlatform="${profiler.info.javaPlatform}" startupTimeout="${profiler.j2ee.serverStartupTimeout}">
1048             <jvmarg value="${profiler.info.jvmargs.agent}"/>
1049             <jvmarg value="${profiler.j2ee.agentID}"/>
1050         </nbstartprofiledserver>
1051     </target>
1052     <target name="start-profiled-server-extraargs">
1053         <nbstartprofiledserver forceRestart="${profiler.j2ee.serverForceRestart}" javaPlatform="${profiler.info.javaPlatform}" startupTimeout="${profiler.j2ee.serverStartupTimeout}">
1054             <jvmarg value="${profiler.info.jvmargs.extra}"/>
1055             <jvmarg value="${profiler.info.jvmargs.agent}"/>
1056             <jvmarg value="${profiler.j2ee.agentID}"/>
1057         </nbstartprofiledserver>
1058     </target>
1059     <!--
1060                 end of pre NB7.2 profiling section
1061             -->
1062     <target if="netbeans.home" name="-profile-check">
1063         <condition property="profiler.configured">
1064             <or>
1065                 <contains casesensitive="true" string="${run.jvmargs.ide}" substring="-agentpath:"/>
1066                 <contains casesensitive="true" string="${run.jvmargs.ide}" substring="-javaagent:"/>
1067             </or>
1068         </condition>
1069     </target>
1070     <target depends="init,compile,dist-directory-deploy" name="-do-profile">
1071         <startprofiler/>
1072         <nbstartserver profilemode="true"/>
1073         <nbdeploy clientUrlPart="$" forceRedeploy="true" profilemode="true"/>
1074         <antcall target="-profile-start-loadgen"/>
1075     </target>
1076     <target depends="-profile-check,-profile-pre72" description="Profile a J2EE project in the IDE." if="profiler.configured" name="profile" unless="profiler.info.jvmargs.agent">
1077         <antcall target="-do-profile"/>
1078     </target>
1079     <target depends="-profile-test-single-pre72" name="profile-test-single"/>
1080     <target depends="-profile-check" if="profiler.configured" name="profile-test" unless="profiler.info.jvmargs.agent">
1081         <startprofiler/>
1082         <antcall target="test-single"/>
1083     </target>
1084     <target if="profiler.loadgen.path" name="-profile-start-loadgen">
1085         <loadgenstart path="${profiler.loadgen.path}"/>
1086     </target>
1087     <!--
1088                 JAVADOC SECTION
1089             -->
1090     <target depends="init" if="have.sources" name="javadoc-build">
1091         <mkdir dir="${dist.javadoc.dir}"/>
1092         <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}">
1093             <classpath>
1094                 <path path="${javac.classpath}:${j2ee.platform.classpath}"/>
1095             </classpath>
1096             <fileset dir="${src.dir}" excludes="${excludes}" includes="${includes}">
1097                 <filename name="**/*.java"/>
1098             </fileset>
1099             <fileset dir="${build.generated.sources.dir}" erroronmissingdir="false">
1100                 <include name="**/*.java"/>
1101             </fileset>
1102         </javadoc>
1103         <copy todir="${dist.javadoc.dir}">
1104             <fileset dir="${src.dir}" excludes="${excludes}" includes="${includes}">
1105                 <filename name="**/doc-files/**"/>
1106             </fileset>
1107             <fileset dir="${build.generated.sources.dir}" erroronmissingdir="false">
1108                 <include name="**/doc-files/**"/>
1109             </fileset>
1110         </copy>
1111     </target>
1112     <target depends="init,javadoc-build" if="netbeans.home" name="javadoc-browse" unless="no.javadoc.preview">
1113         <nbbrowse file="${dist.javadoc.dir}/index.html"/>
1114     </target>
1115     <target depends="init,javadoc-build,javadoc-browse" description="Build Javadoc." name="javadoc"/>
1116     <!--
1117                 TEST COMPILATION SECTION
1118             -->
1119     <target depends="init,compile" if="have.tests" name="-pre-pre-compile-test">
1120         <mkdir dir="${build.test.classes.dir}"/>
1121         <property name="j2ee.platform.embeddableejb.classpath" value=""/>
1122     </target>
1123     <target name="-pre-compile-test">
1124         <!-- Empty placeholder for easier customization. -->
1125         <!-- You can override this target in the ../build.xml file. -->
1126     </target>
1127     <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test" if="have.tests" name="-do-compile-test">
1128         <ejbjarproject2:javac classpath="${javac.test.classpath}:${j2ee.platform.classpath}:${j2ee.platform.embeddableejb.classpath}" debug="true" destdir="${build.test.classes.dir}" srcdir="${test.src.dir}"/>
1129         <copy todir="${build.test.classes.dir}">
1130             <fileset dir="${test.src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
1131         </copy>
1132     </target>
1133     <target name="-post-compile-test">
1134         <!-- Empty placeholder for easier customization. -->
1135         <!-- You can override this target in the ../build.xml file. -->
1136     </target>
1137     <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test,-do-compile-test,-post-compile-test" name="compile-test"/>
1138     <target name="-pre-compile-test-single">
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-single" if="have.tests" name="-do-compile-test-single">
1143         <fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail>
1144         <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}"/>
1145     </target>
1146     <target name="-post-compile-test-single">
1147         <!-- Empty placeholder for easier customization. -->
1148         <!-- You can override this target in the ../build.xml file. -->
1149     </target>
1150     <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test-single,-do-compile-test-single,-post-compile-test-single" name="compile-test-single"/>
1151     <!--
1152                 TEST EXECUTION SECTION
1153             -->
1154     <target depends="init" if="have.tests" name="-pre-test-run">
1155         <mkdir dir="${build.test.results.dir}"/>
1156     </target>
1157     <target depends="init,compile-test,-pre-test-run" if="have.tests" name="-do-test-run">
1158         <ejbjarproject2:test includes="${includes}" testincludes="**/*Test.java"/>
1159     </target>
1160     <target depends="init,compile-test,-pre-test-run,-do-test-run" if="have.tests" name="-post-test-run">
1161         <fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail>
1162     </target>
1163     <target depends="init" if="have.tests" name="test-report"/>
1164     <target depends="init" if="netbeans.home+have.tests" name="-test-browse"/>
1165     <target depends="init,compile-test,-pre-test-run,-do-test-run,test-report,-post-test-run,-test-browse" description="Run unit tests." name="test"/>
1166     <target depends="init" if="have.tests" name="-pre-test-run-single">
1167         <mkdir dir="${build.test.results.dir}"/>
1168     </target>
1169     <target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-do-test-run-single">
1170         <fail unless="test.includes">Must select some files in the IDE or set test.includes</fail>
1171         <ejbjarproject2:test excludes="" includes="${test.includes}" testincludes="${test.includes}"/>
1172     </target>
1173     <target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single" if="have.tests" name="-post-test-run-single">
1174         <fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail>
1175     </target>
1176     <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"/>
1177     <target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-do-test-run-single-method">
1178         <fail unless="test.class">Must select some files in the IDE or set test.class</fail>
1179         <fail unless="test.method">Must select some method in the IDE or set test.method</fail>
1180         <ejbjarproject2:test excludes="" includes="${javac.includes}" testincludes="${test.class}" testmethods="${test.method}"/>
1181     </target>
1182     <target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single-method" if="have.tests" name="-post-test-run-single-method">
1183         <fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail>
1184     </target>
1185     <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"/>
1186     <!--
1187                 TEST DEBUGGING SECTION
1188             -->
1189     <target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-debug-start-debuggee-test">
1190         <fail unless="test.class">Must select one file in the IDE or set test.class</fail>
1191         <ejbjarproject2:test-debug excludes="" includes="${javac.includes}" testClass="${test.class}" testincludes="${javac.includes}"/>
1192     </target>
1193     <target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-debug-start-debuggee-test-method">
1194         <fail unless="test.class">Must select one file in the IDE or set test.class</fail>
1195         <fail unless="test.method">Must select some method in the IDE or set test.method</fail>
1196         <ejbjarproject2:test-debug excludes="" includes="${javac.includes}" testClass="${test.class}" testMethod="${test.method}" testincludes="${test.class}" testmethods="${test.method}"/>
1197     </target>
1198     <target depends="init,compile-test" if="netbeans.home+have.tests" name="-debug-start-debugger-test">
1199         <ejbjarproject1:nbjpdastart classpath="${debug.test.classpath}" name="${test.class}"/>
1200     </target>
1201     <target depends="init,compile-test,-debug-start-debugger-test,-debug-start-debuggee-test" name="debug-test"/>
1202     <target depends="init,compile-test-single,-debug-start-debugger-test,-debug-start-debuggee-test-method" name="debug-test-method"/>
1203     <target depends="init,-pre-debug-fix,compile-test-single" if="netbeans.home" name="-do-debug-fix-test">
1204         <ejbjarproject1:nbjpdareload dir="${build.test.classes.dir}"/>
1205     </target>
1206     <target depends="init,-pre-debug-fix,-do-debug-fix-test" if="netbeans.home" name="debug-fix-test"/>
1207     <!--
1208                 CLEANUP SECTION
1209             -->
1210     <target depends="init" name="deps-clean" unless="no.deps">
1211         <ant antfile="${project.jjobs-lib}/build.xml" inheritall="false" target="clean"/>
1212     </target>
1213     <target depends="init" name="-do-clean">
1214         <delete dir="${build.dir}"/>
1215         <delete dir="${dist.dir}"/>
1216     </target>
1217     <target name="-post-clean">
1218         <!-- Empty placeholder for easier customization. -->
1219         <!-- You can override this target in the ../build.xml file. -->
1220     </target>
1221     <target depends="init" if="netbeans.home" name="undeploy-clean">
1222         <nbundeploy failOnError="false" startServer="false"/>
1223     </target>
1224     <target depends="init,undeploy-clean,deps-clean,-do-clean,-post-clean" description="Clean build products." name="clean"/>
1225     <target depends="clean" name="clean-ear"/>
1226 </project>