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 name="JavaApplication1-impl" default="default" basedir=".." xmlns:j2seproject3="http://www.netbeans.org/ns/j2se-project/3" xmlns:j2seproject2="http://www.netbeans.org/ns/j2se-project/2" xmlns:j2seproject1="http://www.netbeans.org/ns/j2se-project/1" xmlns:jaxws="http://www.netbeans.org/ns/jax-ws/1">
23 <target name="default" depends="test,jar,javadoc" description="Build and test whole project."/>
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 name="-init-private" depends="-pre-init">
34 <property file="nbproject/private/private.properties"/>
36 <target name="-init-user" depends="-pre-init,-init-private">
37 <property file="${user.properties.file}"/>
38 <!-- The two properties below are usually overridden -->
39 <!-- by the active platform. Just a fallback. -->
40 <property name="default.javac.source" value="1.4"/>
41 <property name="default.javac.target" value="1.4"/>
43 <target name="-init-project" depends="-pre-init,-init-private,-init-user">
44 <property file="nbproject/project.properties"/>
46 <target name="-do-init" depends="-pre-init,-init-private,-init-user,-init-project,-init-macrodef-property">
47 <available file="${manifest.file}" property="manifest.available"/>
48 <condition property="manifest.available+main.class">
50 <isset property="manifest.available"/>
51 <isset property="main.class"/>
53 <equals arg1="${main.class}" arg2="" trim="true"/>
57 <condition property="manifest.available+main.class+mkdist.available">
59 <istrue value="${manifest.available+main.class}"/>
60 <isset property="libs.CopyLibs.classpath"/>
63 <condition property="have.tests">
65 <available file="${test.src.dir}"/>
68 <condition property="have.sources">
70 <available file="${src.dir}"/>
73 <condition property="netbeans.home+have.tests">
75 <isset property="netbeans.home"/>
76 <isset property="have.tests"/>
79 <condition property="no.javadoc.preview">
80 <isfalse value="${javadoc.preview}"/>
82 <property name="run.jvmargs" value=""/>
83 <property name="javac.compilerargs" value=""/>
84 <property name="work.dir" value="${basedir}"/>
85 <condition property="no.deps">
87 <istrue value="${no.dependencies}"/>
90 <property name="javac.debug" value="true"/>
91 <property name="javadoc.preview" value="true"/>
93 <target name="-post-init">
94 <!-- Empty placeholder for easier customization. -->
95 <!-- You can override this target in the ../build.xml file. -->
97 <target name="-init-check" depends="-pre-init,-init-private,-init-user,-init-project,-do-init">
98 <fail unless="src.dir">Must set src.dir</fail>
99 <fail unless="test.src.dir">Must set test.src.dir</fail>
100 <fail unless="build.dir">Must set build.dir</fail>
101 <fail unless="dist.dir">Must set dist.dir</fail>
102 <fail unless="build.classes.dir">Must set build.classes.dir</fail>
103 <fail unless="dist.javadoc.dir">Must set dist.javadoc.dir</fail>
104 <fail unless="build.test.classes.dir">Must set build.test.classes.dir</fail>
105 <fail unless="build.test.results.dir">Must set build.test.results.dir</fail>
106 <fail unless="build.classes.excludes">Must set build.classes.excludes</fail>
107 <fail unless="dist.jar">Must set dist.jar</fail>
109 <target name="-init-macrodef-property">
110 <macrodef name="property" uri="http://www.netbeans.org/ns/j2se-project/1">
111 <attribute name="name"/>
112 <attribute name="value"/>
114 <property name="@{name}" value="${@{value}}"/>
118 <target name="-init-macrodef-javac">
119 <macrodef name="javac" uri="http://www.netbeans.org/ns/j2se-project/3">
120 <attribute name="srcdir" default="${src.dir}"/>
121 <attribute name="destdir" default="${build.classes.dir}"/>
122 <attribute name="classpath" default="${javac.classpath}"/>
123 <attribute name="debug" default="${javac.debug}"/>
124 <element name="customize" optional="true"/>
126 <javac srcdir="@{srcdir}" destdir="@{destdir}" debug="@{debug}" deprecation="${javac.deprecation}" source="${javac.source}" target="${javac.target}" includeantruntime="false">
128 <path path="@{classpath}"/>
130 <compilerarg line="${javac.compilerargs}"/>
136 <target name="-init-macrodef-junit">
137 <macrodef name="junit" uri="http://www.netbeans.org/ns/j2se-project/3">
138 <attribute name="includes" default="**/*Test.java"/>
140 <junit showoutput="true" fork="true" dir="${basedir}" failureproperty="tests.failed" errorproperty="tests.failed">
141 <batchtest todir="${build.test.results.dir}">
142 <fileset dir="${test.src.dir}" includes="@{includes}"/>
145 <path path="${run.test.classpath}"/>
148 <propertyref prefix="test-sys-prop."/>
149 <mapper type="glob" from="test-sys-prop.*" to="*"/>
151 <formatter type="brief" usefile="false"/>
152 <formatter type="xml"/>
153 <jvmarg line="${run.jvmargs}"/>
158 <target name="-init-macrodef-nbjpda">
159 <macrodef name="nbjpdastart" uri="http://www.netbeans.org/ns/j2se-project/1">
160 <attribute name="name" default="${main.class}"/>
161 <attribute name="classpath" default="${debug.classpath}"/>
162 <attribute name="stopclassname" default=""/>
164 <nbjpdastart transport="dt_socket" addressproperty="jpda.address" name="@{name}" stopclassname="@{stopclassname}">
166 <path path="@{classpath}"/>
171 <macrodef name="nbjpdareload" uri="http://www.netbeans.org/ns/j2se-project/1">
172 <attribute name="dir" default="${build.classes.dir}"/>
175 <fileset includes="${fix.includes}*.class" dir="@{dir}"/>
180 <target name="-init-macrodef-debug">
181 <macrodef name="debug" uri="http://www.netbeans.org/ns/j2se-project/3">
182 <attribute name="classname" default="${main.class}"/>
183 <attribute name="classpath" default="${debug.classpath}"/>
184 <element name="customize" optional="true"/>
186 <java fork="true" classname="@{classname}" dir="${work.dir}">
187 <jvmarg value="-Xdebug"/>
188 <jvmarg value="-Xnoagent"/>
189 <jvmarg value="-Djava.compiler=none"/>
190 <jvmarg value="-Xrunjdwp:transport=dt_socket,address=${jpda.address}"/>
191 <jvmarg line="${run.jvmargs}"/>
193 <path path="@{classpath}"/>
196 <propertyref prefix="run-sys-prop."/>
197 <mapper type="glob" from="run-sys-prop.*" to="*"/>
204 <target name="-init-macrodef-java">
205 <macrodef name="java" uri="http://www.netbeans.org/ns/j2se-project/1">
206 <attribute name="classname" default="${main.class}"/>
207 <element name="customize" optional="true"/>
209 <java fork="true" classname="@{classname}" dir="${work.dir}">
210 <jvmarg line="${run.jvmargs}"/>
212 <path path="${run.classpath}"/>
215 <propertyref prefix="run-sys-prop."/>
216 <mapper type="glob" from="run-sys-prop.*" to="*"/>
223 <target name="-init-presetdef-jar">
224 <presetdef name="jar" uri="http://www.netbeans.org/ns/j2se-project/1">
225 <jar jarfile="${dist.jar}" compress="${jar.compress}">
226 <j2seproject1:fileset dir="${build.classes.dir}"/>
230 <target name="init" 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"/>
236 <target name="deps-jar" depends="init" unless="no.deps"/>
237 <target name="-pre-pre-compile" depends="init,deps-jar">
238 <mkdir dir="${build.classes.dir}"/>
240 <target name="-pre-compile">
241 <!-- Empty placeholder for easier customization. -->
242 <!-- You can override this target in the ../build.xml file. -->
244 <target name="-do-compile" depends="init,deps-jar,-pre-pre-compile,-pre-compile" if="have.sources">
245 <j2seproject3:javac/>
246 <copy todir="${build.classes.dir}">
247 <fileset dir="${src.dir}" excludes="${build.classes.excludes}"/>
250 <target name="-post-compile">
251 <!-- Empty placeholder for easier customization. -->
252 <!-- You can override this target in the ../build.xml file. -->
254 <target name="compile" depends="init,deps-jar,-pre-pre-compile,-pre-compile,-do-compile,-post-compile" description="Compile project."/>
255 <target name="-pre-compile-single">
256 <!-- Empty placeholder for easier customization. -->
257 <!-- You can override this target in the ../build.xml file. -->
259 <target name="-do-compile-single" depends="init,deps-jar,-pre-pre-compile">
260 <fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail>
263 <patternset includes="${javac.includes}"/>
265 </j2seproject3:javac>
267 <target name="-post-compile-single">
268 <!-- Empty placeholder for easier customization. -->
269 <!-- You can override this target in the ../build.xml file. -->
271 <target name="compile-single" depends="init,deps-jar,-pre-pre-compile,-pre-compile-single,-do-compile-single,-post-compile-single"/>
277 <target name="-pre-pre-jar" depends="init">
278 <dirname property="dist.jar.dir" file="${dist.jar}"/>
279 <mkdir dir="${dist.jar.dir}"/>
281 <target name="-pre-jar">
282 <!-- Empty placeholder for easier customization. -->
283 <!-- You can override this target in the ../build.xml file. -->
285 <target name="-do-jar-without-manifest" depends="init,compile,-pre-pre-jar,-pre-jar" unless="manifest.available">
288 <target name="-do-jar-with-manifest" depends="init,compile,-pre-pre-jar,-pre-jar" if="manifest.available" unless="manifest.available+main.class">
289 <j2seproject1:jar manifest="${manifest.file}"/>
291 <target name="-do-jar-with-mainclass" depends="init,compile,-pre-pre-jar,-pre-jar" if="manifest.available+main.class" unless="manifest.available+main.class+mkdist.available">
292 <j2seproject1:jar manifest="${manifest.file}">
293 <j2seproject1:manifest>
294 <j2seproject1:attribute name="Main-Class" value="${main.class}"/>
295 </j2seproject1:manifest>
297 <echo>To run this application from the command line without Ant, try:</echo>
298 <property name="build.classes.dir.resolved" location="${build.classes.dir}"/>
299 <property name="dist.jar.resolved" location="${dist.jar}"/>
300 <pathconvert property="run.classpath.with.dist.jar">
301 <path path="${run.classpath}"/>
302 <map from="${build.classes.dir.resolved}" to="${dist.jar.resolved}"/>
304 <echo>java -cp "${run.classpath.with.dist.jar}" ${main.class}</echo>
306 <target name="-do-jar-with-libraries" depends="init,compile,-pre-pre-jar,-pre-jar" if="manifest.available+main.class+mkdist.available">
307 <property name="build.classes.dir.resolved" location="${build.classes.dir}"/>
308 <pathconvert property="run.classpath.without.build.classes.dir">
309 <path path="${run.classpath}"/>
310 <map from="${build.classes.dir.resolved}" to=""/>
312 <pathconvert property="jar.classpath" pathsep=" ">
313 <path path="${run.classpath.without.build.classes.dir}"/>
316 <globmapper from="*" to="lib/*"/>
319 <taskdef classname="org.netbeans.modules.java.j2seproject.copylibstask.CopyLibs" name="copylibs" classpath="${libs.CopyLibs.classpath}"/>
320 <copylibs manifest="${manifest.file}" runtimeclasspath="${run.classpath.without.build.classes.dir}" jarfile="${dist.jar}" compress="${jar.compress}">
321 <fileset dir="${build.classes.dir}"/>
323 <attribute name="Main-Class" value="${main.class}"/>
324 <attribute name="Class-Path" value="${jar.classpath}"/>
327 <echo>To run this application from the command line without Ant, try:</echo>
328 <property name="dist.jar.resolved" location="${dist.jar}"/>
329 <echo>java -jar "${dist.jar.resolved}"</echo>
331 <target name="-post-jar">
332 <!-- Empty placeholder for easier customization. -->
333 <!-- You can override this target in the ../build.xml file. -->
335 <target name="jar" 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."/>
341 <target name="run" depends="init,compile" description="Run a main class.">
344 <arg line="${application.args}"/>
348 <target name="run-single" depends="init,compile-single">
349 <fail unless="run.class">Must select one file in the IDE or set run.class</fail>
350 <j2seproject1:java classname="${run.class}"/>
357 <target name="-debug-start-debugger" if="netbeans.home" depends="init">
358 <j2seproject1:nbjpdastart name="${debug.class}"/>
360 <target name="-debug-start-debuggee" depends="init,compile">
363 <arg line="${application.args}"/>
365 </j2seproject3:debug>
367 <target name="debug" if="netbeans.home" depends="init,compile,-debug-start-debugger,-debug-start-debuggee" description="Debug project in IDE."/>
368 <target name="-debug-start-debugger-stepinto" if="netbeans.home" depends="init">
369 <j2seproject1:nbjpdastart stopclassname="${main.class}"/>
371 <target name="debug-stepinto" if="netbeans.home" depends="init,compile,-debug-start-debugger-stepinto,-debug-start-debuggee"/>
372 <target name="-debug-start-debuggee-single" if="netbeans.home" depends="init,compile-single">
373 <fail unless="debug.class">Must select one file in the IDE or set debug.class</fail>
374 <j2seproject3:debug classname="${debug.class}"/>
376 <target name="debug-single" if="netbeans.home" depends="init,compile-single,-debug-start-debugger,-debug-start-debuggee-single"/>
377 <target name="-pre-debug-fix" depends="init">
378 <fail unless="fix.includes">Must set fix.includes</fail>
379 <property name="javac.includes" value="${fix.includes}.java"/>
381 <target name="-do-debug-fix" if="netbeans.home" depends="init,-pre-debug-fix,compile-single">
382 <j2seproject1:nbjpdareload/>
384 <target name="debug-fix" if="netbeans.home" depends="init,-pre-debug-fix,-do-debug-fix"/>
390 <target name="-javadoc-build" depends="init">
391 <mkdir dir="${dist.javadoc.dir}"/>
392 <javadoc destdir="${dist.javadoc.dir}" source="${javac.source}" notree="${javadoc.notree}" use="${javadoc.use}" nonavbar="${javadoc.nonavbar}" noindex="${javadoc.noindex}" splitindex="${javadoc.splitindex}" author="${javadoc.author}" version="${javadoc.version}" windowtitle="${javadoc.windowtitle}" private="${javadoc.private}" additionalparam="${javadoc.additionalparam}" failonerror="true" useexternalfile="true">
394 <path path="${javac.classpath}"/>
397 <pathelement location="${src.dir}"/>
399 <packageset dir="${src.dir}" includes="*/**"/>
400 <fileset dir="${src.dir}" includes="*.java"/>
403 <target name="-javadoc-browse" if="netbeans.home" unless="no.javadoc.preview" depends="init,-javadoc-build">
404 <nbbrowse file="${dist.javadoc.dir}/index.html"/>
406 <target name="javadoc" depends="init,-javadoc-build,-javadoc-browse" description="Build Javadoc."/>
408 =========================
409 JUNIT COMPILATION SECTION
410 =========================
412 <target name="-pre-pre-compile-test" if="have.tests" depends="init,compile">
413 <mkdir dir="${build.test.classes.dir}"/>
415 <target name="-pre-compile-test">
416 <!-- Empty placeholder for easier customization. -->
417 <!-- You can override this target in the ../build.xml file. -->
419 <target name="-do-compile-test" if="have.tests" depends="init,compile,-pre-pre-compile-test,-pre-compile-test">
420 <j2seproject3:javac srcdir="${test.src.dir}" destdir="${build.test.classes.dir}" debug="true" classpath="${javac.test.classpath}"/>
421 <copy todir="${build.test.classes.dir}">
422 <fileset dir="${test.src.dir}" excludes="**/*.java"/>
425 <target name="-post-compile-test">
426 <!-- Empty placeholder for easier customization. -->
427 <!-- You can override this target in the ../build.xml file. -->
429 <target name="compile-test" depends="init,compile,-pre-pre-compile-test,-pre-compile-test,-do-compile-test,-post-compile-test"/>
430 <target name="-pre-compile-test-single">
431 <!-- Empty placeholder for easier customization. -->
432 <!-- You can override this target in the ../build.xml file. -->
434 <target name="-do-compile-test-single" if="have.tests" depends="init,compile,-pre-pre-compile-test,-pre-compile-test-single">
435 <fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail>
436 <j2seproject3:javac srcdir="${test.src.dir}" destdir="${build.test.classes.dir}" debug="true" classpath="${javac.test.classpath}">
438 <patternset includes="${javac.includes}"/>
440 </j2seproject3:javac>
441 <copy todir="${build.test.classes.dir}">
442 <fileset dir="${test.src.dir}" excludes="**/*.java"/>
445 <target name="-post-compile-test-single">
446 <!-- Empty placeholder for easier customization. -->
447 <!-- You can override this target in the ../build.xml file. -->
449 <target name="compile-test-single" depends="init,compile,-pre-pre-compile-test,-pre-compile-test-single,-do-compile-test-single,-post-compile-test-single"/>
451 =======================
452 JUNIT EXECUTION SECTION
453 =======================
455 <target name="-pre-test-run" if="have.tests" depends="init">
456 <mkdir dir="${build.test.results.dir}"/>
458 <target name="-do-test-run" if="have.tests" depends="init,compile-test,-pre-test-run">
459 <j2seproject3:junit/>
461 <target name="-post-test-run" if="have.tests" depends="init,compile-test,-pre-test-run,-do-test-run">
462 <fail if="tests.failed">Some tests failed; see details above.</fail>
464 <target name="test-report" if="have.tests" depends="init"/>
465 <target name="-test-browse" if="netbeans.home+have.tests" depends="init"/>
466 <target name="test" depends="init,compile-test,-pre-test-run,-do-test-run,test-report,-post-test-run,-test-browse" description="Run unit tests."/>
467 <target name="-pre-test-run-single" if="have.tests" depends="init">
468 <mkdir dir="${build.test.results.dir}"/>
470 <target name="-do-test-run-single" if="have.tests" depends="init,compile-test-single,-pre-test-run-single">
471 <fail unless="test.includes">Must select some files in the IDE or set test.includes</fail>
472 <j2seproject3:junit includes="${test.includes}"/>
474 <target name="-post-test-run-single" if="have.tests" depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single">
475 <fail if="tests.failed">Some tests failed; see details above.</fail>
477 <target name="test-single" depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single,-post-test-run-single" description="Run single unit test."/>
479 =======================
480 JUNIT DEBUGGING SECTION
481 =======================
483 <target name="-debug-start-debuggee-test" if="have.tests" depends="init,compile-test">
484 <fail unless="test.class">Must select one file in the IDE or set test.class</fail>
485 <j2seproject3:debug classname="junit.textui.TestRunner" classpath="${debug.test.classpath}">
487 <arg line="${test.class}"/>
489 </j2seproject3:debug>
491 <target name="-debug-start-debugger-test" if="netbeans.home+have.tests" depends="init,compile-test">
492 <j2seproject1:nbjpdastart name="${test.class}" classpath="${debug.test.classpath}"/>
494 <target name="debug-test" depends="init,compile-test,-debug-start-debugger-test,-debug-start-debuggee-test"/>
495 <target name="-do-debug-fix-test" if="netbeans.home" depends="init,-pre-debug-fix,compile-test-single">
496 <j2seproject1:nbjpdareload dir="${build.test.classes.dir}"/>
498 <target name="debug-fix-test" if="netbeans.home" depends="init,-pre-debug-fix,-do-debug-fix-test"/>
500 =========================
501 APPLET EXECUTION SECTION
502 =========================
504 <target name="run-applet" depends="init,compile-single">
505 <fail unless="applet.url">Must select one file in the IDE or set applet.url</fail>
506 <j2seproject1:java classname="sun.applet.AppletViewer">
508 <arg value="${applet.url}"/>
513 =========================
514 APPLET DEBUGGING SECTION
515 =========================
517 <target name="-debug-start-debuggee-applet" if="netbeans.home" depends="init,compile-single">
518 <fail unless="applet.url">Must select one file in the IDE or set applet.url</fail>
519 <j2seproject3:debug classname="sun.applet.AppletViewer">
521 <arg value="${applet.url}"/>
523 </j2seproject3:debug>
525 <target name="debug-applet" if="netbeans.home" depends="init,compile-single,-debug-start-debugger,-debug-start-debuggee-applet"/>
531 <target name="deps-clean" depends="init" unless="no.deps"/>
532 <target name="-do-clean" depends="init">
533 <delete dir="${build.dir}"/>
534 <delete dir="${dist.dir}"/>
536 <target name="-post-clean">
537 <!-- Empty placeholder for easier customization. -->
538 <!-- You can override this target in the ../build.xml file. -->
540 <target name="clean" depends="init,deps-clean,-do-clean,-post-clean" description="Clean build products."/>