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