OSDN Git Service

Release 0.5a
[mdc/BetaProject.git] / nbproject / build-impl.xml
1 <?xml version="1.0" encoding="UTF-8"?>
2 <!--
3 *** GENERATED FROM project.xml - DO NOT EDIT  ***
4 ***         EDIT ../build.xml INSTEAD         ***
5
6 For the purpose of easier reading the script
7 is divided into following sections:
8
9   - initialization
10   - compilation
11   - jar
12   - execution
13   - debugging
14   - javadoc
15   - junit compilation
16   - junit execution
17   - junit debugging
18   - applet
19   - cleanup
20
21         -->
22 <project xmlns:j2seproject1="http://www.netbeans.org/ns/j2se-project/1" xmlns:j2seproject3="http://www.netbeans.org/ns/j2se-project/3" xmlns:jaxrpc="http://www.netbeans.org/ns/j2se-project/jax-rpc" basedir=".." default="default" name="mdc2-impl">
23     <fail message="Please build using Ant 1.7.1 or higher.">
24         <condition>
25             <not>
26                 <antversion atleast="1.7.1"/>
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="1.4"/>
50         <property name="default.javac.target" value="1.4"/>
51     </target>
52     <target depends="-pre-init,-init-private,-init-user" name="-init-project">
53         <property file="nbproject/configs/${config}.properties"/>
54         <property file="nbproject/project.properties"/>
55     </target>
56     <target depends="-pre-init,-init-private,-init-user,-init-project,-init-macrodef-property" name="-do-init">
57         <available file="${manifest.file}" property="manifest.available"/>
58         <condition property="main.class.available">
59             <and>
60                 <isset property="main.class"/>
61                 <not>
62                     <equals arg1="${main.class}" arg2="" trim="true"/>
63                 </not>
64             </and>
65         </condition>
66         <condition property="manifest.available+main.class">
67             <and>
68                 <isset property="manifest.available"/>
69                 <isset property="main.class.available"/>
70             </and>
71         </condition>
72         <condition property="do.mkdist">
73             <and>
74                 <isset property="libs.CopyLibs.classpath"/>
75                 <not>
76                     <istrue value="${mkdist.disabled}"/>
77                 </not>
78             </and>
79         </condition>
80         <condition property="manifest.available+main.class+mkdist.available">
81             <and>
82                 <istrue value="${manifest.available+main.class}"/>
83                 <isset property="do.mkdist"/>
84             </and>
85         </condition>
86         <condition property="manifest.available+mkdist.available">
87             <and>
88                 <istrue value="${manifest.available}"/>
89                 <isset property="do.mkdist"/>
90             </and>
91         </condition>
92         <condition property="manifest.available-mkdist.available">
93             <or>
94                 <istrue value="${manifest.available}"/>
95                 <isset property="do.mkdist"/>
96             </or>
97         </condition>
98         <condition property="manifest.available+main.class-mkdist.available">
99             <or>
100                 <istrue value="${manifest.available+main.class}"/>
101                 <isset property="do.mkdist"/>
102             </or>
103         </condition>
104         <condition property="have.tests">
105             <or>
106                 <available file="${test.test.dir}"/>
107             </or>
108         </condition>
109         <condition property="have.sources">
110             <or>
111                 <available file="${src.src.dir}"/>
112             </or>
113         </condition>
114         <condition property="netbeans.home+have.tests">
115             <and>
116                 <isset property="netbeans.home"/>
117                 <isset property="have.tests"/>
118             </and>
119         </condition>
120         <condition property="no.javadoc.preview">
121             <and>
122                 <isset property="javadoc.preview"/>
123                 <isfalse value="${javadoc.preview}"/>
124             </and>
125         </condition>
126         <property name="run.jvmargs" value=""/>
127         <property name="javac.compilerargs" value=""/>
128         <property name="work.dir" value="${basedir}"/>
129         <condition property="no.deps">
130             <and>
131                 <istrue value="${no.dependencies}"/>
132             </and>
133         </condition>
134         <property name="javac.debug" value="true"/>
135         <property name="javadoc.preview" value="true"/>
136         <property name="application.args" value=""/>
137         <property name="source.encoding" value="${file.encoding}"/>
138         <property name="runtime.encoding" value="${source.encoding}"/>
139         <condition property="javadoc.encoding.used" value="${javadoc.encoding}">
140             <and>
141                 <isset property="javadoc.encoding"/>
142                 <not>
143                     <equals arg1="${javadoc.encoding}" arg2=""/>
144                 </not>
145             </and>
146         </condition>
147         <property name="javadoc.encoding.used" value="${source.encoding}"/>
148         <property name="includes" value="**"/>
149         <property name="excludes" value=""/>
150         <property name="do.depend" value="false"/>
151         <condition property="do.depend.true">
152             <istrue value="${do.depend}"/>
153         </condition>
154         <path id="endorsed.classpath.path" path="${endorsed.classpath}"/>
155         <condition else="" property="endorsed.classpath.cmd.line.arg" value="-Xbootclasspath/p:'${toString:endorsed.classpath.path}'">
156             <length length="0" string="${endorsed.classpath}" when="greater"/>
157         </condition>
158         <property name="javac.fork" value="false"/>
159     </target>
160     <target name="-post-init">
161         <!-- Empty placeholder for easier customization. -->
162         <!-- You can override this target in the ../build.xml file. -->
163     </target>
164     <target depends="-pre-init,-init-private,-init-user,-init-project,-do-init" name="-init-check">
165         <fail unless="src.src.dir">Must set src.src.dir</fail>
166         <fail unless="test.test.dir">Must set test.test.dir</fail>
167         <fail unless="build.dir">Must set build.dir</fail>
168         <fail unless="dist.dir">Must set dist.dir</fail>
169         <fail unless="build.classes.dir">Must set build.classes.dir</fail>
170         <fail unless="dist.javadoc.dir">Must set dist.javadoc.dir</fail>
171         <fail unless="build.test.classes.dir">Must set build.test.classes.dir</fail>
172         <fail unless="build.test.results.dir">Must set build.test.results.dir</fail>
173         <fail unless="build.classes.excludes">Must set build.classes.excludes</fail>
174         <fail unless="dist.jar">Must set dist.jar</fail>
175     </target>
176     <target name="-init-macrodef-property">
177         <macrodef name="property" uri="http://www.netbeans.org/ns/j2se-project/1">
178             <attribute name="name"/>
179             <attribute name="value"/>
180             <sequential>
181                 <property name="@{name}" value="${@{value}}"/>
182             </sequential>
183         </macrodef>
184     </target>
185     <target name="-init-macrodef-javac">
186         <macrodef name="javac" uri="http://www.netbeans.org/ns/j2se-project/3">
187             <attribute default="${src.src.dir}" name="srcdir"/>
188             <attribute default="${build.classes.dir}" name="destdir"/>
189             <attribute default="${javac.classpath}" name="classpath"/>
190             <attribute default="${includes}" name="includes"/>
191             <attribute default="${excludes}" name="excludes"/>
192             <attribute default="${javac.debug}" name="debug"/>
193             <attribute default="${empty.dir}" name="sourcepath"/>
194             <attribute default="${empty.dir}" name="gensrcdir"/>
195             <element name="customize" optional="true"/>
196             <sequential>
197                 <property location="${build.dir}/empty" name="empty.dir"/>
198                 <mkdir dir="${empty.dir}"/>
199                 <javac debug="@{debug}" deprecation="${javac.deprecation}" destdir="@{destdir}" encoding="${source.encoding}" excludes="@{excludes}" fork="${javac.fork}" includeantruntime="false" includes="@{includes}" source="${javac.source}" sourcepath="@{sourcepath}" srcdir="@{srcdir}" target="${javac.target}" tempdir="${java.io.tmpdir}">
200                     <src>
201                         <dirset dir="@{gensrcdir}" erroronmissingdir="false">
202                             <include name="*"/>
203                         </dirset>
204                     </src>
205                     <classpath>
206                         <path path="@{classpath}"/>
207                     </classpath>
208                     <compilerarg line="${endorsed.classpath.cmd.line.arg}"/>
209                     <compilerarg line="${javac.compilerargs}"/>
210                     <customize/>
211                 </javac>
212             </sequential>
213         </macrodef>
214         <macrodef name="depend" uri="http://www.netbeans.org/ns/j2se-project/3">
215             <attribute default="${src.src.dir}" name="srcdir"/>
216             <attribute default="${build.classes.dir}" name="destdir"/>
217             <attribute default="${javac.classpath}" name="classpath"/>
218             <sequential>
219                 <depend cache="${build.dir}/depcache" destdir="@{destdir}" excludes="${excludes}" includes="${includes}" srcdir="@{srcdir}">
220                     <classpath>
221                         <path path="@{classpath}"/>
222                     </classpath>
223                 </depend>
224             </sequential>
225         </macrodef>
226         <macrodef name="force-recompile" uri="http://www.netbeans.org/ns/j2se-project/3">
227             <attribute default="${build.classes.dir}" name="destdir"/>
228             <sequential>
229                 <fail unless="javac.includes">Must set javac.includes</fail>
230                 <pathconvert pathsep="," property="javac.includes.binary">
231                     <path>
232                         <filelist dir="@{destdir}" files="${javac.includes}"/>
233                     </path>
234                     <globmapper from="*.java" to="*.class"/>
235                 </pathconvert>
236                 <delete>
237                     <files includes="${javac.includes.binary}"/>
238                 </delete>
239             </sequential>
240         </macrodef>
241     </target>
242     <target name="-init-macrodef-junit">
243         <macrodef name="junit" uri="http://www.netbeans.org/ns/j2se-project/3">
244             <attribute default="${includes}" name="includes"/>
245             <attribute default="${excludes}" name="excludes"/>
246             <attribute default="**" name="testincludes"/>
247             <sequential>
248                 <junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" showoutput="true" tempdir="${build.dir}">
249                     <batchtest todir="${build.test.results.dir}">
250                         <fileset dir="${test.test.dir}" excludes="@{excludes},${excludes}" includes="@{includes}">
251                             <filename name="@{testincludes}"/>
252                         </fileset>
253                     </batchtest>
254                     <classpath>
255                         <path path="${run.test.classpath}"/>
256                     </classpath>
257                     <syspropertyset>
258                         <propertyref prefix="test-sys-prop."/>
259                         <mapper from="test-sys-prop.*" to="*" type="glob"/>
260                     </syspropertyset>
261                     <formatter type="brief" usefile="false"/>
262                     <formatter type="xml"/>
263                     <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
264                     <jvmarg line="${run.jvmargs}"/>
265                 </junit>
266             </sequential>
267         </macrodef>
268     </target>
269     <target depends="-init-debug-args" name="-init-macrodef-nbjpda">
270         <macrodef name="nbjpdastart" uri="http://www.netbeans.org/ns/j2se-project/1">
271             <attribute default="${main.class}" name="name"/>
272             <attribute default="${debug.classpath}" name="classpath"/>
273             <attribute default="" name="stopclassname"/>
274             <sequential>
275                 <nbjpdastart addressproperty="jpda.address" name="@{name}" stopclassname="@{stopclassname}" transport="${debug-transport}">
276                     <classpath>
277                         <path path="@{classpath}"/>
278                     </classpath>
279                 </nbjpdastart>
280             </sequential>
281         </macrodef>
282         <macrodef name="nbjpdareload" uri="http://www.netbeans.org/ns/j2se-project/1">
283             <attribute default="${build.classes.dir}" name="dir"/>
284             <sequential>
285                 <nbjpdareload>
286                     <fileset dir="@{dir}" includes="${fix.classes}">
287                         <include name="${fix.includes}*.class"/>
288                     </fileset>
289                 </nbjpdareload>
290             </sequential>
291         </macrodef>
292     </target>
293     <target name="-init-debug-args">
294         <property name="version-output" value="java version &quot;${ant.java.version}"/>
295         <condition property="have-jdk-older-than-1.4">
296             <or>
297                 <contains string="${version-output}" substring="java version &quot;1.0"/>
298                 <contains string="${version-output}" substring="java version &quot;1.1"/>
299                 <contains string="${version-output}" substring="java version &quot;1.2"/>
300                 <contains string="${version-output}" substring="java version &quot;1.3"/>
301             </or>
302         </condition>
303         <condition else="-Xdebug" property="debug-args-line" value="-Xdebug -Xnoagent -Djava.compiler=none">
304             <istrue value="${have-jdk-older-than-1.4}"/>
305         </condition>
306         <condition else="dt_socket" property="debug-transport-by-os" value="dt_shmem">
307             <os family="windows"/>
308         </condition>
309         <condition else="${debug-transport-by-os}" property="debug-transport" value="${debug.transport}">
310             <isset property="debug.transport"/>
311         </condition>
312     </target>
313     <target depends="-init-debug-args" name="-init-macrodef-debug">
314         <macrodef name="debug" uri="http://www.netbeans.org/ns/j2se-project/3">
315             <attribute default="${main.class}" name="classname"/>
316             <attribute default="${debug.classpath}" name="classpath"/>
317             <element name="customize" optional="true"/>
318             <sequential>
319                 <java classname="@{classname}" dir="${work.dir}" fork="true">
320                     <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
321                     <jvmarg line="${debug-args-line}"/>
322                     <jvmarg value="-Xrunjdwp:transport=${debug-transport},address=${jpda.address}"/>
323                     <jvmarg value="-Dfile.encoding=${runtime.encoding}"/>
324                     <redirector errorencoding="${runtime.encoding}" inputencoding="${runtime.encoding}" outputencoding="${runtime.encoding}"/>
325                     <jvmarg line="${run.jvmargs}"/>
326                     <classpath>
327                         <path path="@{classpath}"/>
328                     </classpath>
329                     <syspropertyset>
330                         <propertyref prefix="run-sys-prop."/>
331                         <mapper from="run-sys-prop.*" to="*" type="glob"/>
332                     </syspropertyset>
333                     <customize/>
334                 </java>
335             </sequential>
336         </macrodef>
337     </target>
338     <target name="-init-macrodef-java">
339         <macrodef name="java" uri="http://www.netbeans.org/ns/j2se-project/1">
340             <attribute default="${main.class}" name="classname"/>
341             <attribute default="${run.classpath}" name="classpath"/>
342             <element name="customize" optional="true"/>
343             <sequential>
344                 <java classname="@{classname}" dir="${work.dir}" fork="true">
345                     <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
346                     <jvmarg value="-Dfile.encoding=${runtime.encoding}"/>
347                     <redirector errorencoding="${runtime.encoding}" inputencoding="${runtime.encoding}" outputencoding="${runtime.encoding}"/>
348                     <jvmarg line="${run.jvmargs}"/>
349                     <classpath>
350                         <path path="@{classpath}"/>
351                     </classpath>
352                     <syspropertyset>
353                         <propertyref prefix="run-sys-prop."/>
354                         <mapper from="run-sys-prop.*" to="*" type="glob"/>
355                     </syspropertyset>
356                     <customize/>
357                 </java>
358             </sequential>
359         </macrodef>
360     </target>
361     <target name="-init-presetdef-jar">
362         <presetdef name="jar" uri="http://www.netbeans.org/ns/j2se-project/1">
363             <jar compress="${jar.compress}" jarfile="${dist.jar}">
364                 <j2seproject1:fileset dir="${build.classes.dir}"/>
365             </jar>
366         </presetdef>
367     </target>
368     <target depends="-pre-init,-init-private,-init-user,-init-project,-do-init,-post-init,-init-check,-init-macrodef-property,-init-macrodef-javac,-init-macrodef-junit,-init-macrodef-nbjpda,-init-macrodef-debug,-init-macrodef-java,-init-presetdef-jar" name="init"/>
369     <!--
370                 ===================
371                 COMPILATION SECTION
372                 ===================
373             -->
374     <target name="-deps-jar-init" unless="built-jar.properties">
375         <property location="${build.dir}/built-jar.properties" name="built-jar.properties"/>
376         <delete file="${built-jar.properties}" quiet="true"/>
377     </target>
378     <target if="already.built.jar.${basedir}" name="-warn-already-built-jar">
379         <echo level="warn" message="Cycle detected: mdc2 was already built"/>
380     </target>
381     <target depends="init,-deps-jar-init" name="deps-jar" unless="no.deps">
382         <mkdir dir="${build.dir}"/>
383         <touch file="${built-jar.properties}" verbose="false"/>
384         <property file="${built-jar.properties}" prefix="already.built.jar."/>
385         <antcall target="-warn-already-built-jar"/>
386         <propertyfile file="${built-jar.properties}">
387             <entry key="${basedir}" value=""/>
388         </propertyfile>
389     </target>
390     <target depends="init,-check-automatic-build,-clean-after-automatic-build" name="-verify-automatic-build"/>
391     <target depends="init" name="-check-automatic-build">
392         <available file="${build.classes.dir}/.netbeans_automatic_build" property="netbeans.automatic.build"/>
393     </target>
394     <target depends="init" if="netbeans.automatic.build" name="-clean-after-automatic-build">
395         <antcall target="clean"/>
396     </target>
397     <target depends="init,deps-jar" name="-pre-pre-compile">
398         <mkdir dir="${build.classes.dir}"/>
399     </target>
400     <target name="-pre-compile">
401         <!-- Empty placeholder for easier customization. -->
402         <!-- You can override this target in the ../build.xml file. -->
403     </target>
404     <target if="do.depend.true" name="-compile-depend">
405         <pathconvert property="build.generated.subdirs">
406             <dirset dir="${build.generated.sources.dir}" erroronmissingdir="false">
407                 <include name="*"/>
408             </dirset>
409         </pathconvert>
410         <j2seproject3:depend srcdir="${src.src.dir}:${build.generated.subdirs}"/>
411     </target>
412     <target depends="init,deps-jar,-pre-pre-compile,-pre-compile,-compile-depend" if="have.sources" name="-do-compile">
413         <j2seproject3:javac gensrcdir="${build.generated.sources.dir}"/>
414         <copy todir="${build.classes.dir}">
415             <fileset dir="${src.src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
416         </copy>
417     </target>
418     <target name="-post-compile">
419         <!-- Empty placeholder for easier customization. -->
420         <!-- You can override this target in the ../build.xml file. -->
421     </target>
422     <target depends="init,deps-jar,-verify-automatic-build,-pre-pre-compile,-pre-compile,-do-compile,-post-compile" description="Compile project." name="compile"/>
423     <target name="-pre-compile-single">
424         <!-- Empty placeholder for easier customization. -->
425         <!-- You can override this target in the ../build.xml file. -->
426     </target>
427     <target depends="init,deps-jar,-pre-pre-compile" name="-do-compile-single">
428         <fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail>
429         <j2seproject3:force-recompile/>
430         <j2seproject3:javac excludes="" gensrcdir="${build.generated.sources.dir}" includes="${javac.includes}" sourcepath="${src.src.dir}"/>
431     </target>
432     <target name="-post-compile-single">
433         <!-- Empty placeholder for easier customization. -->
434         <!-- You can override this target in the ../build.xml file. -->
435     </target>
436     <target depends="init,deps-jar,-verify-automatic-build,-pre-pre-compile,-pre-compile-single,-do-compile-single,-post-compile-single" name="compile-single"/>
437     <!--
438                 ====================
439                 JAR BUILDING SECTION
440                 ====================
441             -->
442     <target depends="init" name="-pre-pre-jar">
443         <dirname file="${dist.jar}" property="dist.jar.dir"/>
444         <mkdir dir="${dist.jar.dir}"/>
445     </target>
446     <target name="-pre-jar">
447         <!-- Empty placeholder for easier customization. -->
448         <!-- You can override this target in the ../build.xml file. -->
449     </target>
450     <target depends="init,compile,-pre-pre-jar,-pre-jar" name="-do-jar-without-manifest" unless="manifest.available-mkdist.available">
451         <j2seproject1:jar/>
452     </target>
453     <target depends="init,compile,-pre-pre-jar,-pre-jar" if="manifest.available" name="-do-jar-with-manifest" unless="manifest.available+main.class-mkdist.available">
454         <j2seproject1:jar manifest="${manifest.file}"/>
455     </target>
456     <target depends="init,compile,-pre-pre-jar,-pre-jar" if="manifest.available+main.class" name="-do-jar-with-mainclass" unless="manifest.available+main.class+mkdist.available">
457         <j2seproject1:jar manifest="${manifest.file}">
458             <j2seproject1:manifest>
459                 <j2seproject1:attribute name="Main-Class" value="${main.class}"/>
460             </j2seproject1:manifest>
461         </j2seproject1:jar>
462         <echo>To run this application from the command line without Ant, try:</echo>
463         <property location="${build.classes.dir}" name="build.classes.dir.resolved"/>
464         <property location="${dist.jar}" name="dist.jar.resolved"/>
465         <pathconvert property="run.classpath.with.dist.jar">
466             <path path="${run.classpath}"/>
467             <map from="${build.classes.dir.resolved}" to="${dist.jar.resolved}"/>
468         </pathconvert>
469         <echo>java -cp "${run.classpath.with.dist.jar}" ${main.class}</echo>
470     </target>
471     <target depends="init,compile,-pre-pre-jar,-pre-jar" if="manifest.available+main.class+mkdist.available" name="-do-jar-with-libraries">
472         <property location="${build.classes.dir}" name="build.classes.dir.resolved"/>
473         <pathconvert property="run.classpath.without.build.classes.dir">
474             <path path="${run.classpath}"/>
475             <map from="${build.classes.dir.resolved}" to=""/>
476         </pathconvert>
477         <pathconvert pathsep=" " property="jar.classpath">
478             <path path="${run.classpath.without.build.classes.dir}"/>
479             <chainedmapper>
480                 <flattenmapper/>
481                 <globmapper from="*" to="lib/*"/>
482             </chainedmapper>
483         </pathconvert>
484         <taskdef classname="org.netbeans.modules.java.j2seproject.copylibstask.CopyLibs" classpath="${libs.CopyLibs.classpath}" name="copylibs"/>
485         <copylibs compress="${jar.compress}" jarfile="${dist.jar}" manifest="${manifest.file}" runtimeclasspath="${run.classpath.without.build.classes.dir}">
486             <fileset dir="${build.classes.dir}"/>
487             <manifest>
488                 <attribute name="Main-Class" value="${main.class}"/>
489                 <attribute name="Class-Path" value="${jar.classpath}"/>
490             </manifest>
491         </copylibs>
492         <echo>To run this application from the command line without Ant, try:</echo>
493         <property location="${dist.jar}" name="dist.jar.resolved"/>
494         <echo>java -jar "${dist.jar.resolved}"</echo>
495     </target>
496     <target depends="init,compile,-pre-pre-jar,-pre-jar" if="manifest.available+mkdist.available" name="-do-jar-with-libraries-without-mainclass" unless="main.class.available">
497         <property location="${build.classes.dir}" name="build.classes.dir.resolved"/>
498         <pathconvert property="run.classpath.without.build.classes.dir">
499             <path path="${run.classpath}"/>
500             <map from="${build.classes.dir.resolved}" to=""/>
501         </pathconvert>
502         <pathconvert pathsep=" " property="jar.classpath">
503             <path path="${run.classpath.without.build.classes.dir}"/>
504             <chainedmapper>
505                 <flattenmapper/>
506                 <globmapper from="*" to="lib/*"/>
507             </chainedmapper>
508         </pathconvert>
509         <taskdef classname="org.netbeans.modules.java.j2seproject.copylibstask.CopyLibs" classpath="${libs.CopyLibs.classpath}" name="copylibs"/>
510         <copylibs compress="${jar.compress}" jarfile="${dist.jar}" manifest="${manifest.file}" runtimeclasspath="${run.classpath.without.build.classes.dir}">
511             <fileset dir="${build.classes.dir}"/>
512             <manifest>
513                 <attribute name="Class-Path" value="${jar.classpath}"/>
514             </manifest>
515         </copylibs>
516     </target>
517     <target depends="init,compile,-pre-pre-jar,-pre-jar" if="do.mkdist" name="-do-jar-with-libraries-without-manifest" unless="manifest.available">
518         <property location="${build.classes.dir}" name="build.classes.dir.resolved"/>
519         <pathconvert property="run.classpath.without.build.classes.dir">
520             <path path="${run.classpath}"/>
521             <map from="${build.classes.dir.resolved}" to=""/>
522         </pathconvert>
523         <pathconvert pathsep=" " property="jar.classpath">
524             <path path="${run.classpath.without.build.classes.dir}"/>
525             <chainedmapper>
526                 <flattenmapper/>
527                 <globmapper from="*" to="lib/*"/>
528             </chainedmapper>
529         </pathconvert>
530         <taskdef classname="org.netbeans.modules.java.j2seproject.copylibstask.CopyLibs" classpath="${libs.CopyLibs.classpath}" name="copylibs"/>
531         <copylibs compress="${jar.compress}" jarfile="${dist.jar}" runtimeclasspath="${run.classpath.without.build.classes.dir}">
532             <fileset dir="${build.classes.dir}"/>
533             <manifest>
534                 <attribute name="Class-Path" value="${jar.classpath}"/>
535             </manifest>
536         </copylibs>
537     </target>
538     <target name="-post-jar">
539         <!-- Empty placeholder for easier customization. -->
540         <!-- You can override this target in the ../build.xml file. -->
541     </target>
542     <target depends="init,compile,-pre-jar,-do-jar-with-manifest,-do-jar-without-manifest,-do-jar-with-mainclass,-do-jar-with-libraries,-do-jar-with-libraries-without-mainclass,-do-jar-with-libraries-without-manifest,-post-jar" description="Build JAR." name="jar"/>
543     <!--
544                 =================
545                 EXECUTION SECTION
546                 =================
547             -->
548     <target depends="init,compile" description="Run a main class." name="run">
549         <j2seproject1:java>
550             <customize>
551                 <arg line="${application.args}"/>
552             </customize>
553         </j2seproject1:java>
554     </target>
555     <target name="-do-not-recompile">
556         <property name="javac.includes.binary" value=""/>
557     </target>
558     <target depends="init,compile-single" name="run-single">
559         <fail unless="run.class">Must select one file in the IDE or set run.class</fail>
560         <j2seproject1:java classname="${run.class}"/>
561     </target>
562     <target depends="init,compile-test-single" name="run-test-with-main">
563         <fail unless="run.class">Must select one file in the IDE or set run.class</fail>
564         <j2seproject1:java classname="${run.class}" classpath="${run.test.classpath}"/>
565     </target>
566     <!--
567                 =================
568                 DEBUGGING SECTION
569                 =================
570             -->
571     <target depends="init" if="netbeans.home" name="-debug-start-debugger">
572         <j2seproject1:nbjpdastart name="${debug.class}"/>
573     </target>
574     <target depends="init" if="netbeans.home" name="-debug-start-debugger-main-test">
575         <j2seproject1:nbjpdastart classpath="${debug.test.classpath}" name="${debug.class}"/>
576     </target>
577     <target depends="init,compile" name="-debug-start-debuggee">
578         <j2seproject3:debug>
579             <customize>
580                 <arg line="${application.args}"/>
581             </customize>
582         </j2seproject3:debug>
583     </target>
584     <target depends="init,compile,-debug-start-debugger,-debug-start-debuggee" description="Debug project in IDE." if="netbeans.home" name="debug"/>
585     <target depends="init" if="netbeans.home" name="-debug-start-debugger-stepinto">
586         <j2seproject1:nbjpdastart stopclassname="${main.class}"/>
587     </target>
588     <target depends="init,compile,-debug-start-debugger-stepinto,-debug-start-debuggee" if="netbeans.home" name="debug-stepinto"/>
589     <target depends="init,compile-single" if="netbeans.home" name="-debug-start-debuggee-single">
590         <fail unless="debug.class">Must select one file in the IDE or set debug.class</fail>
591         <j2seproject3:debug classname="${debug.class}"/>
592     </target>
593     <target depends="init,compile-single,-debug-start-debugger,-debug-start-debuggee-single" if="netbeans.home" name="debug-single"/>
594     <target depends="init,compile-test-single" if="netbeans.home" name="-debug-start-debuggee-main-test">
595         <fail unless="debug.class">Must select one file in the IDE or set debug.class</fail>
596         <j2seproject3:debug classname="${debug.class}" classpath="${debug.test.classpath}"/>
597     </target>
598     <target depends="init,compile-test-single,-debug-start-debugger-main-test,-debug-start-debuggee-main-test" if="netbeans.home" name="debug-test-with-main"/>
599     <target depends="init" name="-pre-debug-fix">
600         <fail unless="fix.includes">Must set fix.includes</fail>
601         <property name="javac.includes" value="${fix.includes}.java"/>
602     </target>
603     <target depends="init,-pre-debug-fix,compile-single" if="netbeans.home" name="-do-debug-fix">
604         <j2seproject1:nbjpdareload/>
605     </target>
606     <target depends="init,-pre-debug-fix,-do-debug-fix" if="netbeans.home" name="debug-fix"/>
607     <!--
608                 ===============
609                 JAVADOC SECTION
610                 ===============
611             -->
612     <target depends="init" name="-javadoc-build">
613         <mkdir dir="${dist.javadoc.dir}"/>
614         <javadoc additionalparam="${javadoc.additionalparam}" author="${javadoc.author}" charset="UTF-8" destdir="${dist.javadoc.dir}" docencoding="UTF-8" encoding="${javadoc.encoding.used}" failonerror="true" noindex="${javadoc.noindex}" nonavbar="${javadoc.nonavbar}" notree="${javadoc.notree}" private="${javadoc.private}" source="${javac.source}" splitindex="${javadoc.splitindex}" use="${javadoc.use}" useexternalfile="true" version="${javadoc.version}" windowtitle="${javadoc.windowtitle}">
615             <classpath>
616                 <path path="${javac.classpath}"/>
617             </classpath>
618             <fileset dir="${src.src.dir}" excludes="${excludes}" includes="${includes}">
619                 <filename name="**/*.java"/>
620             </fileset>
621             <fileset dir="${build.generated.sources.dir}" erroronmissingdir="false">
622                 <include name="**/*.java"/>
623             </fileset>
624         </javadoc>
625     </target>
626     <target depends="init,-javadoc-build" if="netbeans.home" name="-javadoc-browse" unless="no.javadoc.preview">
627         <nbbrowse file="${dist.javadoc.dir}/index.html"/>
628     </target>
629     <target depends="init,-javadoc-build,-javadoc-browse" description="Build Javadoc." name="javadoc"/>
630     <!--
631                 =========================
632                 JUNIT COMPILATION SECTION
633                 =========================
634             -->
635     <target depends="init,compile" if="have.tests" name="-pre-pre-compile-test">
636         <mkdir dir="${build.test.classes.dir}"/>
637     </target>
638     <target name="-pre-compile-test">
639         <!-- Empty placeholder for easier customization. -->
640         <!-- You can override this target in the ../build.xml file. -->
641     </target>
642     <target if="do.depend.true" name="-compile-test-depend">
643         <j2seproject3:depend classpath="${javac.test.classpath}" destdir="${build.test.classes.dir}" srcdir="${test.test.dir}"/>
644     </target>
645     <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test,-compile-test-depend" if="have.tests" name="-do-compile-test">
646         <j2seproject3:javac classpath="${javac.test.classpath}" debug="true" destdir="${build.test.classes.dir}" srcdir="${test.test.dir}"/>
647         <copy todir="${build.test.classes.dir}">
648             <fileset dir="${test.test.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
649         </copy>
650     </target>
651     <target name="-post-compile-test">
652         <!-- Empty placeholder for easier customization. -->
653         <!-- You can override this target in the ../build.xml file. -->
654     </target>
655     <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test,-do-compile-test,-post-compile-test" name="compile-test"/>
656     <target name="-pre-compile-test-single">
657         <!-- Empty placeholder for easier customization. -->
658         <!-- You can override this target in the ../build.xml file. -->
659     </target>
660     <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test-single" if="have.tests" name="-do-compile-test-single">
661         <fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail>
662         <j2seproject3:force-recompile destdir="${build.test.classes.dir}"/>
663         <j2seproject3:javac classpath="${javac.test.classpath}" debug="true" destdir="${build.test.classes.dir}" excludes="" includes="${javac.includes}" sourcepath="${test.test.dir}" srcdir="${test.test.dir}"/>
664         <copy todir="${build.test.classes.dir}">
665             <fileset dir="${test.test.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
666         </copy>
667     </target>
668     <target name="-post-compile-test-single">
669         <!-- Empty placeholder for easier customization. -->
670         <!-- You can override this target in the ../build.xml file. -->
671     </target>
672     <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test-single,-do-compile-test-single,-post-compile-test-single" name="compile-test-single"/>
673     <!--
674                 =======================
675                 JUNIT EXECUTION SECTION
676                 =======================
677             -->
678     <target depends="init" if="have.tests" name="-pre-test-run">
679         <mkdir dir="${build.test.results.dir}"/>
680     </target>
681     <target depends="init,compile-test,-pre-test-run" if="have.tests" name="-do-test-run">
682         <j2seproject3:junit testincludes="**/*Test.java"/>
683     </target>
684     <target depends="init,compile-test,-pre-test-run,-do-test-run" if="have.tests" name="-post-test-run">
685         <fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail>
686     </target>
687     <target depends="init" if="have.tests" name="test-report"/>
688     <target depends="init" if="netbeans.home+have.tests" name="-test-browse"/>
689     <target depends="init,compile-test,-pre-test-run,-do-test-run,test-report,-post-test-run,-test-browse" description="Run unit tests." name="test"/>
690     <target depends="init" if="have.tests" name="-pre-test-run-single">
691         <mkdir dir="${build.test.results.dir}"/>
692     </target>
693     <target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-do-test-run-single">
694         <fail unless="test.includes">Must select some files in the IDE or set test.includes</fail>
695         <j2seproject3:junit excludes="" includes="${test.includes}"/>
696     </target>
697     <target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single" if="have.tests" name="-post-test-run-single">
698         <fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail>
699     </target>
700     <target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single,-post-test-run-single" description="Run single unit test." name="test-single"/>
701     <!--
702                 =======================
703                 JUNIT DEBUGGING SECTION
704                 =======================
705             -->
706     <target depends="init,compile-test" if="have.tests" name="-debug-start-debuggee-test">
707         <fail unless="test.class">Must select one file in the IDE or set test.class</fail>
708         <property location="${build.test.results.dir}/TEST-${test.class}.xml" name="test.report.file"/>
709         <delete file="${test.report.file}"/>
710         <mkdir dir="${build.test.results.dir}"/>
711         <j2seproject3:debug classname="org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner" classpath="${ant.home}/lib/ant.jar:${ant.home}/lib/ant-junit.jar:${debug.test.classpath}">
712             <customize>
713                 <syspropertyset>
714                     <propertyref prefix="test-sys-prop."/>
715                     <mapper from="test-sys-prop.*" to="*" type="glob"/>
716                 </syspropertyset>
717                 <arg value="${test.class}"/>
718                 <arg value="showoutput=true"/>
719                 <arg value="formatter=org.apache.tools.ant.taskdefs.optional.junit.BriefJUnitResultFormatter"/>
720                 <arg value="formatter=org.apache.tools.ant.taskdefs.optional.junit.XMLJUnitResultFormatter,${test.report.file}"/>
721             </customize>
722         </j2seproject3:debug>
723     </target>
724     <target depends="init,compile-test" if="netbeans.home+have.tests" name="-debug-start-debugger-test">
725         <j2seproject1:nbjpdastart classpath="${debug.test.classpath}" name="${test.class}"/>
726     </target>
727     <target depends="init,compile-test-single,-debug-start-debugger-test,-debug-start-debuggee-test" name="debug-test"/>
728     <target depends="init,-pre-debug-fix,compile-test-single" if="netbeans.home" name="-do-debug-fix-test">
729         <j2seproject1:nbjpdareload dir="${build.test.classes.dir}"/>
730     </target>
731     <target depends="init,-pre-debug-fix,-do-debug-fix-test" if="netbeans.home" name="debug-fix-test"/>
732     <!--
733                 =========================
734                 APPLET EXECUTION SECTION
735                 =========================
736             -->
737     <target depends="init,compile-single" name="run-applet">
738         <fail unless="applet.url">Must select one file in the IDE or set applet.url</fail>
739         <j2seproject1:java classname="sun.applet.AppletViewer">
740             <customize>
741                 <arg value="${applet.url}"/>
742             </customize>
743         </j2seproject1:java>
744     </target>
745     <!--
746                 =========================
747                 APPLET DEBUGGING  SECTION
748                 =========================
749             -->
750     <target depends="init,compile-single" if="netbeans.home" name="-debug-start-debuggee-applet">
751         <fail unless="applet.url">Must select one file in the IDE or set applet.url</fail>
752         <j2seproject3:debug classname="sun.applet.AppletViewer">
753             <customize>
754                 <arg value="${applet.url}"/>
755             </customize>
756         </j2seproject3:debug>
757     </target>
758     <target depends="init,compile-single,-debug-start-debugger,-debug-start-debuggee-applet" if="netbeans.home" name="debug-applet"/>
759     <!--
760                 ===============
761                 CLEANUP SECTION
762                 ===============
763             -->
764     <target name="-deps-clean-init" unless="built-clean.properties">
765         <property location="${build.dir}/built-clean.properties" name="built-clean.properties"/>
766         <delete file="${built-clean.properties}" quiet="true"/>
767     </target>
768     <target if="already.built.clean.${basedir}" name="-warn-already-built-clean">
769         <echo level="warn" message="Cycle detected: mdc2 was already built"/>
770     </target>
771     <target depends="init,-deps-clean-init" name="deps-clean" unless="no.deps">
772         <mkdir dir="${build.dir}"/>
773         <touch file="${built-clean.properties}" verbose="false"/>
774         <property file="${built-clean.properties}" prefix="already.built.clean."/>
775         <antcall target="-warn-already-built-clean"/>
776         <propertyfile file="${built-clean.properties}">
777             <entry key="${basedir}" value=""/>
778         </propertyfile>
779     </target>
780     <target depends="init" name="-do-clean">
781         <delete dir="${build.dir}"/>
782         <delete dir="${dist.dir}" followsymlinks="false" includeemptydirs="true"/>
783     </target>
784     <target name="-post-clean">
785         <!-- Empty placeholder for easier customization. -->
786         <!-- You can override this target in the ../build.xml file. -->
787     </target>
788     <target depends="init,deps-clean,-do-clean,-post-clean" description="Clean build products." name="clean"/>
789     <target name="-check-call-dep">
790         <property file="${call.built.properties}" prefix="already.built."/>
791         <condition property="should.call.dep">
792             <not>
793                 <isset property="already.built.${call.subproject}"/>
794             </not>
795         </condition>
796     </target>
797     <target depends="-check-call-dep" if="should.call.dep" name="-maybe-call-dep">
798         <ant antfile="${call.script}" inheritall="false" target="${call.target}">
799             <propertyset>
800                 <propertyref prefix="transfer."/>
801                 <mapper from="transfer.*" to="*" type="glob"/>
802             </propertyset>
803         </ant>
804     </target>
805 </project>