1 <?xml version="1.0" encoding="UTF-8"?>
3 *** GENERATED FROM project.xml - DO NOT EDIT ***
4 *** EDIT ../build.xml INSTEAD ***
6 For the purpose of easier reading the script
7 is divided into following sections:
22 <project xmlns:j2seproject1="http://www.netbeans.org/ns/j2se-project/1" xmlns:j2seproject2="http://www.netbeans.org/ns/j2se-project/2" 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="friendpackage-impl">
23 <target depends="test,jar,javadoc" description="Build and test whole project." name="default"/>
25 ======================
26 INITIALIZATION SECTION
27 ======================
29 <target name="-pre-init">
30 <!-- Empty placeholder for easier customization. -->
31 <!-- You can override this target in the ../build.xml file. -->
33 <target depends="-pre-init" name="-init-private">
34 <property file="nbproject/private/config.properties"/>
35 <property file="nbproject/private/configs/${config}.properties"/>
36 <property file="nbproject/private/private.properties"/>
38 <target depends="-pre-init,-init-private" name="-init-user">
39 <property file="${user.properties.file}"/>
40 <!-- The two properties below are usually overridden -->
41 <!-- by the active platform. Just a fallback. -->
42 <property name="default.javac.source" value="1.4"/>
43 <property name="default.javac.target" value="1.4"/>
45 <target depends="-pre-init,-init-private,-init-user" name="-init-project">
46 <property file="nbproject/configs/${config}.properties"/>
47 <property file="nbproject/project.properties"/>
49 <target depends="-pre-init,-init-private,-init-user,-init-project,-init-macrodef-property" name="-do-init">
50 <available file="${manifest.file}" property="manifest.available"/>
51 <condition property="manifest.available+main.class">
53 <isset property="manifest.available"/>
54 <isset property="main.class"/>
56 <equals arg1="${main.class}" arg2="" trim="true"/>
60 <condition property="manifest.available+main.class+mkdist.available">
62 <istrue value="${manifest.available+main.class}"/>
63 <isset property="libs.CopyLibs.classpath"/>
66 <condition property="have.tests">
68 <available file="${test.src.dir}"/>
71 <condition property="have.sources">
73 <available file="${src.dir}"/>
76 <condition property="netbeans.home+have.tests">
78 <isset property="netbeans.home"/>
79 <isset property="have.tests"/>
82 <condition property="no.javadoc.preview">
83 <isfalse value="${javadoc.preview}"/>
85 <property name="run.jvmargs" value=""/>
86 <property name="javac.compilerargs" value=""/>
87 <property name="work.dir" value="${basedir}"/>
88 <condition property="no.deps">
90 <istrue value="${no.dependencies}"/>
93 <property name="javac.debug" value="true"/>
94 <property name="javadoc.preview" value="true"/>
95 <property name="application.args" value=""/>
96 <property name="source.encoding" value="${file.encoding}"/>
97 <property name="includes" value="**"/>
98 <property name="excludes" value=""/>
100 <target name="-post-init">
101 <!-- Empty placeholder for easier customization. -->
102 <!-- You can override this target in the ../build.xml file. -->
104 <target depends="-pre-init,-init-private,-init-user,-init-project,-do-init" name="-init-check">
105 <fail unless="src.dir">Must set src.dir</fail>
106 <fail unless="test.src.dir">Must set test.src.dir</fail>
107 <fail unless="build.dir">Must set build.dir</fail>
108 <fail unless="dist.dir">Must set dist.dir</fail>
109 <fail unless="build.classes.dir">Must set build.classes.dir</fail>
110 <fail unless="dist.javadoc.dir">Must set dist.javadoc.dir</fail>
111 <fail unless="build.test.classes.dir">Must set build.test.classes.dir</fail>
112 <fail unless="build.test.results.dir">Must set build.test.results.dir</fail>
113 <fail unless="build.classes.excludes">Must set build.classes.excludes</fail>
114 <fail unless="dist.jar">Must set dist.jar</fail>
116 <target name="-init-macrodef-property">
117 <macrodef name="property" uri="http://www.netbeans.org/ns/j2se-project/1">
118 <attribute name="name"/>
119 <attribute name="value"/>
121 <property name="@{name}" value="${@{value}}"/>
125 <target name="-init-macrodef-javac">
126 <macrodef name="javac" uri="http://www.netbeans.org/ns/j2se-project/3">
127 <attribute default="${src.dir}" name="srcdir"/>
128 <attribute default="${build.classes.dir}" name="destdir"/>
129 <attribute default="${javac.classpath}" name="classpath"/>
130 <attribute default="${includes}" name="includes"/>
131 <attribute default="${excludes}" name="excludes"/>
132 <attribute default="${javac.debug}" name="debug"/>
133 <attribute default="${jaxws.endorsed.dir}" name="jaxwsendorsed"/>
134 <element name="customize" optional="true"/>
136 <javac debug="@{debug}" deprecation="${javac.deprecation}" destdir="@{destdir}" encoding="${source.encoding}" excludes="@{excludes}" includeantruntime="false" includes="@{includes}" source="${javac.source}" sourcepath="" srcdir="@{srcdir}" target="${javac.target}">
138 <path path="@{classpath}"/>
140 <compilerarg line="-Djava.endorsed.dirs='@{jaxwsendorsed}'"/>
141 <compilerarg line="${javac.compilerargs}"/>
146 <macrodef name="depend" uri="http://www.netbeans.org/ns/j2se-project/3">
147 <attribute default="${src.dir}" name="srcdir"/>
148 <attribute default="${build.classes.dir}" name="destdir"/>
149 <attribute default="${javac.classpath}" name="classpath"/>
151 <depend cache="${build.dir}/depcache" destdir="@{destdir}" excludes="${excludes}" includes="${includes}" srcdir="@{srcdir}">
153 <path path="@{classpath}"/>
158 <macrodef name="force-recompile" uri="http://www.netbeans.org/ns/j2se-project/3">
159 <attribute default="${build.classes.dir}" name="destdir"/>
161 <fail unless="javac.includes">Must set javac.includes</fail>
162 <pathconvert pathsep="," property="javac.includes.binary">
164 <filelist dir="@{destdir}" files="${javac.includes}"/>
166 <globmapper from="*.java" to="*.class"/>
169 <files includes="${javac.includes.binary}"/>
174 <target name="-init-macrodef-junit">
175 <macrodef name="junit" uri="http://www.netbeans.org/ns/j2se-project/3">
176 <attribute default="${includes}" name="includes"/>
177 <attribute default="${excludes}" name="excludes"/>
179 <junit dir="${basedir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" showoutput="true">
180 <batchtest todir="${build.test.results.dir}">
181 <fileset dir="${test.src.dir}" excludes="@{excludes},${excludes}" includes="@{includes}">
182 <filename name="**/*Test.java"/>
186 <path path="${run.test.classpath}"/>
189 <propertyref prefix="test-sys-prop."/>
190 <mapper from="test-sys-prop.*" to="*" type="glob"/>
192 <formatter type="brief" usefile="false"/>
193 <formatter type="xml"/>
194 <jvmarg line="${run.jvmargs}"/>
199 <target name="-init-macrodef-nbjpda">
200 <macrodef name="nbjpdastart" uri="http://www.netbeans.org/ns/j2se-project/1">
201 <attribute default="${main.class}" name="name"/>
202 <attribute default="${debug.classpath}" name="classpath"/>
203 <attribute default="" name="stopclassname"/>
205 <nbjpdastart addressproperty="jpda.address" name="@{name}" stopclassname="@{stopclassname}" transport="dt_socket">
207 <path path="@{classpath}"/>
212 <macrodef name="nbjpdareload" uri="http://www.netbeans.org/ns/j2se-project/1">
213 <attribute default="${build.classes.dir}" name="dir"/>
216 <fileset dir="@{dir}" includes="${fix.includes}*.class"/>
221 <target name="-init-debug-args">
222 <property name="version-output" value="java version "${ant.java.version}"/>
223 <condition property="have-jdk-older-than-1.4">
225 <contains string="${version-output}" substring="java version "1.0"/>
226 <contains string="${version-output}" substring="java version "1.1"/>
227 <contains string="${version-output}" substring="java version "1.2"/>
228 <contains string="${version-output}" substring="java version "1.3"/>
231 <condition else="-Xdebug" property="debug-args-line" value="-Xdebug -Xnoagent -Djava.compiler=none">
232 <istrue value="${have-jdk-older-than-1.4}"/>
235 <target depends="-init-debug-args" name="-init-macrodef-debug">
236 <macrodef name="debug" uri="http://www.netbeans.org/ns/j2se-project/3">
237 <attribute default="${main.class}" name="classname"/>
238 <attribute default="${debug.classpath}" name="classpath"/>
239 <element name="customize" optional="true"/>
241 <java classname="@{classname}" dir="${work.dir}" fork="true">
242 <jvmarg line="${debug-args-line}"/>
243 <jvmarg value="-Xrunjdwp:transport=dt_socket,address=${jpda.address}"/>
244 <jvmarg line="${run.jvmargs}"/>
246 <path path="@{classpath}"/>
249 <propertyref prefix="run-sys-prop."/>
250 <mapper from="run-sys-prop.*" to="*" type="glob"/>
257 <target name="-init-macrodef-java">
258 <macrodef name="java" uri="http://www.netbeans.org/ns/j2se-project/1">
259 <attribute default="${main.class}" name="classname"/>
260 <element name="customize" optional="true"/>
262 <java classname="@{classname}" dir="${work.dir}" fork="true">
263 <jvmarg line="${run.jvmargs}"/>
265 <path path="${run.classpath}"/>
268 <propertyref prefix="run-sys-prop."/>
269 <mapper from="run-sys-prop.*" to="*" type="glob"/>
276 <target name="-init-presetdef-jar">
277 <presetdef name="jar" uri="http://www.netbeans.org/ns/j2se-project/1">
278 <jar compress="${jar.compress}" jarfile="${dist.jar}">
279 <j2seproject1:fileset dir="${build.classes.dir}"/>
283 <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"/>
289 <target depends="init" name="deps-jar" unless="no.deps"/>
290 <target depends="init,deps-jar" name="-pre-pre-compile">
291 <mkdir dir="${build.classes.dir}"/>
293 <target name="-pre-compile">
294 <!-- Empty placeholder for easier customization. -->
295 <!-- You can override this target in the ../build.xml file. -->
297 <target depends="init,deps-jar,-pre-pre-compile,-pre-compile" if="have.sources" name="-do-compile">
298 <j2seproject3:depend/>
299 <j2seproject3:javac/>
300 <copy todir="${build.classes.dir}">
301 <fileset dir="${src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
304 <target name="-post-compile">
305 <!-- Empty placeholder for easier customization. -->
306 <!-- You can override this target in the ../build.xml file. -->
308 <target depends="init,deps-jar,-pre-pre-compile,-pre-compile,-do-compile,-post-compile" description="Compile project." name="compile"/>
309 <target name="-pre-compile-single">
310 <!-- Empty placeholder for easier customization. -->
311 <!-- You can override this target in the ../build.xml file. -->
313 <target depends="init,deps-jar,-pre-pre-compile" name="-do-compile-single">
314 <fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail>
315 <j2seproject3:force-recompile/>
316 <j2seproject3:javac excludes="" includes="${javac.includes}"/>
318 <target name="-post-compile-single">
319 <!-- Empty placeholder for easier customization. -->
320 <!-- You can override this target in the ../build.xml file. -->
322 <target depends="init,deps-jar,-pre-pre-compile,-pre-compile-single,-do-compile-single,-post-compile-single" name="compile-single"/>
328 <target depends="init" name="-pre-pre-jar">
329 <dirname file="${dist.jar}" property="dist.jar.dir"/>
330 <mkdir dir="${dist.jar.dir}"/>
332 <target name="-pre-jar">
333 <!-- Empty placeholder for easier customization. -->
334 <!-- You can override this target in the ../build.xml file. -->
336 <target depends="init,compile,-pre-pre-jar,-pre-jar" name="-do-jar-without-manifest" unless="manifest.available">
339 <target depends="init,compile,-pre-pre-jar,-pre-jar" if="manifest.available" name="-do-jar-with-manifest" unless="manifest.available+main.class">
340 <j2seproject1:jar manifest="${manifest.file}"/>
342 <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">
343 <j2seproject1:jar manifest="${manifest.file}">
344 <j2seproject1:manifest>
345 <j2seproject1:attribute name="Main-Class" value="${main.class}"/>
346 </j2seproject1:manifest>
348 <echo>To run this application from the command line without Ant, try:</echo>
349 <property location="${build.classes.dir}" name="build.classes.dir.resolved"/>
350 <property location="${dist.jar}" name="dist.jar.resolved"/>
351 <pathconvert property="run.classpath.with.dist.jar">
352 <path path="${run.classpath}"/>
353 <map from="${build.classes.dir.resolved}" to="${dist.jar.resolved}"/>
355 <echo>java -cp "${run.classpath.with.dist.jar}" ${main.class}</echo>
357 <target depends="init,compile,-pre-pre-jar,-pre-jar" if="manifest.available+main.class+mkdist.available" name="-do-jar-with-libraries">
358 <property location="${build.classes.dir}" name="build.classes.dir.resolved"/>
359 <pathconvert property="run.classpath.without.build.classes.dir">
360 <path path="${run.classpath}"/>
361 <map from="${build.classes.dir.resolved}" to=""/>
363 <pathconvert pathsep=" " property="jar.classpath">
364 <path path="${run.classpath.without.build.classes.dir}"/>
367 <globmapper from="*" to="lib/*"/>
370 <taskdef classname="org.netbeans.modules.java.j2seproject.copylibstask.CopyLibs" classpath="${libs.CopyLibs.classpath}" name="copylibs"/>
371 <copylibs compress="${jar.compress}" jarfile="${dist.jar}" manifest="${manifest.file}" runtimeclasspath="${run.classpath.without.build.classes.dir}">
372 <fileset dir="${build.classes.dir}"/>
374 <attribute name="Main-Class" value="${main.class}"/>
375 <attribute name="Class-Path" value="${jar.classpath}"/>
378 <echo>To run this application from the command line without Ant, try:</echo>
379 <property location="${dist.jar}" name="dist.jar.resolved"/>
380 <echo>java -jar "${dist.jar.resolved}"</echo>
382 <target name="-post-jar">
383 <!-- Empty placeholder for easier customization. -->
384 <!-- You can override this target in the ../build.xml file. -->
386 <target depends="init,compile,-pre-jar,-do-jar-with-manifest,-do-jar-without-manifest,-do-jar-with-mainclass,-do-jar-with-libraries,-post-jar" description="Build JAR." name="jar"/>
392 <target depends="init,compile" description="Run a main class." name="run">
395 <arg line="${application.args}"/>
399 <target depends="init,compile" name="run-single">
400 <fail unless="run.class">Must select one file in the IDE or set run.class</fail>
401 <j2seproject1:java classname="${run.class}"/>
408 <target depends="init" if="netbeans.home" name="-debug-start-debugger">
409 <j2seproject1:nbjpdastart name="${debug.class}"/>
411 <target depends="init,compile" name="-debug-start-debuggee">
414 <arg line="${application.args}"/>
416 </j2seproject3:debug>
418 <target depends="init,compile,-debug-start-debugger,-debug-start-debuggee" description="Debug project in IDE." if="netbeans.home" name="debug"/>
419 <target depends="init" if="netbeans.home" name="-debug-start-debugger-stepinto">
420 <j2seproject1:nbjpdastart stopclassname="${main.class}"/>
422 <target depends="init,compile,-debug-start-debugger-stepinto,-debug-start-debuggee" if="netbeans.home" name="debug-stepinto"/>
423 <target depends="init,compile-single" if="netbeans.home" name="-debug-start-debuggee-single">
424 <fail unless="debug.class">Must select one file in the IDE or set debug.class</fail>
425 <j2seproject3:debug classname="${debug.class}"/>
427 <target depends="init,compile,-debug-start-debugger,-debug-start-debuggee-single" if="netbeans.home" name="debug-single"/>
428 <target depends="init" name="-pre-debug-fix">
429 <fail unless="fix.includes">Must set fix.includes</fail>
430 <property name="javac.includes" value="${fix.includes}.java"/>
432 <target depends="init,-pre-debug-fix,compile-single" if="netbeans.home" name="-do-debug-fix">
433 <j2seproject1:nbjpdareload/>
435 <target depends="init,-pre-debug-fix,-do-debug-fix" if="netbeans.home" name="debug-fix"/>
441 <target depends="init" name="-javadoc-build">
442 <mkdir dir="${dist.javadoc.dir}"/>
443 <javadoc additionalparam="${javadoc.additionalparam}" author="${javadoc.author}" destdir="${dist.javadoc.dir}" 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}">
445 <path path="${javac.classpath}"/>
447 <packageset dir="${src.dir}" excludes="${excludes}" includes="${includes}"/>
448 <fileset dir="${src.dir}" excludes="${excludes}" includes="${includes}">
449 <filename name="**/*.java"/>
453 <target depends="init,-javadoc-build" if="netbeans.home" name="-javadoc-browse" unless="no.javadoc.preview">
454 <nbbrowse file="${dist.javadoc.dir}/index.html"/>
456 <target depends="init,-javadoc-build,-javadoc-browse" description="Build Javadoc." name="javadoc"/>
458 =========================
459 JUNIT COMPILATION SECTION
460 =========================
462 <target depends="init,compile" if="have.tests" name="-pre-pre-compile-test">
463 <mkdir dir="${build.test.classes.dir}"/>
465 <target name="-pre-compile-test">
466 <!-- Empty placeholder for easier customization. -->
467 <!-- You can override this target in the ../build.xml file. -->
469 <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test" if="have.tests" name="-do-compile-test">
470 <j2seproject3:depend classpath="${javac.test.classpath}" destdir="${build.test.classes.dir}" srcdir="${test.src.dir}"/>
471 <j2seproject3:javac classpath="${javac.test.classpath}" debug="true" destdir="${build.test.classes.dir}" srcdir="${test.src.dir}"/>
472 <copy todir="${build.test.classes.dir}">
473 <fileset dir="${test.src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
476 <target name="-post-compile-test">
477 <!-- Empty placeholder for easier customization. -->
478 <!-- You can override this target in the ../build.xml file. -->
480 <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test,-do-compile-test,-post-compile-test" name="compile-test"/>
481 <target name="-pre-compile-test-single">
482 <!-- Empty placeholder for easier customization. -->
483 <!-- You can override this target in the ../build.xml file. -->
485 <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test-single" if="have.tests" name="-do-compile-test-single">
486 <fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail>
487 <j2seproject3:force-recompile destdir="${build.test.classes.dir}"/>
488 <j2seproject3:javac classpath="${javac.test.classpath}" debug="true" destdir="${build.test.classes.dir}" excludes="" includes="${javac.includes}" srcdir="${test.src.dir}"/>
489 <copy todir="${build.test.classes.dir}">
490 <fileset dir="${test.src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
493 <target name="-post-compile-test-single">
494 <!-- Empty placeholder for easier customization. -->
495 <!-- You can override this target in the ../build.xml file. -->
497 <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test-single,-do-compile-test-single,-post-compile-test-single" name="compile-test-single"/>
499 =======================
500 JUNIT EXECUTION SECTION
501 =======================
503 <target depends="init" if="have.tests" name="-pre-test-run">
504 <mkdir dir="${build.test.results.dir}"/>
506 <target depends="init,compile-test,-pre-test-run" if="have.tests" name="-do-test-run">
507 <j2seproject3:junit/>
509 <target depends="init,compile-test,-pre-test-run,-do-test-run" if="have.tests" name="-post-test-run">
510 <fail if="tests.failed">Some tests failed; see details above.</fail>
512 <target depends="init" if="have.tests" name="test-report"/>
513 <target depends="init" if="netbeans.home+have.tests" name="-test-browse"/>
514 <target depends="init,compile-test,-pre-test-run,-do-test-run,test-report,-post-test-run,-test-browse" description="Run unit tests." name="test"/>
515 <target depends="init" if="have.tests" name="-pre-test-run-single">
516 <mkdir dir="${build.test.results.dir}"/>
518 <target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-do-test-run-single">
519 <fail unless="test.includes">Must select some files in the IDE or set test.includes</fail>
520 <j2seproject3:junit excludes="" includes="${test.includes}"/>
522 <target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single" if="have.tests" name="-post-test-run-single">
523 <fail if="tests.failed">Some tests failed; see details above.</fail>
525 <target depends="init,compile-test,-pre-test-run-single,-do-test-run-single,-post-test-run-single" description="Run single unit test." name="test-single"/>
527 =======================
528 JUNIT DEBUGGING SECTION
529 =======================
531 <target depends="init,compile-test" if="have.tests" name="-debug-start-debuggee-test">
532 <fail unless="test.class">Must select one file in the IDE or set test.class</fail>
533 <j2seproject3:debug classname="junit.textui.TestRunner" classpath="${debug.test.classpath}">
536 <propertyref prefix="test-sys-prop."/>
537 <mapper from="test-sys-prop.*" to="*" type="glob"/>
539 <arg line="${test.class}"/>
541 </j2seproject3:debug>
543 <target depends="init,compile-test" if="netbeans.home+have.tests" name="-debug-start-debugger-test">
544 <j2seproject1:nbjpdastart classpath="${debug.test.classpath}" name="${test.class}"/>
546 <target depends="init,compile-test,-debug-start-debugger-test,-debug-start-debuggee-test" name="debug-test"/>
547 <target depends="init,-pre-debug-fix,compile-test-single" if="netbeans.home" name="-do-debug-fix-test">
548 <j2seproject1:nbjpdareload dir="${build.test.classes.dir}"/>
550 <target depends="init,-pre-debug-fix,-do-debug-fix-test" if="netbeans.home" name="debug-fix-test"/>
552 =========================
553 APPLET EXECUTION SECTION
554 =========================
556 <target depends="init,compile-single" name="run-applet">
557 <fail unless="applet.url">Must select one file in the IDE or set applet.url</fail>
558 <j2seproject1:java classname="sun.applet.AppletViewer">
560 <arg value="${applet.url}"/>
565 =========================
566 APPLET DEBUGGING SECTION
567 =========================
569 <target depends="init,compile-single" if="netbeans.home" name="-debug-start-debuggee-applet">
570 <fail unless="applet.url">Must select one file in the IDE or set applet.url</fail>
571 <j2seproject3:debug classname="sun.applet.AppletViewer">
573 <arg value="${applet.url}"/>
575 </j2seproject3:debug>
577 <target depends="init,compile-single,-debug-start-debugger,-debug-start-debuggee-applet" if="netbeans.home" name="debug-applet"/>
583 <target depends="init" name="deps-clean" unless="no.deps"/>
584 <target depends="init" name="-do-clean">
585 <delete dir="${build.dir}"/>
586 <delete dir="${dist.dir}"/>
588 <target name="-post-clean">
589 <!-- Empty placeholder for easier customization. -->
590 <!-- You can override this target in the ../build.xml file. -->
592 <target depends="init,deps-clean,-do-clean,-post-clean" description="Clean build products." name="clean"/>