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