OSDN Git Service

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