Remove some internal dumps.
[panamaz] / 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   - jar
12   - execution
13   - debugging
14   - javadoc
15   - test compilation
16   - test execution
17   - test debugging
18   - applet
19   - cleanup
20
21         -->
22 <project xmlns:if="ant:if" xmlns:unless="ant:unless" basedir=".." default="default" name="panamaz-impl">
23     <fail message="Please build using Ant 1.9.7 or higher.">
24         <condition>
25             <not>
26                 <antversion atleast="1.9.7"/>
27             </not>
28         </condition>
29     </fail>
30     <target depends="test,jar,javadoc" description="Build and test whole project." name="default"/>
31     <!-- 
32                 ======================
33                 INITIALIZATION SECTION 
34                 ======================
35             -->
36     <target name="-pre-init">
37         <!-- Empty placeholder for easier customization. -->
38         <!-- You can override this target in the ../build.xml file. -->
39     </target>
40     <target depends="-pre-init" name="-init-private">
41         <property file="nbproject/private/config.properties"/>
42         <property file="nbproject/private/configs/${config}.properties"/>
43         <property file="nbproject/private/private.properties"/>
44     </target>
45     <target depends="-pre-init,-init-private" name="-init-user">
46         <property file="${user.properties.file}"/>
47         <!-- The two properties below are usually overridden -->
48         <!-- by the active platform. Just a fallback. -->
49         <property name="default.javac.source" value="9"/>
50         <property name="default.javac.target" value="9"/>
51     </target>
52     <target depends="-pre-init,-init-private,-init-user" name="-init-pre-project">
53         <property file="nbproject/configs/${config}.properties"/>
54         <property file="nbproject/project.properties"/>
55         <property name="netbeans.modular.tasks.version" value="1"/>
56         <property location="${build.dir}/tasks/${netbeans.modular.tasks.version}" name="netbeans.modular.tasks.dir"/>
57     </target>
58     <target depends="-init-pre-project" name="-check-netbeans-tasks">
59         <condition property="netbeans.tasks.compiled">
60             <available file="${netbeans.modular.tasks.dir}/out/netbeans/ModuleInfoSelector.class"/>
61         </condition>
62     </target>
63     <target depends="-init-pre-project,-check-netbeans-tasks" name="-init-compile-netbeans-tasks" unless="netbeans.tasks.compiled">
64         <echo file="${netbeans.modular.tasks.dir}/src/netbeans/CoalesceKeyvalue.java">
65
66 package netbeans;
67
68 import java.util.ArrayList;
69 import java.util.HashMap;
70 import java.util.List;
71 import java.util.Map;
72 import java.util.regex.Pattern;
73 import java.util.stream.Collectors;
74 import org.apache.tools.ant.BuildException;
75 import org.apache.tools.ant.Task;
76
77 public class CoalesceKeyvalue extends Task {
78     private String property;
79
80     public void setProperty(String property) {
81         this.property = property;
82     }
83
84     private String value;
85
86     public void setValue(String value) {
87         this.value = value;
88     }
89
90     private String valueSep;
91
92     public void setValueSep(String valueSep) {
93         this.valueSep = valueSep;
94     }
95
96     private String entrySep;
97
98     public void setEntrySep(String entrySep) {
99         this.entrySep = entrySep;
100     }
101
102     private String multiSep;
103
104     public void setMultiSep(String multiSep) {
105         this.multiSep = multiSep;
106     }
107
108     private String outSep;
109
110     public void setOutSep(String outSep) {
111         this.outSep = outSep;
112     }
113
114     @Override
115     public void execute() throws BuildException {
116         List&lt;String&gt; result = new ArrayList&lt;&gt;();
117         Map&lt;String, List&lt;String&gt;&gt; module2Paths = new HashMap&lt;&gt;();
118
119         for (String entry : value.split(Pattern.quote(entrySep))) {
120             String[] keyValue = entry.split(Pattern.quote(valueSep), 2);
121             if (keyValue.length == 1) {
122                 result.add(keyValue[0]);
123             } else {
124                 module2Paths.computeIfAbsent(keyValue[0], s -&gt; new ArrayList&lt;&gt;())
125                             .add(keyValue[1].trim());
126             }
127         }
128         module2Paths.entrySet()
129                     .stream()
130                     .forEach(e -&gt; result.add(e.getKey() + valueSep + e.getValue().stream().collect(Collectors.joining(multiSep))));
131         getProject().setProperty(property, result.stream().collect(Collectors.joining(" " + entrySep)));
132     }
133
134 }
135
136                 </echo>
137         <echo file="${netbeans.modular.tasks.dir}/src/netbeans/ModsourceRegexp.java">
138             
139 package netbeans;
140
141 import java.util.ArrayList;
142 import java.util.List;
143 import java.util.Objects;
144 import java.util.stream.Collectors;
145 import org.apache.tools.ant.BuildException;
146 import org.apache.tools.ant.Task;
147
148 public class ModsourceRegexp extends Task {
149     private String property;
150
151     public void setProperty(String property) {
152         this.property = property;
153     }
154
155     private String filePattern;
156
157     public void setFilePattern(String filePattern) {
158         this.filePattern = filePattern;
159     }
160
161     private String modsource;
162
163     public void setModsource(String modsource) {
164         this.modsource = modsource;
165     }
166
167     private List&lt;String&gt; expandGroup(String grp) {
168         List&lt;String&gt; exp = new ArrayList&lt;&gt;();
169         String item = "";
170         int depth = 0;
171
172         for (int i = 0; i &lt; grp.length(); i++) {
173             char c = grp.charAt(i);
174             switch (c) {
175                 case '{':
176                     if (depth++ == 0) {
177                         continue;
178                     }
179                     break;
180                 case '}':
181                     if (--depth == 0) {
182                         exp.add(item);
183                         continue;
184                     }
185                     break;
186                 case ',':
187                     if (depth == 1) {
188                         exp.add(item);
189                         item = "";
190                         continue;
191                     }
192                 default:
193                     break;
194             }
195             item = item + c;
196         }
197         return exp;
198     }
199
200     private List&lt;String&gt; pathVariants(String spec) {
201         return pathVariants(spec, new ArrayList&lt;&gt;());
202     }
203
204     private List&lt;String&gt; pathVariants(String spec, List&lt;String&gt; res) {
205         int start  = spec.indexOf('{');
206         if (start == -1) {
207             res.add(spec);
208             return res;
209         }
210         int depth = 1;
211         int end;
212         for (end = start + 1; end &lt; spec.length() &amp;&amp; depth &gt; 0; end++) {
213             char c = spec.charAt(end);
214             switch (c) {
215                 case '{': depth++; break;
216                 case '}': depth--; break;
217             }
218         }
219         String prefix = spec.substring(0, start);
220         String suffix = spec.substring(end);
221         expandGroup(spec.substring(start, end)).stream().forEach(item -&gt; {
222             pathVariants(prefix + item + suffix, res);
223         });
224         return res;
225     }
226
227     private String toRegexp2(String spec, String filepattern, String separator) {
228         List&lt;String&gt; prefixes = new ArrayList&lt;&gt;();
229         List&lt;String&gt; suffixes = new ArrayList&lt;&gt;();
230         pathVariants(spec).forEach(item -&gt; {
231             suffixes.add(item);
232         });
233         String tail = "";
234         String separatorString = separator;
235         if ("\\".equals(separatorString)) {
236             separatorString = "\\\\";
237         }
238         if (filepattern != null &amp;&amp; !Objects.equals(filepattern, tail)) {
239             tail = separatorString + filepattern;
240         }
241         return "([^" + separatorString +"]+)\\Q" + separator + "\\E(" + suffixes.stream().collect(Collectors.joining("|")) + ")" + tail;
242     }
243
244     @Override
245     public void execute() throws BuildException {
246         getProject().setProperty(property, toRegexp2(modsource, filePattern, getProject().getProperty("file.separator")));
247     }
248
249 }
250
251                 </echo>
252         <echo file="${netbeans.modular.tasks.dir}/src/netbeans/ModuleInfoSelector.java">
253             
254 package netbeans;
255
256 import java.io.File;
257 import java.util.Arrays;
258 import org.apache.tools.ant.BuildException;
259 import org.apache.tools.ant.types.selectors.BaseExtendSelector;
260
261 public class ModuleInfoSelector extends BaseExtendSelector {
262
263     @Override
264     public boolean isSelected(File basedir, String filename, File file) throws BuildException {
265         String extension = Arrays.stream(getParameters())
266                                  .filter(p -&gt; "extension".equals(p.getName()))
267                                  .map(p -&gt; p.getValue())
268                                  .findAny()
269                                  .get();
270         return !new File(file, "module-info." + extension).exists();
271     }
272
273 }
274
275                 </echo>
276         <mkdir dir="${netbeans.modular.tasks.dir}/out"/>
277         <javac classpath="${ant.core.lib}" destdir="${netbeans.modular.tasks.dir}/out" srcdir="${netbeans.modular.tasks.dir}/src"/>
278     </target>
279     <target depends="-init-pre-project,-init-compile-netbeans-tasks" name="-init-project">
280         <taskdef classname="netbeans.CoalesceKeyvalue" classpath="${netbeans.modular.tasks.dir}/out" name="coalesce_keyvalue" uri="http://www.netbeans.org/ns/j2se-modular-project/1"/>
281         <taskdef classname="netbeans.ModsourceRegexp" classpath="${netbeans.modular.tasks.dir}/out" name="modsource_regexp" uri="http://www.netbeans.org/ns/j2se-modular-project/1"/>
282     </target>
283     <target name="-init-source-module-properties">
284         <property name="javac.modulepath" value=""/>
285         <property name="run.modulepath" value="${javac.modulepath}:${build.modules.dir}"/>
286         <property name="debug.modulepath" value="${run.modulepath}"/>
287         <property name="javac.upgrademodulepath" value=""/>
288         <property name="run.upgrademodulepath" value="${javac.upgrademodulepath}"/>
289         <condition else="" property="javac.systemmodulepath.cmd.line.arg" value="-system '${javac.systemmodulepath}'">
290             <and>
291                 <isset property="javac.systemmodulepath"/>
292                 <length length="0" string="${javac.systemmodulepath}" when="greater"/>
293             </and>
294         </condition>
295         <property name="dist.jlink.dir" value="${dist.dir}/jlink"/>
296         <property name="dist.jlink.output" value="${dist.jlink.dir}/${application.title}"/>
297     </target>
298     <target depends="-pre-init,-init-private,-init-user,-init-project,-init-macrodef-property" name="-do-init">
299         <property name="platform.java" value="${java.home}/bin/java"/>
300         <j2semodularproject1:modsource_regexp xmlns:j2semodularproject1="http://www.netbeans.org/ns/j2se-modular-project/1" modsource="${test.src.dir.path}" property="have.tests.test.src.dir.regexp"/>
301         <dirset dir="${basedir}/${test.src.dir}" id="have.tests.test.src.dir.set" includes="*/*">
302             <filename regex="${have.tests.test.src.dir.regexp}"/>
303         </dirset>
304         <union id="have.tests.set">
305             <dirset refid="have.tests.test.src.dir.set"/>
306         </union>
307         <condition property="have.tests">
308             <or>
309                 <resourcecount count="0" when="greater">
310                     <union refid="have.tests.set"/>
311                 </resourcecount>
312             </or>
313         </condition>
314         <j2semodularproject1:modsource_regexp xmlns:j2semodularproject1="http://www.netbeans.org/ns/j2se-modular-project/1" modsource="${test.src.dir.path}" property="have.tests.test.src.dir.regexp"/>
315         <dirset dir="${basedir}/${test.src.dir}" id="have.tests.test.src.dir.patchset" includes="*/*">
316             <filename regex="${have.tests.test.src.dir.regexp}"/>
317         </dirset>
318         <union id="have.tests.patchset">
319             <dirset refid="have.tests.test.src.dir.patchset"/>
320         </union>
321         <j2semodularproject1:modsource_regexp xmlns:j2semodularproject1="http://www.netbeans.org/ns/j2se-modular-project/1" modsource="${src.dir.path}" property="have.sources.src.dir.regexp"/>
322         <dirset dir="${basedir}/${src.dir}" id="have.sources.src.dir.set" includes="*/*">
323             <filename regex="${have.sources.src.dir.regexp}"/>
324         </dirset>
325         <j2semodularproject1:modsource_regexp xmlns:j2semodularproject1="http://www.netbeans.org/ns/j2se-modular-project/1" modsource="${src.gen.dir.path}" property="have.sources.src.gen.dir.regexp"/>
326         <dirset dir="${basedir}/${src.gen.dir}" id="have.sources.src.gen.dir.set" includes="*/*">
327             <filename regex="${have.sources.src.gen.dir.regexp}"/>
328         </dirset>
329         <union id="have.sources.set">
330             <dirset refid="have.sources.src.dir.set"/>
331             <dirset refid="have.sources.src.gen.dir.set"/>
332         </union>
333         <condition property="have.sources">
334             <or>
335                 <resourcecount count="0" when="greater">
336                     <union refid="have.sources.set"/>
337                 </resourcecount>
338                 <resourcecount count="0" when="greater">
339                     <union refid="have.sources.set"/>
340                 </resourcecount>
341             </or>
342         </condition>
343         <condition property="main.class.available">
344             <and>
345                 <isset property="main.class"/>
346                 <not>
347                     <equals arg1="${main.class}" arg2="" trim="true"/>
348                 </not>
349             </and>
350         </condition>
351         <condition property="netbeans.home+have.tests">
352             <and>
353                 <isset property="netbeans.home"/>
354                 <isset property="have.tests"/>
355             </and>
356         </condition>
357         <condition property="no.javadoc.preview">
358             <and>
359                 <isset property="javadoc.preview"/>
360                 <isfalse value="${javadoc.preview}"/>
361             </and>
362         </condition>
363         <condition property="do.archive">
364             <or>
365                 <not>
366                     <istrue value="${jar.archive.disabled}"/>
367                 </not>
368                 <istrue value="${not.archive.disabled}"/>
369             </or>
370         </condition>
371         <property name="run.jvmargs" value=""/>
372         <property name="run.jvmargs.ide" value=""/>
373         <property name="javac.compilerargs" value=""/>
374         <property name="work.dir" value="${basedir}"/>
375         <condition property="no.deps">
376             <and>
377                 <istrue value="${no.dependencies}"/>
378             </and>
379         </condition>
380         <property name="javac.debug" value="true"/>
381         <property name="javadoc.preview" value="true"/>
382         <property name="application.args" value=""/>
383         <property name="source.encoding" value="${file.encoding}"/>
384         <property name="runtime.encoding" value="${source.encoding}"/>
385         <condition property="javadoc.encoding.used" value="${javadoc.encoding}">
386             <and>
387                 <isset property="javadoc.encoding"/>
388                 <not>
389                     <equals arg1="${javadoc.encoding}" arg2=""/>
390                 </not>
391             </and>
392         </condition>
393         <property name="javadoc.encoding.used" value="${source.encoding}"/>
394         <property name="includes" value="**"/>
395         <property name="excludes" value=""/>
396         <property name="do.depend" value="false"/>
397         <condition property="do.depend.true">
398             <istrue value="${do.depend}"/>
399         </condition>
400         <path id="endorsed.classpath.path" path="${endorsed.classpath}"/>
401         <condition else="" property="endorsed.classpath.cmd.line.arg" value="-Xbootclasspath/p:'${toString:endorsed.classpath.path}'">
402             <and>
403                 <isset property="endorsed.classpath"/>
404                 <not>
405                     <equals arg1="${endorsed.classpath}" arg2="" trim="true"/>
406                 </not>
407             </and>
408         </condition>
409         <condition else="" property="javac.profile.cmd.line.arg" value="-profile ${javac.profile}">
410             <isset property="profile.available"/>
411         </condition>
412         <condition else="false" property="jdkBug6558476">
413             <and>
414                 <matches pattern="1\.[56]" string="${java.specification.version}"/>
415                 <not>
416                     <os family="unix"/>
417                 </not>
418             </and>
419         </condition>
420         <condition else="false" property="javac.fork">
421             <or>
422                 <istrue value="${jdkBug6558476}"/>
423                 <istrue value="${javac.external.vm}"/>
424             </or>
425         </condition>
426         <condition property="main.class.check.available">
427             <and>
428                 <isset property="libs.CopyLibs.classpath"/>
429                 <available classname="org.netbeans.modules.java.j2seproject.moduletask.ModuleMainClass" classpath="${libs.CopyLibs.classpath}"/>
430             </and>
431         </condition>
432         <property name="jar.index" value="false"/>
433         <property name="jar.index.metainf" value="${jar.index}"/>
434         <condition property="junit.available">
435             <or>
436                 <available classname="org.junit.Test" classpath="${run.test.classpath}"/>
437                 <available classname="junit.framework.Test" classpath="${run.test.classpath}"/>
438             </or>
439         </condition>
440         <condition property="testng.available">
441             <available classname="org.testng.annotations.Test" classpath="${run.test.classpath}"/>
442         </condition>
443         <condition property="junit+testng.available">
444             <and>
445                 <istrue value="${junit.available}"/>
446                 <istrue value="${testng.available}"/>
447             </and>
448         </condition>
449         <condition else="testng" property="testng.mode" value="mixed">
450             <istrue value="${junit+testng.available}"/>
451         </condition>
452         <condition else="" property="testng.debug.mode" value="-mixed">
453             <istrue value="${junit+testng.available}"/>
454         </condition>
455         <property name="java.failonerror" value="true"/>
456         <macrodef name="for-paths" uri="http://www.netbeans.org/ns/j2se-modular-project/1">
457             <attribute name="paths"/>
458             <attribute default="${path.separator}" name="separator"/>
459             <element implicit="yes" name="call"/>
460             <sequential>
461                 <local name="entry"/>
462                 <local name="tail"/>
463                 <local name="moreElements"/>
464                 <loadresource property="entry" quiet="true" unless:blank="@{paths}">
465                     <concat>@{paths}</concat>
466                     <filterchain>
467                         <replaceregex pattern="([^@{separator}]*)\Q@{separator}\E.*" replace="\1"/>
468                     </filterchain>
469                 </loadresource>
470                 <sequential if:set="entry">
471                     <call/>
472                 </sequential>
473                 <condition else="false" property="moreElements" value="true">
474                     <contains string="@{paths}" substring="@{separator}"/>
475                 </condition>
476                 <loadresource if:true="${moreElements}" property="tail" quiet="true">
477                     <concat>@{paths}</concat>
478                     <filterchain>
479                         <replaceregex pattern="[^@{separator}]*\Q@{separator}\E(.*)" replace="\1"/>
480                     </filterchain>
481                 </loadresource>
482                 <j2semodularproject1:for-paths xmlns:j2semodularproject1="http://www.netbeans.org/ns/j2se-modular-project/1" if:true="${moreElements}" paths="${tail}">
483                     <call/>
484                 </j2semodularproject1:for-paths>
485             </sequential>
486         </macrodef>
487         <property name="modules.supported.internal" value="true"/>
488         <condition else="${file.separator}" property="file.separator.string" value="\${file.separator}">
489             <equals arg1="${file.separator}" arg2="\"/>
490         </condition>
491     </target>
492     <target name="-post-init">
493         <!-- Empty placeholder for easier customization. -->
494         <!-- You can override this target in the ../build.xml file. -->
495     </target>
496     <target depends="-pre-init,-init-private,-init-user,-init-project,-do-init" name="-init-check">
497         <fail unless="src.dir">Must set src.dir</fail>
498         <fail unless="src.gen.dir">Must set src.gen.dir</fail>
499         <fail unless="test.src.dir">Must set test.src.dir</fail>
500         <fail unless="build.dir">Must set build.dir</fail>
501         <fail unless="dist.dir">Must set dist.dir</fail>
502         <fail unless="build.modules.dir">Must set build.modules.dir</fail>
503         <fail unless="dist.javadoc.dir">Must set dist.javadoc.dir</fail>
504         <fail unless="build.test.modules.dir">Must set build.test.modules.dir</fail>
505         <fail unless="build.test.results.dir">Must set build.test.results.dir</fail>
506         <fail unless="build.classes.excludes">Must set build.classes.excludes</fail>
507         <fail message="Java 9 support requires Ant 1.10.0 or higher.">
508             <condition>
509                 <not>
510                     <antversion atleast="1.10.0"/>
511                 </not>
512             </condition>
513         </fail>
514     </target>
515     <target name="-init-macrodef-property">
516         <macrodef name="property" uri="http://www.netbeans.org/ns/j2se-modular-project/1">
517             <attribute name="name"/>
518             <attribute name="value"/>
519             <sequential>
520                 <property name="@{name}" value="${@{value}}"/>
521             </sequential>
522         </macrodef>
523     </target>
524     <target depends="-init-ap-cmdline-properties,-init-source-module-properties" name="-init-macrodef-javac">
525         <macrodef name="javac" uri="http://www.netbeans.org/ns/j2se-modular-project/1">
526             <attribute default="${build.modules.dir}" name="destdir"/>
527             <attribute default="${javac.classpath}" name="classpath"/>
528             <attribute default="${javac.modulepath}" name="modulepath"/>
529             <attribute default="${src.dir}/*/${src.dir.path}:${src.gen.dir}/*/${src.gen.dir.path}" name="modulesourcepath"/>
530             <attribute default="${javac.upgrademodulepath}" name="upgrademodulepath"/>
531             <attribute default="${javac.processorpath}" name="processorpath"/>
532             <attribute default="${javac.processormodulepath}" name="processormodulepath"/>
533             <attribute default="${build.generated.sources.dir}/ap-source-output" name="apgeneratedsrcdir"/>
534             <attribute default="${includes}" name="includes"/>
535             <attribute default="${excludes}" name="excludes"/>
536             <attribute default="${javac.debug}" name="debug"/>
537             <attribute default="${empty.dir}" name="gensrcdir"/>
538             <element name="customize" optional="true"/>
539             <sequential>
540                 <property location="${build.dir}/empty" name="empty.dir"/>
541                 <mkdir dir="${empty.dir}"/>
542                 <mkdir dir="@{apgeneratedsrcdir}"/>
543                 <condition property="processormodulepath.set">
544                     <resourcecount count="0" when="greater">
545                         <path>
546                             <pathelement path="@{processormodulepath}"/>
547                         </path>
548                     </resourcecount>
549                 </condition>
550                 <javac debug="@{debug}" deprecation="${javac.deprecation}" destdir="@{destdir}" encoding="${source.encoding}" excludes="@{excludes}" fork="${javac.fork}" includeantruntime="false" includes="@{includes}" source="${javac.source}" target="${javac.target}" tempdir="${java.io.tmpdir}">
551                     <classpath>
552                         <path path="@{classpath}"/>
553                     </classpath>
554                     <modulepath>
555                         <path path="@{modulepath}"/>
556                     </modulepath>
557                     <modulesourcepath>
558                         <path path="@{modulesourcepath}"/>
559                     </modulesourcepath>
560                     <upgrademodulepath>
561                         <path path="@{upgrademodulepath}"/>
562                     </upgrademodulepath>
563                     <compilerarg line="${javac.systemmodulepath.cmd.line.arg}"/>
564                     <compilerarg line="${javac.profile.cmd.line.arg}"/>
565                     <compilerarg line="${javac.compilerargs}"/>
566                     <compilerarg if:set="processormodulepath.set" value="--processor-module-path"/>
567                     <compilerarg if:set="processormodulepath.set" path="@{processormodulepath}"/>
568                     <compilerarg unless:set="processormodulepath.set" value="-processorpath"/>
569                     <compilerarg path="@{processorpath}:${empty.dir}" unless:set="processormodulepath.set"/>
570                     <compilerarg line="${ap.processors.internal}"/>
571                     <compilerarg line="${annotation.processing.processor.options}"/>
572                     <compilerarg value="-s"/>
573                     <compilerarg path="@{apgeneratedsrcdir}"/>
574                     <compilerarg line="${ap.proc.none.internal}"/>
575                     <customize/>
576                 </javac>
577             </sequential>
578         </macrodef>
579     </target>
580     <target depends="-init-macrodef-javac" name="-init-macrodef-javac-depend">
581         <macrodef name="depend" uri="http://www.netbeans.org/ns/j2se-modular-project/1">
582             <attribute default="${src.dir}:${src.gen.dir}" name="srcdir"/>
583             <attribute default="${build.classes.dir}" name="destdir"/>
584             <attribute default="${javac.classpath}" name="classpath"/>
585             <sequential>
586                 <depend cache="${build.dir}/depcache" destdir="@{destdir}" excludes="${excludes}" includes="${includes}" srcdir="@{srcdir}">
587                     <classpath>
588                         <path path="@{classpath}"/>
589                     </classpath>
590                 </depend>
591             </sequential>
592         </macrodef>
593         <macrodef name="force-recompile" uri="http://www.netbeans.org/ns/j2se-modular-project/1">
594             <attribute default="${build.modules.dir}" name="destdir"/>
595             <sequential>
596                 <fail unless="javac.includes">Must set javac.includes</fail>
597                 <pathconvert pathsep="${line.separator}" property="javac.includes.binary">
598                     <path>
599                         <filelist dir="@{destdir}" files="${javac.includes}"/>
600                     </path>
601                     <globmapper from="*.java" to="*.class"/>
602                 </pathconvert>
603                 <tempfile deleteonexit="true" property="javac.includesfile.binary"/>
604                 <echo file="${javac.includesfile.binary}" message="${javac.includes.binary}"/>
605                 <delete>
606                     <files includesfile="${javac.includesfile.binary}"/>
607                 </delete>
608                 <delete>
609                     <fileset file="${javac.includesfile.binary}"/>
610                 </delete>
611             </sequential>
612         </macrodef>
613     </target>
614     <target if="${junit.available}" name="-init-macrodef-junit-init">
615         <condition else="false" property="nb.junit.batch" value="true">
616             <and>
617                 <istrue value="${junit.available}"/>
618                 <not>
619                     <isset property="test.method"/>
620                 </not>
621             </and>
622         </condition>
623         <condition else="false" property="nb.junit.single" value="true">
624             <and>
625                 <istrue value="${junit.available}"/>
626                 <isset property="test.method"/>
627             </and>
628         </condition>
629     </target>
630     <target name="-init-test-properties">
631         <property name="test.binaryincludes" value="&lt;nothing&gt;"/>
632         <property name="test.binarytestincludes" value=""/>
633         <property name="test.binaryexcludes" value=""/>
634     </target>
635     <target name="-init-macrodef-junit-prototype">
636         <macrodef name="junit-prototype" uri="http://www.netbeans.org/ns/j2se-modular-project/1">
637             <attribute default="${includes}" name="includes"/>
638             <attribute default="${excludes}" name="excludes"/>
639             <element name="customizePrototype" optional="true"/>
640             <sequential>
641                 <property location="${build.dir}/empty" name="empty.dir"/>
642                 <property name="junit.forkmode" value="perTest"/>
643                 <junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" forkmode="${junit.forkmode}" showoutput="true" tempdir="${build.dir}">
644                     <syspropertyset>
645                         <propertyref prefix="test-sys-prop."/>
646                         <mapper from="test-sys-prop.*" to="*" type="glob"/>
647                     </syspropertyset>
648                     <classpath>
649                         <path path="${run.test.classpath}"/>
650                     </classpath>
651                     <formatter type="brief" usefile="false"/>
652                     <formatter type="xml"/>
653                     <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
654                     <jvmarg value="-ea"/>
655                     <jvmarg value="--module-path"/>
656                     <jvmarg path="${run.modulepath}${path.separator}${run.test.modulepath}${path.separator}${empty.dir}"/>
657                     <jvmarg line="${run.test.jvmargs}"/>
658                     <customizePrototype/>
659                 </junit>
660             </sequential>
661         </macrodef>
662     </target>
663     <target depends="-init-test-properties,-init-macrodef-junit-prototype" if="${nb.junit.single}" name="-init-macrodef-junit-single" unless="${nb.junit.batch}">
664         <macrodef name="junit" uri="http://www.netbeans.org/ns/j2se-modular-project/1">
665             <attribute default="${includes}" name="includes"/>
666             <attribute default="${excludes}" name="excludes"/>
667             <attribute default="**" name="testincludes"/>
668             <attribute default="" name="testmethods"/>
669             <element name="customize" optional="true"/>
670             <sequential>
671                 <j2semodularproject1:junit-prototype xmlns:j2semodularproject1="http://www.netbeans.org/ns/j2se-modular-project/1">
672                     <customizePrototype>
673                         <test methods="@{testmethods}" name="@{testincludes}" todir="${build.test.results.dir}"/>
674                         <customize/>
675                     </customizePrototype>
676                 </j2semodularproject1:junit-prototype>
677             </sequential>
678         </macrodef>
679     </target>
680     <target depends="-init-test-properties,-init-macrodef-junit-prototype" if="${nb.junit.batch}" name="-init-macrodef-junit-batch" unless="${nb.junit.single}">
681         <macrodef name="junit" uri="http://www.netbeans.org/ns/j2se-modular-project/1">
682             <attribute default="${includes}" name="includes"/>
683             <attribute default="${excludes}" name="excludes"/>
684             <attribute default="**" name="testincludes"/>
685             <attribute default="" name="testmethods"/>
686             <element name="customize" optional="true"/>
687             <sequential>
688                 <j2semodularproject1:junit-prototype xmlns:j2semodularproject1="http://www.netbeans.org/ns/j2se-modular-project/1">
689                     <customizePrototype>
690                         <batchtest todir="${build.test.results.dir}">
691                             <mappedresources>
692                                 <union>
693                                     <fileset dir="${test.src.dir}" excludes="@{excludes},${excludes}" includes="**/@{includes}">
694                                         <filename name="**/@{testincludes}"/>
695                                         <filename regex="${have.tests.test.src.dir.regexp}"/>
696                                     </fileset>
697                                 </union>
698                                 <regexpmapper from="${have.tests.test.src.dir.regexp}\Q${file.separator}\E(.*)$" to="\3"/>
699                             </mappedresources>
700                             <fileset dir="${build.test.modules.dir}" excludes="@{excludes},${excludes},${test.binaryexcludes}" includes="${test.binaryincludes}">
701                                 <filename name="${test.binarytestincludes}"/>
702                             </fileset>
703                         </batchtest>
704                         <customize/>
705                     </customizePrototype>
706                 </j2semodularproject1:junit-prototype>
707             </sequential>
708         </macrodef>
709     </target>
710     <target depends="-init-macrodef-junit-init,-init-macrodef-junit-single, -init-macrodef-junit-batch" if="${junit.available}" name="-init-macrodef-junit"/>
711     <target if="${testng.available}" name="-init-macrodef-testng">
712         <macrodef name="testng" uri="http://www.netbeans.org/ns/j2se-modular-project/1">
713             <attribute default="${includes}" name="includes"/>
714             <attribute default="${excludes}" name="excludes"/>
715             <attribute default="**" name="testincludes"/>
716             <attribute default="" name="testmethods"/>
717             <element name="customize" optional="true"/>
718             <sequential>
719                 <condition else="" property="testng.methods.arg" value="@{testincludes}.@{testmethods}">
720                     <isset property="test.method"/>
721                 </condition>
722                 <union id="test.set">
723                     <fileset dir="${test.src.dir}" excludes="@{excludes},**/*.xml,${excludes}" includes="@{includes}">
724                         <filename name="@{testincludes}"/>
725                     </fileset>
726                 </union>
727                 <taskdef classname="org.testng.TestNGAntTask" classpath="${run.test.classpath}" name="testng"/>
728                 <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="panamaz" testname="TestNG tests" workingDir="${work.dir}">
729                     <xmlfileset dir="${build.test.classes.dir}" includes="@{testincludes}"/>
730                     <propertyset>
731                         <propertyref prefix="test-sys-prop."/>
732                         <mapper from="test-sys-prop.*" to="*" type="glob"/>
733                     </propertyset>
734                     <classpath>
735                         <path path="${run.test.classpath}"/>
736                     </classpath>
737                     <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
738                     <customize/>
739                 </testng>
740             </sequential>
741         </macrodef>
742     </target>
743     <target name="-init-macrodef-test-impl">
744         <macrodef name="test-impl" uri="http://www.netbeans.org/ns/j2se-modular-project/1">
745             <attribute default="${includes}" name="includes"/>
746             <attribute default="${excludes}" name="excludes"/>
747             <attribute default="**" name="testincludes"/>
748             <attribute default="" name="testmethods"/>
749             <element implicit="true" name="customize" optional="true"/>
750             <sequential>
751                 <echo>No tests executed.</echo>
752             </sequential>
753         </macrodef>
754     </target>
755     <target depends="-init-macrodef-junit" if="${junit.available}" name="-init-macrodef-junit-impl">
756         <macrodef name="test-impl" uri="http://www.netbeans.org/ns/j2se-modular-project/1">
757             <attribute default="${includes}" name="includes"/>
758             <attribute default="${excludes}" name="excludes"/>
759             <attribute default="**" name="testincludes"/>
760             <attribute default="" name="testmethods"/>
761             <element implicit="true" name="customize" optional="true"/>
762             <sequential>
763                 <j2semodularproject1:junit xmlns:j2semodularproject1="http://www.netbeans.org/ns/j2se-modular-project/1" excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}">
764                     <customize/>
765                 </j2semodularproject1:junit>
766             </sequential>
767         </macrodef>
768     </target>
769     <target depends="-init-macrodef-testng" if="${testng.available}" name="-init-macrodef-testng-impl">
770         <macrodef name="test-impl" uri="http://www.netbeans.org/ns/j2se-modular-project/1">
771             <attribute default="${includes}" name="includes"/>
772             <attribute default="${excludes}" name="excludes"/>
773             <attribute default="**" name="testincludes"/>
774             <attribute default="" name="testmethods"/>
775             <element implicit="true" name="customize" optional="true"/>
776             <sequential>
777                 <j2semodularproject1:testng xmlns:j2semodularproject1="http://www.netbeans.org/ns/j2se-modular-project/1" excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}">
778                     <customize/>
779                 </j2semodularproject1:testng>
780             </sequential>
781         </macrodef>
782     </target>
783     <target depends="-init-macrodef-test-impl,-init-macrodef-junit-impl,-init-macrodef-testng-impl" name="-init-macrodef-test">
784         <macrodef name="test" uri="http://www.netbeans.org/ns/j2se-modular-project/1">
785             <attribute default="${includes}" name="includes"/>
786             <attribute default="${excludes}" name="excludes"/>
787             <attribute default="**" name="testincludes"/>
788             <attribute default="" name="testmethods"/>
789             <sequential>
790                 <j2semodularproject1:test-impl xmlns:j2semodularproject1="http://www.netbeans.org/ns/j2se-modular-project/1" excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}">
791                     <customize>
792                         <jvmarg line="${run.jvmargs}"/>
793                         <jvmarg line="${run.jvmargs.ide}"/>
794                     </customize>
795                 </j2semodularproject1:test-impl>
796             </sequential>
797         </macrodef>
798     </target>
799     <target depends="-init-macrodef-junit" if="${junit.available}" name="-init-macrodef-junit-debug-impl">
800         <macrodef name="test-debug-impl" uri="http://www.netbeans.org/ns/j2se-modular-project/1">
801             <attribute default="${includes}" name="includes"/>
802             <attribute default="${excludes}" name="excludes"/>
803             <attribute default="**" name="testincludes"/>
804             <attribute default="" name="testmethods"/>
805             <element name="customizeDebuggee" optional="true"/>
806             <sequential>
807                 <j2semodularproject1:junit xmlns:j2semodularproject1="http://www.netbeans.org/ns/j2se-modular-project/1" excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}">
808                     <customize>
809                         <jvmarg value="-agentlib:jdwp=transport=${debug-transport},address=${jpda.address}"/>
810                         <customizeDebuggee/>
811                     </customize>
812                 </j2semodularproject1:junit>
813             </sequential>
814         </macrodef>
815     </target>
816     <target if="${testng.available}" name="-init-macrodef-testng-debug">
817         <macrodef name="testng-debug" uri="http://www.netbeans.org/ns/j2se-modular-project/1">
818             <attribute default="${main.class}" name="testClass"/>
819             <attribute default="" name="testMethod"/>
820             <element name="customize2" optional="true"/>
821             <sequential>
822                 <condition else="-testclass @{testClass}" property="test.class.or.method" value="-methods @{testClass}.@{testMethod}">
823                     <isset property="test.method"/>
824                 </condition>
825                 <condition else="-suitename panamaz -testname @{testClass} ${test.class.or.method}" property="testng.cmd.args" value="@{testClass}">
826                     <matches pattern=".*\.xml" string="@{testClass}"/>
827                 </condition>
828                 <delete dir="${build.test.results.dir}" quiet="true"/>
829                 <mkdir dir="${build.test.results.dir}"/>
830                 <j2semodularproject1:debug xmlns:j2semodularproject1="http://www.netbeans.org/ns/j2se-modular-project/1" classname="org.testng.TestNG" classpath="${debug.test.classpath}">
831                     <customizeDebuggee>
832                         <customize2/>
833                         <jvmarg value="-ea"/>
834                         <arg line="${testng.debug.mode}"/>
835                         <arg line="-d ${build.test.results.dir}"/>
836                         <arg line="-listener org.testng.reporters.VerboseReporter"/>
837                         <arg line="${testng.cmd.args}"/>
838                     </customizeDebuggee>
839                 </j2semodularproject1:debug>
840             </sequential>
841         </macrodef>
842     </target>
843     <target depends="-init-macrodef-testng-debug" if="${testng.available}" name="-init-macrodef-testng-debug-impl">
844         <macrodef name="testng-debug-impl" uri="http://www.netbeans.org/ns/j2se-modular-project/1">
845             <attribute default="${main.class}" name="testClass"/>
846             <attribute default="" name="testMethod"/>
847             <element implicit="true" name="customize2" optional="true"/>
848             <sequential>
849                 <j2semodularproject1:testng-debug xmlns:j2semodularproject1="http://www.netbeans.org/ns/j2se-modular-project/1" testClass="@{testClass}" testMethod="@{testMethod}">
850                     <customize2/>
851                 </j2semodularproject1:testng-debug>
852             </sequential>
853         </macrodef>
854     </target>
855     <target depends="-init-macrodef-junit-debug-impl" if="${junit.available}" name="-init-macrodef-test-debug-junit">
856         <macrodef name="test-debug" uri="http://www.netbeans.org/ns/j2se-modular-project/1">
857             <attribute default="${includes}" name="includes"/>
858             <attribute default="${excludes}" name="excludes"/>
859             <attribute default="**" name="testincludes"/>
860             <attribute default="" name="testmethods"/>
861             <attribute default="${main.class}" name="testClass"/>
862             <attribute default="" name="testMethod"/>
863             <sequential>
864                 <j2semodularproject1:test-debug-impl xmlns:j2semodularproject1="http://www.netbeans.org/ns/j2se-modular-project/1" excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}">
865                     <customizeDebuggee>
866                         <jvmarg line="${run.jvmargs}"/>
867                         <jvmarg line="${run.jvmargs.ide}"/>
868                     </customizeDebuggee>
869                 </j2semodularproject1:test-debug-impl>
870             </sequential>
871         </macrodef>
872     </target>
873     <target depends="-init-macrodef-testng-debug-impl" if="${testng.available}" name="-init-macrodef-test-debug-testng">
874         <macrodef name="test-debug" uri="http://www.netbeans.org/ns/j2se-modular-project/1">
875             <attribute default="${includes}" name="includes"/>
876             <attribute default="${excludes}" name="excludes"/>
877             <attribute default="**" name="testincludes"/>
878             <attribute default="" name="testmethods"/>
879             <attribute default="${main.class}" name="testClass"/>
880             <attribute default="" name="testMethod"/>
881             <sequential>
882                 <j2semodularproject1:testng-debug-impl xmlns:j2semodularproject1="http://www.netbeans.org/ns/j2se-modular-project/1" testClass="@{testClass}" testMethod="@{testMethod}">
883                     <customize2>
884                         <syspropertyset>
885                             <propertyref prefix="test-sys-prop."/>
886                             <mapper from="test-sys-prop.*" to="*" type="glob"/>
887                         </syspropertyset>
888                     </customize2>
889                 </j2semodularproject1:testng-debug-impl>
890             </sequential>
891         </macrodef>
892     </target>
893     <target depends="-init-macrodef-test-debug-junit,-init-macrodef-test-debug-testng" name="-init-macrodef-test-debug"/>
894     <!--
895                 pre NB7.2 profiling section; consider it deprecated
896             -->
897     <target depends="-profile-pre-init, init, -profile-post-init, -profile-init-macrodef-profile, -profile-init-check" if="profiler.info.jvmargs.agent" name="profile-init"/>
898     <target if="profiler.info.jvmargs.agent" name="-profile-pre-init">
899         <!-- Empty placeholder for easier customization. -->
900         <!-- You can override this target in the ../build.xml file. -->
901     </target>
902     <target if="profiler.info.jvmargs.agent" name="-profile-post-init">
903         <!-- Empty placeholder for easier customization. -->
904         <!-- You can override this target in the ../build.xml file. -->
905     </target>
906     <target if="profiler.info.jvmargs.agent" name="-profile-init-macrodef-profile">
907         <macrodef name="resolve">
908             <attribute name="name"/>
909             <attribute name="value"/>
910             <sequential>
911                 <property name="@{name}" value="${env.@{value}}"/>
912             </sequential>
913         </macrodef>
914         <macrodef name="profile">
915             <attribute default="${main.class}" name="classname"/>
916             <element name="customize" optional="true"/>
917             <sequential>
918                 <property environment="env"/>
919                 <resolve name="profiler.current.path" value="${profiler.info.pathvar}"/>
920                 <java classname="@{classname}" dir="${profiler.info.dir}" failonerror="${java.failonerror}" fork="true" jvm="${profiler.info.jvm}">
921                     <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
922                     <jvmarg value="${profiler.info.jvmargs.agent}"/>
923                     <jvmarg line="${profiler.info.jvmargs}"/>
924                     <env key="${profiler.info.pathvar}" path="${profiler.info.agentpath}:${profiler.current.path}"/>
925                     <arg line="${application.args}"/>
926                     <classpath>
927                         <path path="${run.classpath}"/>
928                     </classpath>
929                     <syspropertyset>
930                         <propertyref prefix="run-sys-prop."/>
931                         <mapper from="run-sys-prop.*" to="*" type="glob"/>
932                     </syspropertyset>
933                     <customize/>
934                 </java>
935             </sequential>
936         </macrodef>
937     </target>
938     <target depends="-profile-pre-init, init, -profile-post-init, -profile-init-macrodef-profile" if="profiler.info.jvmargs.agent" name="-profile-init-check">
939         <fail unless="profiler.info.jvm">Must set JVM to use for profiling in profiler.info.jvm</fail>
940         <fail unless="profiler.info.jvmargs.agent">Must set profiler agent JVM arguments in profiler.info.jvmargs.agent</fail>
941     </target>
942     <!--
943                 end of pre NB7.2 profiling section
944             -->
945     <target depends="-init-debug-args" name="-init-macrodef-nbjpda">
946         <macrodef name="nbjpdastart" uri="http://www.netbeans.org/ns/j2se-modular-project/1">
947             <attribute default="${main.class}" name="name"/>
948             <attribute default="${debug.modulepath}" name="modulepath"/>
949             <attribute default="${debug.classpath}" name="classpath"/>
950             <attribute default="" name="stopclassname"/>
951             <sequential>
952                 <nbjpdastart addressproperty="jpda.address" name="@{name}" stopclassname="@{stopclassname}" transport="${debug-transport}">
953                     <modulepath>
954                         <path path="@{modulepath}"/>
955                     </modulepath>
956                     <classpath>
957                         <path path="@{classpath}"/>
958                     </classpath>
959                 </nbjpdastart>
960             </sequential>
961         </macrodef>
962         <macrodef name="nbjpdareload" uri="http://www.netbeans.org/ns/j2se-modular-project/1">
963             <attribute default="${debug.modules.dir}" name="dir"/>
964             <sequential>
965                 <nbjpdareload>
966                     <fileset dir="@{dir}" includes="${fix.classes}">
967                         <include name="*/${fix.includes}*.class"/>
968                     </fileset>
969                 </nbjpdareload>
970             </sequential>
971         </macrodef>
972     </target>
973     <target name="-init-debug-args">
974         <condition else="dt_socket" property="debug-transport-by-os" value="dt_shmem">
975             <os family="windows"/>
976         </condition>
977         <condition else="${debug-transport-by-os}" property="debug-transport" value="${debug.transport}">
978             <isset property="debug.transport"/>
979         </condition>
980     </target>
981     <target depends="-init-debug-args" name="-init-macrodef-debug">
982         <macrodef name="debug" uri="http://www.netbeans.org/ns/j2se-modular-project/1">
983             <attribute default="${module.name}" name="modulename"/>
984             <attribute default="${main.class}" name="classname"/>
985             <attribute default="${debug.modulepath}" name="modulepath"/>
986             <attribute default="${debug.classpath}" name="classpath"/>
987             <element name="customizeDebuggee" optional="true"/>
988             <sequential>
989                 <j2semodularproject1:java xmlns:j2semodularproject1="http://www.netbeans.org/ns/j2se-modular-project/1" classname="@{classname}" classpath="@{classpath}" modulename="@{modulename}" modulepath="@{modulepath}">
990                     <customize>
991                         <jvmarg value="-agentlib:jdwp=transport=${debug-transport},address=${jpda.address}"/>
992                         <customizeDebuggee/>
993                     </customize>
994                 </j2semodularproject1:java>
995             </sequential>
996         </macrodef>
997     </target>
998     <target depends="-init-source-module-properties" name="-init-macrodef-java">
999         <macrodef name="java" uri="http://www.netbeans.org/ns/j2se-modular-project/1">
1000             <attribute default="${module.name}" name="modulename"/>
1001             <attribute default="${main.class}" name="classname"/>
1002             <attribute default="${run.modulepath}" name="modulepath"/>
1003             <attribute default="${run.upgrademodulepath}" name="upgrademodulepath"/>
1004             <attribute default="${run.classpath}" name="classpath"/>
1005             <attribute default="jvm" name="jvm"/>
1006             <element name="customize" optional="true"/>
1007             <sequential>
1008                 <java classname="@{classname}" dir="${work.dir}" failonerror="${java.failonerror}" fork="true" module="@{modulename}">
1009                     <classpath>
1010                         <path path="@{classpath}"/>
1011                     </classpath>
1012                     <modulepath>
1013                         <path path="@{modulepath}"/>
1014                     </modulepath>
1015                     <upgrademodulepath>
1016                         <path path="@{upgrademodulepath}"/>
1017                     </upgrademodulepath>
1018                     <jvmarg value="-Dfile.encoding=${runtime.encoding}"/>
1019                     <redirector errorencoding="${runtime.encoding}" inputencoding="${runtime.encoding}" outputencoding="${runtime.encoding}"/>
1020                     <jvmarg line="${run.jvmargs}"/>
1021                     <jvmarg line="${run.jvmargs.ide}"/>
1022                     <syspropertyset>
1023                         <propertyref prefix="run-sys-prop."/>
1024                         <mapper from="run-sys-prop.*" to="*" type="glob"/>
1025                     </syspropertyset>
1026                     <customize/>
1027                 </java>
1028             </sequential>
1029         </macrodef>
1030     </target>
1031     <target name="-init-presetdef-jar">
1032         <presetdef name="jar" uri="http://www.netbeans.org/ns/j2se-modular-project/1">
1033             <jar compress="${jar.compress}" index="${jar.index}" jarfile="${dist.jar}" manifestencoding="UTF-8">
1034                 <j2semodularproject1:fileset xmlns:j2semodularproject1="http://www.netbeans.org/ns/j2se-modular-project/1" dir="${build.classes.dir}" excludes="${dist.archive.excludes}"/>
1035             </jar>
1036         </presetdef>
1037     </target>
1038     <target name="-init-ap-cmdline-properties">
1039         <property name="annotation.processing.enabled" value="true"/>
1040         <property name="annotation.processing.processors.list" value=""/>
1041         <property name="annotation.processing.processor.options" value=""/>
1042         <property name="annotation.processing.run.all.processors" value="true"/>
1043         <property name="javac.processorpath" value="${javac.classpath}"/>
1044         <property name="javac.test.processorpath" value="${javac.test.classpath}"/>
1045     </target>
1046     <target depends="-init-ap-cmdline-properties" name="-init-ap-cmdline-supported">
1047         <condition else="" property="ap.processors.internal" value="-processor ${annotation.processing.processors.list}">
1048             <isfalse value="${annotation.processing.run.all.processors}"/>
1049         </condition>
1050         <condition else="" property="ap.proc.none.internal" value="-proc:none">
1051             <isfalse value="${annotation.processing.enabled}"/>
1052         </condition>
1053     </target>
1054     <target depends="-init-ap-cmdline-properties,-init-ap-cmdline-supported" name="-init-ap-cmdline">
1055         <property name="ap.cmd.line.internal" value=""/>
1056     </target>
1057     <target depends="-pre-init,-init-private,-init-user,-init-project,-do-init,-post-init,-init-check,-init-macrodef-property,-init-macrodef-javac-depend,-init-macrodef-test,-init-macrodef-test-debug,-init-macrodef-nbjpda,-init-macrodef-debug,-init-macrodef-java,-init-presetdef-jar,-init-ap-cmdline" name="init"/>
1058     <!--
1059                 ===================
1060                 COMPILATION SECTION
1061                 ===================
1062             -->
1063     <target name="-deps-jar-init" unless="built-jar.properties">
1064         <property location="${build.dir}/built-jar.properties" name="built-jar.properties"/>
1065         <delete file="${built-jar.properties}" quiet="true"/>
1066     </target>
1067     <target if="already.built.jar.${basedir}" name="-warn-already-built-jar">
1068         <echo level="warn" message="Cycle detected: panamaz was already built"/>
1069     </target>
1070     <target depends="init,-deps-jar-init" name="deps-jar" unless="no.deps">
1071         <mkdir dir="${build.dir}"/>
1072         <touch file="${built-jar.properties}" verbose="false"/>
1073         <property file="${built-jar.properties}" prefix="already.built.jar."/>
1074         <antcall target="-warn-already-built-jar"/>
1075         <propertyfile file="${built-jar.properties}">
1076             <entry key="${basedir}" value=""/>
1077         </propertyfile>
1078     </target>
1079     <target depends="init,-check-automatic-build,-clean-after-automatic-build" name="-verify-automatic-build"/>
1080     <target depends="init" name="-check-automatic-build">
1081         <available file="${build.modules.dir}/.netbeans_automatic_build" property="netbeans.automatic.build"/>
1082     </target>
1083     <target depends="init" if="netbeans.automatic.build" name="-clean-after-automatic-build">
1084         <antcall target="clean">
1085             <param name="no.dependencies" value="true"/>
1086         </antcall>
1087     </target>
1088     <target name="-pre-pre-compile">
1089         <mkdir dir="${build.modules.dir}"/>
1090     </target>
1091     <target name="-pre-compile">
1092         <!-- Empty placeholder for easier customization. -->
1093         <!-- You can override this target in the ../build.xml file. -->
1094     </target>
1095     <target if="do.depend.true" name="-compile-depend">
1096         <pathconvert property="build.generated.subdirs">
1097             <dirset dir="${build.generated.sources.dir}" erroronmissingdir="false">
1098                 <include name="*"/>
1099             </dirset>
1100         </pathconvert>
1101         <j2semodularproject1:depend xmlns:j2semodularproject1="http://www.netbeans.org/ns/j2se-modular-project/1" srcdir="${src.dir}:${src.gen.dir}:${build.generated.subdirs}"/>
1102     </target>
1103     <target depends="init,deps-jar,-pre-pre-compile,-pre-compile,-compile-depend" if="have.sources" name="-do-compile">
1104         <j2semodularproject1:javac xmlns:j2semodularproject1="http://www.netbeans.org/ns/j2se-modular-project/1" gensrcdir="${build.generated.sources.dir}"/>
1105         <j2semodularproject1:modsource_regexp xmlns:j2semodularproject1="http://www.netbeans.org/ns/j2se-modular-project/1" filePattern="(.*$)" modsource="${src.dir.path}" property="src.dir.path.regexp"/>
1106         <echo message="Copying resources from ${src.dir}"/>
1107         <copy todir="${build.modules.dir}">
1108             <fileset dir="${src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
1109             <regexpmapper from="${src.dir.path.regexp}" to="\1/\3"/>
1110         </copy>
1111         <j2semodularproject1:modsource_regexp xmlns:j2semodularproject1="http://www.netbeans.org/ns/j2se-modular-project/1" filePattern="(.*$)" modsource="${src.gen.dir.path}" property="src.gen.dir.path.regexp"/>
1112         <echo message="Copying resources from ${src.gen.dir}"/>
1113         <copy todir="${build.modules.dir}">
1114             <fileset dir="${src.gen.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
1115             <regexpmapper from="${src.gen.dir.path.regexp}" to="\1/\3"/>
1116         </copy>
1117     </target>
1118     <target if="has.persistence.xml" name="-copy-persistence-xml">
1119         <fail message="XXX: Not supported on MM projects"/>
1120         <mkdir dir="${build.classes.dir}/META-INF"/>
1121         <copy todir="${build.classes.dir}/META-INF">
1122             <fileset dir="${meta.inf.dir}" includes="persistence.xml orm.xml"/>
1123         </copy>
1124     </target>
1125     <target name="-post-compile">
1126         <!-- Empty placeholder for easier customization. -->
1127         <!-- You can override this target in the ../build.xml file. -->
1128     </target>
1129     <target depends="init,deps-jar,-verify-automatic-build,-pre-pre-compile,-pre-compile,-do-compile,-post-compile" description="Compile project." name="compile"/>
1130     <target name="-pre-compile-single">
1131         <!-- Empty placeholder for easier customization. -->
1132         <!-- You can override this target in the ../build.xml file. -->
1133     </target>
1134     <target depends="init,deps-jar" name="-do-compile-single">
1135         <fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail>
1136         <j2semodularproject1:force-recompile xmlns:j2semodularproject1="http://www.netbeans.org/ns/j2se-modular-project/1"/>
1137         <j2semodularproject1:javac xmlns:j2semodularproject1="http://www.netbeans.org/ns/j2se-modular-project/1" excludes="" gensrcdir="${build.generated.sources.dir}" includes="${javac.includes}, module-info.java"/>
1138     </target>
1139     <target name="-post-compile-single">
1140         <!-- Empty placeholder for easier customization. -->
1141         <!-- You can override this target in the ../build.xml file. -->
1142     </target>
1143     <target depends="init,deps-jar,-verify-automatic-build,-pre-pre-compile,-pre-compile-single,-do-compile-single,-post-compile-single" name="compile-single"/>
1144     <!--
1145                 ====================
1146                 JAR BUILDING SECTION
1147                 ====================
1148             -->
1149     <target depends="init,compile" name="-check-module-main-class">
1150         <condition property="do.module.main.class">
1151             <and>
1152                 <available file="${module.dir}/module-info.class"/>
1153                 <isset property="main.class.check.available"/>
1154             </and>
1155         </condition>
1156     </target>
1157     <target depends="init" name="-pre-pre-jar">
1158         <dirname file="${dist.jar}" property="dist.jar.dir"/>
1159         <mkdir dir="${dist.jar.dir}"/>
1160     </target>
1161     <target name="-pre-jar">
1162         <!-- Empty placeholder for easier customization. -->
1163         <!-- You can override this target in the ../build.xml file. -->
1164     </target>
1165     <target name="-pre-single-jar"/>
1166     <target depends="-pre-single-jar" if="module.jar.filename" name="-make-single-jar">
1167         <jar basedir="${module.dir}" compress="${jar.compress}" destfile="${dist.dir}/${module.jar.filename}" excludes="${dist.archive.excludes}" manifestencoding="UTF-8"/>
1168     </target>
1169     <target depends="init,compile,-pre-pre-jar,-pre-jar,-main-module-check-condition" if="do.archive" name="-do-jar-jar" unless="do.mkdist">
1170         <property location="${build.modules.dir}" name="build.modules.dir.resolved"/>
1171         <dirset dir="${build.modules.dir.resolved}" id="do.jar.dirs" includes="*"/>
1172         <pathconvert property="do.jar.dir.list" refid="do.jar.dirs">
1173             <identitymapper/>
1174         </pathconvert>
1175         <j2semodularproject1:for-paths xmlns:j2semodularproject1="http://www.netbeans.org/ns/j2se-modular-project/1" paths="${do.jar.dir.list}">
1176             <local name="module.jar.filename"/>
1177             <local name="module.jar.name.tmp"/>
1178             <basename file="${entry}" property="module.jar.name.tmp"/>
1179             <property name="module.jar.filename" value="${module.jar.name.tmp}.jar"/>
1180             <antcall inheritRefs="true" target="-make-single-jar">
1181                 <param name="module.jar.filename" value="${module.jar.filename}"/>
1182                 <param location="${entry}" name="module.dir"/>
1183             </antcall>
1184         </j2semodularproject1:for-paths>
1185         <condition property="named.module.internal">
1186             <and>
1187                 <isset property="module.name"/>
1188                 <length length="0" string="${module.name}" when="greater"/>
1189             </and>
1190         </condition>
1191         <condition property="unnamed.module.internal">
1192             <not>
1193                 <isset property="named.module.internal"/>
1194             </not>
1195         </condition>
1196         <property location="${build.classes.dir}" name="build.classes.dir.resolved"/>
1197         <property location="${dist.jar}" name="dist.jar.resolved"/>
1198         <pathconvert property="run.classpath.with.dist.jar">
1199             <path path="${run.classpath}"/>
1200             <map from="${build.classes.dir.resolved}" to="${dist.jar.resolved}"/>
1201         </pathconvert>
1202         <pathconvert property="run.modulepath.with.dist.jar">
1203             <path path="${run.modulepath}"/>
1204             <map from="${build.classes.dir.resolved}" to="${dist.jar.resolved}"/>
1205         </pathconvert>
1206         <condition else="" property="jar.usage.message.module.path" value=" --module-path ${run.modulepath.with.dist.jar}">
1207             <and>
1208                 <isset property="modules.supported.internal"/>
1209                 <length length="0" string="${run.modulepath.with.dist.jar}" when="greater"/>
1210             </and>
1211         </condition>
1212         <condition else="" property="jar.usage.message.class.path" value=" -cp ${run.classpath.with.dist.jar}">
1213             <length length="0" string="${run.classpath.with.dist.jar}" when="greater"/>
1214         </condition>
1215         <condition else=" ${main.class}" property="jar.usage.message.main.class" value=" -m ${module.name}/${main.class}">
1216             <isset property="named.module.internal"/>
1217         </condition>
1218         <condition else="" property="jar.usage.message" value="To run this application from the command line without Ant, try:${line.separator}${platform.java}${jar.usage.message.module.path}${jar.usage.message.class.path}${jar.usage.message.main.class}">
1219             <isset property="main.class.available"/>
1220         </condition>
1221         <condition else="debug" property="jar.usage.level" value="info">
1222             <isset property="main.class.available"/>
1223         </condition>
1224         <echo level="${jar.usage.level}" message="${jar.usage.message}"/>
1225     </target>
1226     <target depends="init,compile,-pre-pre-jar,-pre-jar,-do-jar-jar" name="-do-jar-without-libraries"/>
1227     <target depends="init,compile,-pre-pre-jar,-pre-jar" name="-do-jar-with-libraries"/>
1228     <target name="-post-jar">
1229         <!-- Empty placeholder for easier customization. -->
1230         <!-- You can override this target in the ../build.xml file. -->
1231     </target>
1232     <target depends="init,compile,-pre-jar,-do-jar-without-libraries,-do-jar-with-libraries,-post-jar" name="-do-jar"/>
1233     <target depends="init,compile,-pre-jar,-do-jar,-post-jar,deploy" description="Build JAR." name="jar"/>
1234     <!--
1235                 =================
1236                 DEPLOY SECTION
1237                 =================
1238             -->
1239     <target name="-pre-deploy">
1240         <!-- Empty placeholder for easier customization. -->
1241         <!-- You can override this target in the ../build.xml file. -->
1242     </target>
1243     <target depends="init" name="-check-jlink">
1244         <condition property="do.jlink.internal">
1245             <and>
1246                 <istrue value="${do.jlink}"/>
1247                 <isset property="do.archive"/>
1248             </and>
1249         </condition>
1250     </target>
1251     <target depends="init,-do-jar,-post-jar,-pre-deploy,-check-jlink,-main-module-set" if="do.jlink.internal" name="-do-deploy">
1252         <delete dir="${dist.jlink.dir}" failonerror="false" quiet="true"/>
1253         <property name="jlink.launcher.name" value="${application.title}"/>
1254         <pathconvert pathsep="," property="jlink.modulelist.internal">
1255             <fileset dir="${dist.dir}" includes="*.jar"/>
1256             <mapper>
1257                 <chainedmapper>
1258                     <flattenmapper/>
1259                     <globmapper from="*.jar" to="*"/>
1260                 </chainedmapper>
1261             </mapper>
1262         </pathconvert>
1263         <condition else="${jlink.modulelist.internal}" property="jlink.add.modules" value="${jlink.modulelist.internal},${jlink.additionalmodules}">
1264             <and>
1265                 <isset property="jlink.additionalmodules"/>
1266                 <length length="0" string="${jlink.additionalmodules}" when="greater"/>
1267             </and>
1268         </condition>
1269         <condition property="jlink.do.strip.internal">
1270             <and>
1271                 <isset property="jlink.strip"/>
1272                 <istrue value="${jlink.strip}"/>
1273             </and>
1274         </condition>
1275         <condition property="jlink.do.additionalparam.internal">
1276             <and>
1277                 <isset property="jlink.additionalparam"/>
1278                 <length length="0" string="${jlink.additionalparam}" when="greater"/>
1279             </and>
1280         </condition>
1281         <condition property="jlink.do.launcher.internal">
1282             <and>
1283                 <istrue value="${jlink.launcher}"/>
1284                 <isset property="module.name"/>
1285                 <length length="0" string="${module.name}" when="greater"/>
1286                 <isset property="main.class.available"/>
1287             </and>
1288         </condition>
1289         <property name="platform.jlink" value="${jdk.home}/bin/jlink"/>
1290         <property name="jlink.systemmodules.internal" value="${jdk.home}/jmods"/>
1291         <exec executable="${platform.jlink}">
1292             <arg value="--module-path"/>
1293             <arg path="${jlink.systemmodules.internal}:${run.modulepath}:${dist.dir}"/>
1294             <arg value="--add-modules"/>
1295             <arg value="${jlink.add.modules}"/>
1296             <arg if:set="jlink.do.strip.internal" value="--strip-debug"/>
1297             <arg if:set="jlink.do.launcher.internal" value="--launcher"/>
1298             <arg if:set="jlink.do.launcher.internal" value="${jlink.launcher.name}=${module.name}/${main.class}"/>
1299             <arg if:set="jlink.do.additionalparam.internal" line="${jlink.additionalparam}"/>
1300             <arg value="--output"/>
1301             <arg value="${dist.jlink.output}"/>
1302         </exec>
1303     </target>
1304     <target name="-post-deploy">
1305         <!-- Empty placeholder for easier customization. -->
1306         <!-- You can override this target in the ../build.xml file. -->
1307     </target>
1308     <target depends="-do-jar,-post-jar,-pre-deploy,-do-deploy,-post-deploy" name="deploy"/>
1309     <!--
1310                 =================
1311                 EXECUTION SECTION
1312                 =================
1313             -->
1314     <target name="-check-main-class">
1315         <fail unless="main.class">No main class specified</fail>
1316     </target>
1317     <target depends="init,compile,-check-main-class,-main-module-check" description="Run a main class." name="run">
1318         <property name="main.class.relativepath" refid="main.class.relativepath"/>
1319         <pathconvert pathsep="," property="src.dir.list" refid="have.sources.set"/>
1320         <j2semodularproject1:modsource_regexp xmlns:j2semodularproject1="http://www.netbeans.org/ns/j2se-modular-project/1" filePattern="(.*$)" modsource="${src.dir.path}" property="run.src.dir.path.regexp"/>
1321         <j2semodularproject1:java xmlns:j2semodularproject1="http://www.netbeans.org/ns/j2se-modular-project/1">
1322             <customize>
1323                 <arg line="${application.args}"/>
1324             </customize>
1325         </j2semodularproject1:java>
1326     </target>
1327     <target name="-main-module-set" unless="module.name">
1328         <condition else="${main.class}" property="check.class.name" value="${run.class}">
1329             <isset property="run.class"/>
1330         </condition>
1331         <condition property="run.modules.dir" value="${build.modules.dir}">
1332             <not>
1333                 <isset property="run.modules.dir"/>
1334             </not>
1335         </condition>
1336         <resources id="main.class.relativepath">
1337             <mappedresources>
1338                 <string value="${check.class.name}"/>
1339                 <unpackagemapper from="*" to="*.class"/>
1340             </mappedresources>
1341         </resources>
1342         <property location="${run.modules.dir}" name="run.modules.dir.location"/>
1343         <pathconvert property="module.name">
1344             <fileset dir="${run.modules.dir}" includes="**/${toString:main.class.relativepath}"/>
1345             <regexpmapper from="\Q${run.modules.dir.location}${file.separator}\E([^${file.separator.string}]+)\Q${file.separator}\E.*\.class" to="\1"/>
1346         </pathconvert>
1347     </target>
1348     <target depends="-main-module-set" name="-main-module-check">
1349         <fail message="Could not determine module of the main class and module.name is not set">
1350             <condition>
1351                 <or>
1352                     <not>
1353                         <isset property="module.name"/>
1354                     </not>
1355                     <length length="0" string="${module.name}" when="equal"/>
1356                 </or>
1357             </condition>
1358         </fail>
1359     </target>
1360     <target depends="-main-module-set" if="main.class.available" name="-main-module-check-condition">
1361         <fail message="Could not determine module of the main class and module.name is not set">
1362             <condition>
1363                 <or>
1364                     <not>
1365                         <isset property="module.name"/>
1366                     </not>
1367                     <length length="0" string="${module.name}" when="equal"/>
1368                 </or>
1369             </condition>
1370         </fail>
1371     </target>
1372     <target name="-do-not-recompile">
1373         <property name="javac.includes.binary" value=""/>
1374     </target>
1375     <target depends="init,compile-single,-main-module-check" name="run-single">
1376         <fail unless="run.class">Must select one file in the IDE or set run.class</fail>
1377         <j2semodularproject1:java xmlns:j2semodularproject1="http://www.netbeans.org/ns/j2se-modular-project/1" classname="${run.class}"/>
1378     </target>
1379     <target depends="init,compile-test-single,-init-test-run-module-properties,-main-module-check" name="run-test-with-main">
1380         <fail unless="run.class">Must select one file in the IDE or set run.class</fail>
1381         <j2semodularproject1:java xmlns:j2semodularproject1="http://www.netbeans.org/ns/j2se-modular-project/1" classname="${run.class}" classpath="${run.test.classpath}" modulepath="${run.test.modulepath}">
1382             <customize>
1383                 <jvmarg line="${run.test.jvmargs}"/>
1384             </customize>
1385         </j2semodularproject1:java>
1386     </target>
1387     <!--
1388                 =================
1389                 DEBUGGING SECTION
1390                 =================
1391             -->
1392     <target name="-debug-init">
1393         <condition else="${main.class}" property="run.class" value="${debug.class}">
1394             <isset property="debug.class"/>
1395         </condition>
1396         <fail message="debug.class or main.class property is not set" unless="run.class"/>
1397     </target>
1398     <target depends="init,-debug-init,-main-module-check" if="netbeans.home" name="-debug-start-debugger">
1399         <j2semodularproject1:nbjpdastart xmlns:j2semodularproject1="http://www.netbeans.org/ns/j2se-modular-project/1" name="${debug.class}"/>
1400     </target>
1401     <target depends="init,-debug-init,-main-module-check" if="netbeans.home" name="-debug-start-debugger-main-test">
1402         <j2semodularproject1:nbjpdastart xmlns:j2semodularproject1="http://www.netbeans.org/ns/j2se-modular-project/1" classpath="${debug.test.classpath}" name="${debug.class}"/>
1403     </target>
1404     <target depends="init,compile,-debug-init,-main-module-check" name="-debug-start-debuggee">
1405         <j2semodularproject1:debug xmlns:j2semodularproject1="http://www.netbeans.org/ns/j2se-modular-project/1" classname="${run.class}">
1406             <customizeDebuggee>
1407                 <arg line="${application.args}"/>
1408             </customizeDebuggee>
1409         </j2semodularproject1:debug>
1410     </target>
1411     <target depends="init,compile,-debug-init,-main-module-check,-debug-start-debugger,-debug-start-debuggee" description="Debug project in IDE." if="netbeans.home" name="debug"/>
1412     <target depends="init,-debug-init,-main-module-check" if="netbeans.home" name="-debug-start-debugger-stepinto">
1413         <j2semodularproject1:nbjpdastart xmlns:j2semodularproject1="http://www.netbeans.org/ns/j2se-modular-project/1" stopclassname="${debug.class}"/>
1414     </target>
1415     <target depends="init,compile,-debug-start-debugger-stepinto,-debug-start-debuggee" if="netbeans.home" name="debug-stepinto"/>
1416     <target depends="init,compile-single,-debug-init,-main-module-check" if="netbeans.home" name="-debug-start-debuggee-single">
1417         <fail unless="debug.class">Must select one file in the IDE or set debug.class</fail>
1418         <j2semodularproject1:debug xmlns:j2semodularproject1="http://www.netbeans.org/ns/j2se-modular-project/1" classname="${debug.class}"/>
1419     </target>
1420     <target depends="init,compile-single,-debug-start-debugger,-debug-start-debuggee-single" if="netbeans.home" name="debug-single"/>
1421     <target depends="init,compile-test-single,-debug-init,-main-module-check" if="netbeans.home" name="-debug-start-debuggee-main-test">
1422         <fail unless="debug.class">Must select one file in the IDE or set debug.class</fail>
1423         <j2semodularproject1:debug xmlns:j2semodularproject1="http://www.netbeans.org/ns/j2se-modular-project/1" classname="${debug.class}" classpath="${debug.test.classpath}"/>
1424     </target>
1425     <target depends="init,compile-test-single,-debug-start-debugger-main-test,-debug-start-debuggee-main-test" if="netbeans.home" name="debug-test-with-main"/>
1426     <target depends="init" name="-pre-debug-fix">
1427         <fail unless="fix.includes">Must set fix.includes</fail>
1428         <property name="javac.includes" value="${fix.includes}.java"/>
1429     </target>
1430     <target depends="init,-pre-debug-fix,compile-single" if="netbeans.home" name="-do-debug-fix">
1431         <property location="${build.modules.dir}" name="debug.modules.dir"/>
1432         <j2semodularproject1:nbjpdareload xmlns:j2semodularproject1="http://www.netbeans.org/ns/j2se-modular-project/1"/>
1433     </target>
1434     <target depends="init,-pre-debug-fix,-do-debug-fix" if="netbeans.home" name="debug-fix"/>
1435     <!--
1436                 =================
1437                 PROFILING SECTION
1438                 =================
1439             -->
1440     <!--
1441                 pre NB7.2 profiler integration
1442             -->
1443     <target depends="profile-init,compile" description="Profile a project in the IDE." if="profiler.info.jvmargs.agent" name="-profile-pre72">
1444         <fail unless="netbeans.home">This target only works when run from inside the NetBeans IDE.</fail>
1445         <nbprofiledirect>
1446             <classpath>
1447                 <path path="${run.classpath}"/>
1448             </classpath>
1449         </nbprofiledirect>
1450         <profile/>
1451     </target>
1452     <target depends="profile-init,compile-single" description="Profile a selected class in the IDE." if="profiler.info.jvmargs.agent" name="-profile-single-pre72">
1453         <fail unless="profile.class">Must select one file in the IDE or set profile.class</fail>
1454         <fail unless="netbeans.home">This target only works when run from inside the NetBeans IDE.</fail>
1455         <nbprofiledirect>
1456             <classpath>
1457                 <path path="${run.classpath}"/>
1458             </classpath>
1459         </nbprofiledirect>
1460         <profile classname="${profile.class}"/>
1461     </target>
1462     <target depends="profile-init,compile-single" if="profiler.info.jvmargs.agent" name="-profile-applet-pre72">
1463         <fail unless="netbeans.home">This target only works when run from inside the NetBeans IDE.</fail>
1464         <nbprofiledirect>
1465             <classpath>
1466                 <path path="${run.classpath}"/>
1467             </classpath>
1468         </nbprofiledirect>
1469         <profile classname="sun.applet.AppletViewer">
1470             <customize>
1471                 <arg value="${applet.url}"/>
1472             </customize>
1473         </profile>
1474     </target>
1475     <target depends="-init-macrodef-junit,profile-init,compile-test-single" if="profiler.info.jvmargs.agent" name="-profile-test-single-pre72">
1476         <fail unless="netbeans.home">This target only works when run from inside the NetBeans IDE.</fail>
1477         <nbprofiledirect>
1478             <classpath>
1479                 <path path="${run.test.classpath}"/>
1480             </classpath>
1481         </nbprofiledirect>
1482         <j2semodularproject1:junit xmlns:j2semodularproject1="http://www.netbeans.org/ns/j2se-modular-project/1" excludes="${excludes}" includes="${includes}" testincludes="${profile.class}" testmethods="">
1483             <customize>
1484                 <jvmarg value="-agentlib:jdwp=transport=${debug-transport},address=${jpda.address}"/>
1485                 <env key="${profiler.info.pathvar}" path="${profiler.info.agentpath}:${profiler.current.path}"/>
1486                 <jvmarg value="${profiler.info.jvmargs.agent}"/>
1487                 <jvmarg line="${profiler.info.jvmargs}"/>
1488                 <classpath>
1489                     <path path="${run.test.classpath}"/>
1490                 </classpath>
1491             </customize>
1492         </j2semodularproject1:junit>
1493     </target>
1494     <!--
1495                 end of pre NB72 profiling section
1496             -->
1497     <target if="netbeans.home" name="-profile-check">
1498         <condition property="profiler.configured">
1499             <or>
1500                 <contains casesensitive="true" string="${run.jvmargs.ide}" substring="-agentpath:"/>
1501                 <contains casesensitive="true" string="${run.jvmargs.ide}" substring="-javaagent:"/>
1502             </or>
1503         </condition>
1504     </target>
1505     <target depends="-profile-check,-profile-pre72" description="Profile a project in the IDE." if="profiler.configured" name="profile" unless="profiler.info.jvmargs.agent">
1506         <startprofiler/>
1507         <antcall target="run"/>
1508     </target>
1509     <target depends="-profile-check,-profile-single-pre72" description="Profile a selected class in the IDE." if="profiler.configured" name="profile-single" unless="profiler.info.jvmargs.agent">
1510         <fail unless="run.class">Must select one file in the IDE or set run.class</fail>
1511         <startprofiler/>
1512         <antcall target="run-single"/>
1513     </target>
1514     <target depends="-profile-test-single-pre72" description="Profile a selected test in the IDE." name="profile-test-single"/>
1515     <target depends="-profile-check" description="Profile a selected test in the IDE." if="profiler.configured" name="profile-test" unless="profiler.info.jvmargs">
1516         <fail unless="test.includes">Must select some files in the IDE or set test.includes</fail>
1517         <startprofiler/>
1518         <antcall target="test-single"/>
1519     </target>
1520     <target depends="-profile-check" description="Profile a selected class in the IDE." if="profiler.configured" name="profile-test-with-main">
1521         <fail unless="run.class">Must select one file in the IDE or set run.class</fail>
1522         <startprofiler/>
1523         <antcall target="run-test-with-main"/>
1524     </target>
1525     <target depends="-profile-check,-profile-applet-pre72" if="profiler.configured" name="profile-applet" unless="profiler.info.jvmargs.agent">
1526         <fail unless="applet.url">Must select one file in the IDE or set applet.url</fail>
1527         <startprofiler/>
1528         <antcall target="run-applet"/>
1529     </target>
1530     <!--
1531                 ===============
1532                 JAVADOC SECTION
1533                 ===============
1534             -->
1535     <target depends="init" if="have.sources" name="-javadoc-build">
1536         <mkdir dir="${dist.javadoc.dir}"/>
1537         <condition else="" property="javadoc.endorsed.classpath.cmd.line.arg" value="-J${endorsed.classpath.cmd.line.arg}">
1538             <and>
1539                 <isset property="endorsed.classpath.cmd.line.arg"/>
1540                 <not>
1541                     <equals arg1="${endorsed.classpath.cmd.line.arg}" arg2=""/>
1542                 </not>
1543             </and>
1544         </condition>
1545         <condition else="" property="bug5101868workaround" value="*.java">
1546             <matches pattern="1\.[56](\..*)?" string="${java.version}"/>
1547         </condition>
1548         <condition else="" property="javadoc.html5.cmd.line.arg" value="-html5">
1549             <and>
1550                 <isset property="javadoc.html5"/>
1551                 <available file="${jdk.home}${file.separator}lib${file.separator}jrt-fs.jar"/>
1552             </and>
1553         </condition>
1554         <javadoc additionalparam="-J-Dfile.encoding=${file.encoding} ${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}">
1555             <classpath>
1556                 <path path="${javac.classpath}"/>
1557             </classpath>
1558             <fileset dir="${src.dir}" excludes="${bug5101868workaround},${excludes}" includes="${includes}">
1559                 <filename name="**/*.java"/>
1560             </fileset>
1561             <fileset dir="${src.gen.dir}" excludes="${bug5101868workaround},${excludes}" includes="${includes}">
1562                 <filename name="**/*.java"/>
1563             </fileset>
1564             <fileset dir="${build.generated.sources.dir}" erroronmissingdir="false">
1565                 <include name="**/*.java"/>
1566                 <exclude name="*.java"/>
1567             </fileset>
1568             <arg line="${javadoc.endorsed.classpath.cmd.line.arg}"/>
1569             <arg line="${javadoc.html5.cmd.line.arg}"/>
1570         </javadoc>
1571         <copy todir="${dist.javadoc.dir}">
1572             <fileset dir="${src.dir}" excludes="${excludes}" includes="${includes}">
1573                 <filename name="**/doc-files/**"/>
1574             </fileset>
1575             <fileset dir="${src.gen.dir}" excludes="${excludes}" includes="${includes}">
1576                 <filename name="**/doc-files/**"/>
1577             </fileset>
1578             <fileset dir="${build.generated.sources.dir}" erroronmissingdir="false">
1579                 <include name="**/doc-files/**"/>
1580             </fileset>
1581         </copy>
1582     </target>
1583     <target depends="init,-javadoc-build" if="netbeans.home" name="-javadoc-browse" unless="no.javadoc.preview">
1584         <nbbrowse file="${dist.javadoc.dir}/index.html"/>
1585     </target>
1586     <target depends="init,-javadoc-build,-javadoc-browse" description="Build Javadoc." name="javadoc"/>
1587     <!--
1588                 =========================
1589                 TEST COMPILATION SECTION
1590                 =========================
1591             -->
1592     <target depends="init,compile" if="have.tests" name="-pre-pre-compile-test">
1593         <mkdir dir="${build.test.modules.dir}"/>
1594     </target>
1595     <target name="-pre-compile-test">
1596         <!-- Empty placeholder for easier customization. -->
1597         <!-- You can override this target in the ../build.xml file. -->
1598     </target>
1599     <target depends="-init-source-module-properties" name="-init-test-run-module-properties">
1600         <fileset dir="${build.test.modules.dir}" id="run.test.packages.internal" includes="**/*.class"/>
1601         <property location="${build.test.modules.dir}" name="build.test.modules.dir.abs.internal"/>
1602         <pathconvert pathsep=" " property="run.test.addexports.internal" refid="run.test.packages.internal">
1603             <chainedmapper>
1604                 <filtermapper>
1605                     <replacestring from="${build.test.modules.dir.abs.internal}${file.separator}" to=""/>
1606                 </filtermapper>
1607                 <regexpmapper from="^([^${file.separator.string}]*)\Q${file.separator}\E(.*)\Q${file.separator}\E.*\.class$$" to="\1${path.separator}\2"/>
1608                 <filtermapper>
1609                     <uniqfilter/>
1610                     <replacestring from="${file.separator}" to="."/>
1611                 </filtermapper>
1612                 <regexpmapper from="([^${file.separator.string}]+)${path.separator}(.*)" to="--add-exports \1/\2=ALL-UNNAMED"/>
1613             </chainedmapper>
1614         </pathconvert>
1615         <property location="${build.test.modules.dir}" name="build.test.modules.location"/>
1616         <pathconvert pathsep="," property="run.test.addmodules.list">
1617             <map from="${build.test.modules.location}${file.separator}" to=""/>
1618             <dirset dir="${build.test.modules.dir}" includes="*"/>
1619             <chainedmapper>
1620                 <filtermapper>
1621                     <uniqfilter/>
1622                 </filtermapper>
1623             </chainedmapper>
1624         </pathconvert>
1625         <pathconvert pathsep=" " property="run.test.patchmodules.list">
1626             <dirset dir="${build.test.modules.dir}" includes="*">
1627                 <custom classname="netbeans.ModuleInfoSelector" classpath="${netbeans.modular.tasks.dir}/out">
1628                     <param name="extension" value="class"/>
1629                 </custom>
1630             </dirset>
1631             <chainedmapper>
1632                 <filtermapper>
1633                     <uniqfilter/>
1634                 </filtermapper>
1635                 <regexpmapper from=".*\Q${file.separator}\E([^${file.separator.string}]+)$" to="--patch-module \1=\0"/>
1636             </chainedmapper>
1637         </pathconvert>
1638         <j2semodularproject1:coalesce_keyvalue xmlns:j2semodularproject1="http://www.netbeans.org/ns/j2se-modular-project/1" entrySep="--patch-module " multiSep="${path.separator}" property="run.test.patchmodules" value="${run.test.patchmodules.list}" valueSep="="/>
1639         <condition else="" property="run.test.addmodules.internal" value="--add-modules ${run.test.addmodules.list}">
1640             <isset property="run.test.addmodules.list"/>
1641         </condition>
1642         <pathconvert pathsep=" " property="run.test.addreads.internal">
1643             <map from="${build.test.modules.location}" to=""/>
1644             <dirset dir="${build.test.modules.dir}" includes="*"/>
1645             <chainedmapper>
1646                 <regexpmapper from="^\Q${build.test.modules.location}${file.separator}\E(.*)" to="\1"/>
1647                 <regexpmapper from="(.*)" to="--add-reads \1=ALL-UNNAMED"/>
1648                 <filtermapper>
1649                     <uniqfilter/>
1650                 </filtermapper>
1651             </chainedmapper>
1652         </pathconvert>
1653         <property name="run.test.jvmargs" value="${run.test.addmodules.internal} ${run.test.addreads.internal} ${run.test.addexports.internal} ${run.test.patchmodules}"/>
1654     </target>
1655     <target depends="-init-source-module-properties" name="-init-test-javac-module-properties">
1656         <pathconvert pathsep=" " property="compile.test.patchmodule.internal" refid="have.tests.patchset">
1657             <regexpmapper from="(.*\Q${file.separator}\E)([^${file.separator.string}]+)\Q${file.separator}\E(.*)$$" to="--patch-module \2=\1\2${file.separator.string}\3"/>
1658         </pathconvert>
1659         <pathconvert pathsep=" " property="compile.test.addreads">
1660             <union refid="have.tests.set"/>
1661             <chainedmapper>
1662                 <firstmatchmapper>
1663                     <regexpmapper from="${have.tests.test.src.dir.regexp}" to="\1"/>
1664                 </firstmatchmapper>
1665                 <regexpmapper from="(.*)" to="--add-reads \1=ALL-UNNAMED"/>
1666                 <filtermapper>
1667                     <uniqfilter/>
1668                 </filtermapper>
1669             </chainedmapper>
1670         </pathconvert>
1671         <j2semodularproject1:coalesce_keyvalue xmlns:j2semodularproject1="http://www.netbeans.org/ns/j2se-modular-project/1" entrySep="--patch-module " multiSep="${path.separator}" property="compile.test.patchmodules" value="${compile.test.patchmodule.internal}" valueSep="="/>
1672         <property name="javac.test.moduleargs" value="${compile.test.patchmodules} ${compile.test.addreads}"/>
1673     </target>
1674     <target depends="-init-test-javac-module-properties" name="-init-test-module-properties">
1675         <property location="${build.modules.dir}" name="test.module.build.location"/>
1676         <property name="test.source.modulepath" value="${test.src.dir}/*/${test.src.dir.path}"/>
1677         <property name="test.compile.modulepath" value="${javac.test.modulepath}:${build.modules.dir}"/>
1678         <macrodef name="test-javac" uri="http://www.netbeans.org/ns/j2se-modular-project/1">
1679             <attribute default="${includes}" name="includes"/>
1680             <attribute default="${excludes}" name="excludes"/>
1681             <element implicit="true" name="additionalargs" optional="true"/>
1682             <sequential>
1683                 <j2semodularproject1:javac xmlns:j2semodularproject1="http://www.netbeans.org/ns/j2se-modular-project/1" apgeneratedsrcdir="${build.test.modules.dir}" classpath="${javac.test.classpath}" debug="true" destdir="${build.test.modules.dir}" excludes="@{excludes}" includes="@{includes}" modulepath="${test.compile.modulepath}" modulesourcepath="${test.source.modulepath}" processorpath="${javac.test.processorpath}">
1684                     <customize>
1685                         <compilerarg line="${javac.test.moduleargs}"/>
1686                         <additionalargs/>
1687                     </customize>
1688                 </j2semodularproject1:javac>
1689             </sequential>
1690         </macrodef>
1691     </target>
1692     <target if="do.depend.true" name="-compile-test-depend">
1693         <j2semodularproject1:depend xmlns:j2semodularproject1="http://www.netbeans.org/ns/j2se-modular-project/1" classpath="${javac.test.classpath}" destdir="${build.test.classes.dir}" srcdir="${test.src.dir}"/>
1694     </target>
1695     <target depends="init,deps-jar,compile,-init-test-module-properties,-pre-pre-compile-test,-pre-compile-test,-compile-test-depend" if="have.tests" name="-do-compile-test">
1696         <j2semodularproject1:test-javac xmlns:j2semodularproject1="http://www.netbeans.org/ns/j2se-modular-project/1"/>
1697         <j2semodularproject1:modsource_regexp xmlns:j2semodularproject1="http://www.netbeans.org/ns/j2se-modular-project/1" filePattern="(.*$)" modsource="${test.src.dir.path}" property="test.src.dir.path.regexp"/>
1698         <echo message="Copying resources from ${test.src.dir}"/>
1699         <copy todir="${build.test.modules.dir}">
1700             <fileset dir="${test.src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
1701             <regexpmapper from="${test.src.dir.path.regexp}" to="\1/\3"/>
1702         </copy>
1703     </target>
1704     <target name="-post-compile-test">
1705         <!-- Empty placeholder for easier customization. -->
1706         <!-- You can override this target in the ../build.xml file. -->
1707     </target>
1708     <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test,-do-compile-test,-post-compile-test" name="compile-test"/>
1709     <target name="-pre-compile-test-single">
1710         <!-- Empty placeholder for easier customization. -->
1711         <!-- You can override this target in the ../build.xml file. -->
1712     </target>
1713     <target depends="init,deps-jar,compile,-init-test-module-properties,-pre-pre-compile-test,-pre-compile-test-single" if="have.tests" name="-do-compile-test-single">
1714         <fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail>
1715         <j2semodularproject1:force-recompile xmlns:j2semodularproject1="http://www.netbeans.org/ns/j2se-modular-project/1" destdir="${build.test.modules.dir}"/>
1716         <j2semodularproject1:test-javac xmlns:j2semodularproject1="http://www.netbeans.org/ns/j2se-modular-project/1" includes="${javac.includes}"/>
1717         <j2semodularproject1:modsource_regexp xmlns:j2semodularproject1="http://www.netbeans.org/ns/j2se-modular-project/1" filePattern="(.*$)" modsource="${test.src.dir.path}" property="test.src.dir.path.regexp"/>
1718         <echo message="Copying resources from ${test.src.dir}"/>
1719         <copy todir="${build.test.modules.dir}">
1720             <fileset dir="${test.src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
1721             <regexpmapper from="${test.src.dir.path.regexp}" to="\1/\3"/>
1722         </copy>
1723     </target>
1724     <target name="-post-compile-test-single">
1725         <!-- Empty placeholder for easier customization. -->
1726         <!-- You can override this target in the ../build.xml file. -->
1727     </target>
1728     <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test-single,-do-compile-test-single,-post-compile-test-single" name="compile-test-single"/>
1729     <!--
1730                 =======================
1731                 TEST EXECUTION SECTION
1732                 =======================
1733             -->
1734     <target depends="init" if="have.tests" name="-pre-test-run">
1735         <mkdir dir="${build.test.results.dir}"/>
1736     </target>
1737     <target name="-init-test-run">
1738         <property name="run.modules.dir" value="${build.test.modules.dir}"/>
1739     </target>
1740     <target depends="init,compile-test,-init-test-run-module-properties,-pre-test-run" if="have.tests" name="-do-test-run">
1741         <j2semodularproject1:test xmlns:j2semodularproject1="http://www.netbeans.org/ns/j2se-modular-project/1" includes="${includes}" testincludes="**/*Test.java"/>
1742     </target>
1743     <target depends="init,compile-test,-pre-test-run,-do-test-run" if="have.tests" name="-post-test-run">
1744         <fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail>
1745     </target>
1746     <target depends="init" if="have.tests" name="test-report"/>
1747     <target depends="init" if="netbeans.home+have.tests" name="-test-browse"/>
1748     <target depends="init,compile-test,-pre-test-run,-do-test-run,test-report,-post-test-run,-test-browse" description="Run unit tests." name="test"/>
1749     <target depends="init" if="have.tests" name="-pre-test-run-single">
1750         <mkdir dir="${build.test.results.dir}"/>
1751     </target>
1752     <target depends="init,compile-test-single,-init-test-run-module-properties,-pre-test-run-single" if="have.tests" name="-do-test-run-single">
1753         <fail unless="test.includes">Must select some files in the IDE or set test.includes</fail>
1754         <j2semodularproject1:test xmlns:j2semodularproject1="http://www.netbeans.org/ns/j2se-modular-project/1" excludes="" includes="${test.includes}" testincludes="${test.includes}"/>
1755     </target>
1756     <target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single" if="have.tests" name="-post-test-run-single">
1757         <fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail>
1758     </target>
1759     <target depends="init,compile-test-single,-init-test-run-module-properties,-pre-test-run-single,-do-test-run-single,-post-test-run-single" description="Run single unit test." name="test-single"/>
1760     <target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-do-test-run-single-method">
1761         <fail unless="test.class">Must select some files in the IDE or set test.class</fail>
1762         <fail unless="test.method">Must select some method in the IDE or set test.method</fail>
1763         <j2semodularproject1:test xmlns:j2semodularproject1="http://www.netbeans.org/ns/j2se-modular-project/1" excludes="" includes="${javac.includes}" testincludes="${test.class}" testmethods="${test.method}"/>
1764     </target>
1765     <target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single-method" if="have.tests" name="-post-test-run-single-method">
1766         <fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail>
1767     </target>
1768     <target depends="init,compile-test-single,-init-test-run-module-properties,-pre-test-run-single,-do-test-run-single-method,-post-test-run-single-method" description="Run single unit test." name="test-single-method"/>
1769     <!--
1770                 =======================
1771                 TEST DEBUGGING SECTION
1772                 =======================
1773             -->
1774     <target depends="init,compile-test-single,-init-test-run-module-properties,-pre-test-run-single" if="have.tests" name="-debug-start-debuggee-test">
1775         <fail unless="test.class">Must select one file in the IDE or set test.class</fail>
1776         <j2semodularproject1:test-debug xmlns:j2semodularproject1="http://www.netbeans.org/ns/j2se-modular-project/1" excludes="" includes="${javac.includes}" testClass="${test.class}" testincludes="${javac.includes}"/>
1777     </target>
1778     <target depends="init,compile-test-single,-init-test-run-module-properties,-pre-test-run-single" if="have.tests" name="-debug-start-debuggee-test-method">
1779         <fail unless="test.class">Must select one file in the IDE or set test.class</fail>
1780         <fail unless="test.method">Must select some method in the IDE or set test.method</fail>
1781         <j2semodularproject1:test-debug xmlns:j2semodularproject1="http://www.netbeans.org/ns/j2se-modular-project/1" excludes="" includes="${javac.includes}" testClass="${test.class}" testMethod="${test.method}" testincludes="${test.class}" testmethods="${test.method}"/>
1782     </target>
1783     <target depends="init,compile-test" if="netbeans.home+have.tests" name="-debug-start-debugger-test">
1784         <j2semodularproject1:nbjpdastart xmlns:j2semodularproject1="http://www.netbeans.org/ns/j2se-modular-project/1" classpath="${debug.test.classpath}" name="${test.class}"/>
1785     </target>
1786     <target depends="init,compile-test-single,-init-test-run-module-properties,-debug-start-debugger-test,-debug-start-debuggee-test" name="debug-test"/>
1787     <target depends="init,compile-test-single,-init-test-run-module-properties,-debug-start-debugger-test,-debug-start-debuggee-test-method" name="debug-test-method"/>
1788     <target depends="debug-test-method" name="debug-single-method"/>
1789     <target depends="init,-pre-debug-fix,compile-test-single" if="netbeans.home" name="-do-debug-fix-test">
1790         <property name="debug.modules.dir" value="${build.test.modules.dir}"/>
1791         <j2semodularproject1:nbjpdareload xmlns:j2semodularproject1="http://www.netbeans.org/ns/j2se-modular-project/1"/>
1792     </target>
1793     <target depends="init,-pre-debug-fix,-do-debug-fix-test" if="netbeans.home" name="debug-fix-test"/>
1794     <!--
1795                 =========================
1796                 APPLET EXECUTION SECTION
1797                 =========================
1798             -->
1799     <target name="run-applet">
1800         <fail message="Applets are no longer supported by JDK 9"/>
1801     </target>
1802     <!--
1803                 =========================
1804                 APPLET DEBUGGING  SECTION
1805                 =========================
1806             -->
1807     <target name="-debug-start-debuggee-applet">
1808         <fail message="Applets are no longer supported by JDK 9"/>
1809     </target>
1810     <target name="debug-applet">
1811         <fail message="Applets are no longer supported by JDK 9"/>
1812     </target>
1813     <!--
1814                 ===============
1815                 CLEANUP SECTION
1816                 ===============
1817             -->
1818     <target name="-deps-clean-init" unless="built-clean.properties">
1819         <property location="${build.dir}/built-clean.properties" name="built-clean.properties"/>
1820         <delete file="${built-clean.properties}" quiet="true"/>
1821     </target>
1822     <target if="already.built.clean.${basedir}" name="-warn-already-built-clean">
1823         <echo level="warn" message="Cycle detected: panamaz was already built"/>
1824     </target>
1825     <target depends="init,-deps-clean-init" name="deps-clean" unless="no.deps">
1826         <mkdir dir="${build.dir}"/>
1827         <touch file="${built-clean.properties}" verbose="false"/>
1828         <property file="${built-clean.properties}" prefix="already.built.clean."/>
1829         <antcall target="-warn-already-built-clean"/>
1830         <propertyfile file="${built-clean.properties}">
1831             <entry key="${basedir}" value=""/>
1832         </propertyfile>
1833     </target>
1834     <target depends="init" name="-do-clean">
1835         <delete dir="${build.dir}"/>
1836         <delete dir="${dist.jlink.output}"/>
1837         <delete dir="${dist.dir}" followsymlinks="false" includeemptydirs="true"/>
1838     </target>
1839     <target name="-post-clean">
1840         <!-- Empty placeholder for easier customization. -->
1841         <!-- You can override this target in the ../build.xml file. -->
1842     </target>
1843     <target name="-recompile-netbeans-tasks-after-clean">
1844         <antcall inheritall="false" target="-init-compile-netbeans-tasks"/>
1845     </target>
1846     <target depends="init,deps-clean,-do-clean,-recompile-netbeans-tasks-after-clean,-post-clean" description="Clean build products." name="clean"/>
1847     <target name="-check-call-dep">
1848         <property file="${call.built.properties}" prefix="already.built."/>
1849         <condition property="should.call.dep">
1850             <and>
1851                 <not>
1852                     <isset property="already.built.${call.subproject}"/>
1853                 </not>
1854                 <available file="${call.script}"/>
1855             </and>
1856         </condition>
1857     </target>
1858     <target depends="-check-call-dep" if="should.call.dep" name="-maybe-call-dep">
1859         <ant antfile="${call.script}" inheritall="false" target="${call.target}">
1860             <propertyset>
1861                 <propertyref prefix="transfer."/>
1862                 <mapper from="transfer.*" to="*" type="glob"/>
1863             </propertyset>
1864         </ant>
1865     </target>
1866 </project>