1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/samples/friendpackage/build.xml Sat Jun 14 09:50:27 2008 +0200
1.3 @@ -0,0 +1,69 @@
1.4 +<?xml version="1.0" encoding="UTF-8"?>
1.5 +<!-- You may freely edit this file. See commented blocks below for -->
1.6 +<!-- some examples of how to customize the build. -->
1.7 +<!-- (If you delete it and reopen the project it will be recreated.) -->
1.8 +<project name="friendpackage" default="default" basedir=".">
1.9 + <description>Builds, tests, and runs the project friendpackage.</description>
1.10 + <import file="nbproject/build-impl.xml"/>
1.11 + <!--
1.12 +
1.13 + There exist several targets which are by default empty and which can be
1.14 + used for execution of your tasks. These targets are usually executed
1.15 + before and after some main targets. They are:
1.16 +
1.17 + -pre-init: called before initialization of project properties
1.18 + -post-init: called after initialization of project properties
1.19 + -pre-compile: called before javac compilation
1.20 + -post-compile: called after javac compilation
1.21 + -pre-compile-single: called before javac compilation of single file
1.22 + -post-compile-single: called after javac compilation of single file
1.23 + -pre-compile-test: called before javac compilation of JUnit tests
1.24 + -post-compile-test: called after javac compilation of JUnit tests
1.25 + -pre-compile-test-single: called before javac compilation of single JUnit test
1.26 + -post-compile-test-single: called after javac compilation of single JUunit test
1.27 + -pre-jar: called before JAR building
1.28 + -post-jar: called after JAR building
1.29 + -post-clean: called after cleaning build products
1.30 +
1.31 + (Targets beginning with '-' are not intended to be called on their own.)
1.32 +
1.33 + Example of inserting an obfuscator after compilation could look like this:
1.34 +
1.35 + <target name="-post-compile">
1.36 + <obfuscate>
1.37 + <fileset dir="${build.classes.dir}"/>
1.38 + </obfuscate>
1.39 + </target>
1.40 +
1.41 + For list of available properties check the imported
1.42 + nbproject/build-impl.xml file.
1.43 +
1.44 +
1.45 + Another way to customize the build is by overriding existing main targets.
1.46 + The targets of interest are:
1.47 +
1.48 + -init-macrodef-javac: defines macro for javac compilation
1.49 + -init-macrodef-junit: defines macro for junit execution
1.50 + -init-macrodef-debug: defines macro for class debugging
1.51 + -init-macrodef-java: defines macro for class execution
1.52 + -do-jar-with-manifest: JAR building (if you are using a manifest)
1.53 + -do-jar-without-manifest: JAR building (if you are not using a manifest)
1.54 + run: execution of project
1.55 + -javadoc-build: Javadoc generation
1.56 + test-report: JUnit report generation
1.57 +
1.58 + An example of overriding the target for project execution could look like this:
1.59 +
1.60 + <target name="run" depends="friendpackage-impl.jar">
1.61 + <exec dir="bin" executable="launcher.exe">
1.62 + <arg file="${dist.jar}"/>
1.63 + </exec>
1.64 + </target>
1.65 +
1.66 + Notice that the overridden target depends on the jar target and not only on
1.67 + the compile target as the regular run target does. Again, for a list of available
1.68 + properties which you can use, check the target you are overriding in the
1.69 + nbproject/build-impl.xml file.
1.70 +
1.71 + -->
1.72 +</project>
2.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
2.2 +++ b/samples/friendpackage/nbproject/build-impl.xml Sat Jun 14 09:50:27 2008 +0200
2.3 @@ -0,0 +1,542 @@
2.4 +<?xml version="1.0" encoding="UTF-8"?>
2.5 +<!--
2.6 +*** GENERATED FROM project.xml - DO NOT EDIT ***
2.7 +*** EDIT ../build.xml INSTEAD ***
2.8 +
2.9 +For the purpose of easier reading the script
2.10 +is divided into following sections:
2.11 +
2.12 + - initialization
2.13 + - compilation
2.14 + - jar
2.15 + - execution
2.16 + - debugging
2.17 + - javadoc
2.18 + - junit compilation
2.19 + - junit execution
2.20 + - junit debugging
2.21 + - applet
2.22 + - cleanup
2.23 +
2.24 +-->
2.25 +<project name="friendpackage-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">
2.26 + <target name="default" depends="test,jar,javadoc" description="Build and test whole project."/>
2.27 + <!--
2.28 + ======================
2.29 + INITIALIZATION SECTION
2.30 + ======================
2.31 + -->
2.32 + <target name="-pre-init">
2.33 + <!-- Empty placeholder for easier customization. -->
2.34 + <!-- You can override this target in the ../build.xml file. -->
2.35 + </target>
2.36 + <target name="-init-private" depends="-pre-init">
2.37 + <property file="nbproject/private/private.properties"/>
2.38 + </target>
2.39 + <target name="-init-user" depends="-pre-init,-init-private">
2.40 + <property file="${user.properties.file}"/>
2.41 + <!-- The two properties below are usually overridden -->
2.42 + <!-- by the active platform. Just a fallback. -->
2.43 + <property name="default.javac.source" value="1.4"/>
2.44 + <property name="default.javac.target" value="1.4"/>
2.45 + </target>
2.46 + <target name="-init-project" depends="-pre-init,-init-private,-init-user">
2.47 + <property file="nbproject/project.properties"/>
2.48 + </target>
2.49 + <target name="-do-init" depends="-pre-init,-init-private,-init-user,-init-project,-init-macrodef-property">
2.50 + <available file="${manifest.file}" property="manifest.available"/>
2.51 + <condition property="manifest.available+main.class">
2.52 + <and>
2.53 + <isset property="manifest.available"/>
2.54 + <isset property="main.class"/>
2.55 + <not>
2.56 + <equals arg1="${main.class}" arg2="" trim="true"/>
2.57 + </not>
2.58 + </and>
2.59 + </condition>
2.60 + <condition property="manifest.available+main.class+mkdist.available">
2.61 + <and>
2.62 + <istrue value="${manifest.available+main.class}"/>
2.63 + <isset property="libs.CopyLibs.classpath"/>
2.64 + </and>
2.65 + </condition>
2.66 + <condition property="have.tests">
2.67 + <or>
2.68 + <available file="${test.src.dir}"/>
2.69 + </or>
2.70 + </condition>
2.71 + <condition property="have.sources">
2.72 + <or>
2.73 + <available file="${src.dir}"/>
2.74 + </or>
2.75 + </condition>
2.76 + <condition property="netbeans.home+have.tests">
2.77 + <and>
2.78 + <isset property="netbeans.home"/>
2.79 + <isset property="have.tests"/>
2.80 + </and>
2.81 + </condition>
2.82 + <condition property="no.javadoc.preview">
2.83 + <isfalse value="${javadoc.preview}"/>
2.84 + </condition>
2.85 + <property name="run.jvmargs" value=""/>
2.86 + <property name="javac.compilerargs" value=""/>
2.87 + <property name="work.dir" value="${basedir}"/>
2.88 + <condition property="no.deps">
2.89 + <and>
2.90 + <istrue value="${no.dependencies}"/>
2.91 + </and>
2.92 + </condition>
2.93 + <property name="javac.debug" value="true"/>
2.94 + <property name="javadoc.preview" value="true"/>
2.95 + <property name="application.args" value=""/>
2.96 + </target>
2.97 + <target name="-post-init">
2.98 + <!-- Empty placeholder for easier customization. -->
2.99 + <!-- You can override this target in the ../build.xml file. -->
2.100 + </target>
2.101 + <target name="-init-check" depends="-pre-init,-init-private,-init-user,-init-project,-do-init">
2.102 + <fail unless="src.dir">Must set src.dir</fail>
2.103 + <fail unless="test.src.dir">Must set test.src.dir</fail>
2.104 + <fail unless="build.dir">Must set build.dir</fail>
2.105 + <fail unless="dist.dir">Must set dist.dir</fail>
2.106 + <fail unless="build.classes.dir">Must set build.classes.dir</fail>
2.107 + <fail unless="dist.javadoc.dir">Must set dist.javadoc.dir</fail>
2.108 + <fail unless="build.test.classes.dir">Must set build.test.classes.dir</fail>
2.109 + <fail unless="build.test.results.dir">Must set build.test.results.dir</fail>
2.110 + <fail unless="build.classes.excludes">Must set build.classes.excludes</fail>
2.111 + <fail unless="dist.jar">Must set dist.jar</fail>
2.112 + </target>
2.113 + <target name="-init-macrodef-property">
2.114 + <macrodef name="property" uri="http://www.netbeans.org/ns/j2se-project/1">
2.115 + <attribute name="name"/>
2.116 + <attribute name="value"/>
2.117 + <sequential>
2.118 + <property name="@{name}" value="${@{value}}"/>
2.119 + </sequential>
2.120 + </macrodef>
2.121 + </target>
2.122 + <target name="-init-macrodef-javac">
2.123 + <macrodef name="javac" uri="http://www.netbeans.org/ns/j2se-project/3">
2.124 + <attribute name="srcdir" default="${src.dir}"/>
2.125 + <attribute name="destdir" default="${build.classes.dir}"/>
2.126 + <attribute name="classpath" default="${javac.classpath}"/>
2.127 + <attribute name="debug" default="${javac.debug}"/>
2.128 + <element name="customize" optional="true"/>
2.129 + <sequential>
2.130 + <javac srcdir="@{srcdir}" destdir="@{destdir}" debug="@{debug}" deprecation="${javac.deprecation}" source="${javac.source}" target="${javac.target}" includeantruntime="false">
2.131 + <classpath>
2.132 + <path path="@{classpath}"/>
2.133 + </classpath>
2.134 + <compilerarg line="${javac.compilerargs}"/>
2.135 + <customize/>
2.136 + </javac>
2.137 + </sequential>
2.138 + </macrodef>
2.139 + </target>
2.140 + <target name="-init-macrodef-junit">
2.141 + <macrodef name="junit" uri="http://www.netbeans.org/ns/j2se-project/3">
2.142 + <attribute name="includes" default="**/*Test.java"/>
2.143 + <sequential>
2.144 + <junit showoutput="true" fork="true" dir="${basedir}" failureproperty="tests.failed" errorproperty="tests.failed">
2.145 + <batchtest todir="${build.test.results.dir}">
2.146 + <fileset dir="${test.src.dir}" includes="@{includes}"/>
2.147 + </batchtest>
2.148 + <classpath>
2.149 + <path path="${run.test.classpath}"/>
2.150 + </classpath>
2.151 + <syspropertyset>
2.152 + <propertyref prefix="test-sys-prop."/>
2.153 + <mapper type="glob" from="test-sys-prop.*" to="*"/>
2.154 + </syspropertyset>
2.155 + <formatter type="brief" usefile="false"/>
2.156 + <formatter type="xml"/>
2.157 + <jvmarg line="${run.jvmargs}"/>
2.158 + </junit>
2.159 + </sequential>
2.160 + </macrodef>
2.161 + </target>
2.162 + <target name="-init-macrodef-nbjpda">
2.163 + <macrodef name="nbjpdastart" uri="http://www.netbeans.org/ns/j2se-project/1">
2.164 + <attribute name="name" default="${main.class}"/>
2.165 + <attribute name="classpath" default="${debug.classpath}"/>
2.166 + <attribute name="stopclassname" default=""/>
2.167 + <sequential>
2.168 + <nbjpdastart transport="dt_socket" addressproperty="jpda.address" name="@{name}" stopclassname="@{stopclassname}">
2.169 + <classpath>
2.170 + <path path="@{classpath}"/>
2.171 + </classpath>
2.172 + </nbjpdastart>
2.173 + </sequential>
2.174 + </macrodef>
2.175 + <macrodef name="nbjpdareload" uri="http://www.netbeans.org/ns/j2se-project/1">
2.176 + <attribute name="dir" default="${build.classes.dir}"/>
2.177 + <sequential>
2.178 + <nbjpdareload>
2.179 + <fileset includes="${fix.includes}*.class" dir="@{dir}"/>
2.180 + </nbjpdareload>
2.181 + </sequential>
2.182 + </macrodef>
2.183 + </target>
2.184 + <target name="-init-macrodef-debug">
2.185 + <macrodef name="debug" uri="http://www.netbeans.org/ns/j2se-project/3">
2.186 + <attribute name="classname" default="${main.class}"/>
2.187 + <attribute name="classpath" default="${debug.classpath}"/>
2.188 + <element name="customize" optional="true"/>
2.189 + <sequential>
2.190 + <java fork="true" classname="@{classname}" dir="${work.dir}">
2.191 + <jvmarg value="-Xdebug"/>
2.192 + <jvmarg value="-Xnoagent"/>
2.193 + <jvmarg value="-Djava.compiler=none"/>
2.194 + <jvmarg value="-Xrunjdwp:transport=dt_socket,address=${jpda.address}"/>
2.195 + <jvmarg line="${run.jvmargs}"/>
2.196 + <classpath>
2.197 + <path path="@{classpath}"/>
2.198 + </classpath>
2.199 + <syspropertyset>
2.200 + <propertyref prefix="run-sys-prop."/>
2.201 + <mapper type="glob" from="run-sys-prop.*" to="*"/>
2.202 + </syspropertyset>
2.203 + <customize/>
2.204 + </java>
2.205 + </sequential>
2.206 + </macrodef>
2.207 + </target>
2.208 + <target name="-init-macrodef-java">
2.209 + <macrodef name="java" uri="http://www.netbeans.org/ns/j2se-project/1">
2.210 + <attribute name="classname" default="${main.class}"/>
2.211 + <element name="customize" optional="true"/>
2.212 + <sequential>
2.213 + <java fork="true" classname="@{classname}" dir="${work.dir}">
2.214 + <jvmarg line="${run.jvmargs}"/>
2.215 + <classpath>
2.216 + <path path="${run.classpath}"/>
2.217 + </classpath>
2.218 + <syspropertyset>
2.219 + <propertyref prefix="run-sys-prop."/>
2.220 + <mapper type="glob" from="run-sys-prop.*" to="*"/>
2.221 + </syspropertyset>
2.222 + <customize/>
2.223 + </java>
2.224 + </sequential>
2.225 + </macrodef>
2.226 + </target>
2.227 + <target name="-init-presetdef-jar">
2.228 + <presetdef name="jar" uri="http://www.netbeans.org/ns/j2se-project/1">
2.229 + <jar jarfile="${dist.jar}" compress="${jar.compress}">
2.230 + <j2seproject1:fileset dir="${build.classes.dir}"/>
2.231 + </jar>
2.232 + </presetdef>
2.233 + </target>
2.234 + <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"/>
2.235 + <!--
2.236 + ===================
2.237 + COMPILATION SECTION
2.238 + ===================
2.239 + -->
2.240 + <target name="deps-jar" depends="init" unless="no.deps"/>
2.241 + <target name="-pre-pre-compile" depends="init,deps-jar">
2.242 + <mkdir dir="${build.classes.dir}"/>
2.243 + </target>
2.244 + <target name="-pre-compile">
2.245 + <!-- Empty placeholder for easier customization. -->
2.246 + <!-- You can override this target in the ../build.xml file. -->
2.247 + </target>
2.248 + <target name="-do-compile" depends="init,deps-jar,-pre-pre-compile,-pre-compile" if="have.sources">
2.249 + <j2seproject3:javac/>
2.250 + <copy todir="${build.classes.dir}">
2.251 + <fileset dir="${src.dir}" excludes="${build.classes.excludes}"/>
2.252 + </copy>
2.253 + </target>
2.254 + <target name="-post-compile">
2.255 + <!-- Empty placeholder for easier customization. -->
2.256 + <!-- You can override this target in the ../build.xml file. -->
2.257 + </target>
2.258 + <target name="compile" depends="init,deps-jar,-pre-pre-compile,-pre-compile,-do-compile,-post-compile" description="Compile project."/>
2.259 + <target name="-pre-compile-single">
2.260 + <!-- Empty placeholder for easier customization. -->
2.261 + <!-- You can override this target in the ../build.xml file. -->
2.262 + </target>
2.263 + <target name="-do-compile-single" depends="init,deps-jar,-pre-pre-compile">
2.264 + <fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail>
2.265 + <j2seproject3:javac>
2.266 + <customize>
2.267 + <patternset includes="${javac.includes}"/>
2.268 + </customize>
2.269 + </j2seproject3:javac>
2.270 + </target>
2.271 + <target name="-post-compile-single">
2.272 + <!-- Empty placeholder for easier customization. -->
2.273 + <!-- You can override this target in the ../build.xml file. -->
2.274 + </target>
2.275 + <target name="compile-single" depends="init,deps-jar,-pre-pre-compile,-pre-compile-single,-do-compile-single,-post-compile-single"/>
2.276 + <!--
2.277 + ====================
2.278 + JAR BUILDING SECTION
2.279 + ====================
2.280 + -->
2.281 + <target name="-pre-pre-jar" depends="init">
2.282 + <dirname property="dist.jar.dir" file="${dist.jar}"/>
2.283 + <mkdir dir="${dist.jar.dir}"/>
2.284 + </target>
2.285 + <target name="-pre-jar">
2.286 + <!-- Empty placeholder for easier customization. -->
2.287 + <!-- You can override this target in the ../build.xml file. -->
2.288 + </target>
2.289 + <target name="-do-jar-without-manifest" depends="init,compile,-pre-pre-jar,-pre-jar" unless="manifest.available">
2.290 + <j2seproject1:jar/>
2.291 + </target>
2.292 + <target name="-do-jar-with-manifest" depends="init,compile,-pre-pre-jar,-pre-jar" if="manifest.available" unless="manifest.available+main.class">
2.293 + <j2seproject1:jar manifest="${manifest.file}"/>
2.294 + </target>
2.295 + <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">
2.296 + <j2seproject1:jar manifest="${manifest.file}">
2.297 + <j2seproject1:manifest>
2.298 + <j2seproject1:attribute name="Main-Class" value="${main.class}"/>
2.299 + </j2seproject1:manifest>
2.300 + </j2seproject1:jar>
2.301 + <echo>To run this application from the command line without Ant, try:</echo>
2.302 + <property name="build.classes.dir.resolved" location="${build.classes.dir}"/>
2.303 + <property name="dist.jar.resolved" location="${dist.jar}"/>
2.304 + <pathconvert property="run.classpath.with.dist.jar">
2.305 + <path path="${run.classpath}"/>
2.306 + <map from="${build.classes.dir.resolved}" to="${dist.jar.resolved}"/>
2.307 + </pathconvert>
2.308 + <echo>java -cp "${run.classpath.with.dist.jar}" ${main.class}</echo>
2.309 + </target>
2.310 + <target name="-do-jar-with-libraries" depends="init,compile,-pre-pre-jar,-pre-jar" if="manifest.available+main.class+mkdist.available">
2.311 + <property name="build.classes.dir.resolved" location="${build.classes.dir}"/>
2.312 + <pathconvert property="run.classpath.without.build.classes.dir">
2.313 + <path path="${run.classpath}"/>
2.314 + <map from="${build.classes.dir.resolved}" to=""/>
2.315 + </pathconvert>
2.316 + <pathconvert property="jar.classpath" pathsep=" ">
2.317 + <path path="${run.classpath.without.build.classes.dir}"/>
2.318 + <chainedmapper>
2.319 + <flattenmapper/>
2.320 + <globmapper from="*" to="lib/*"/>
2.321 + </chainedmapper>
2.322 + </pathconvert>
2.323 + <taskdef classname="org.netbeans.modules.java.j2seproject.copylibstask.CopyLibs" name="copylibs" classpath="${libs.CopyLibs.classpath}"/>
2.324 + <copylibs manifest="${manifest.file}" runtimeclasspath="${run.classpath.without.build.classes.dir}" jarfile="${dist.jar}" compress="${jar.compress}">
2.325 + <fileset dir="${build.classes.dir}"/>
2.326 + <manifest>
2.327 + <attribute name="Main-Class" value="${main.class}"/>
2.328 + <attribute name="Class-Path" value="${jar.classpath}"/>
2.329 + </manifest>
2.330 + </copylibs>
2.331 + <echo>To run this application from the command line without Ant, try:</echo>
2.332 + <property name="dist.jar.resolved" location="${dist.jar}"/>
2.333 + <echo>java -jar "${dist.jar.resolved}"</echo>
2.334 + </target>
2.335 + <target name="-post-jar">
2.336 + <!-- Empty placeholder for easier customization. -->
2.337 + <!-- You can override this target in the ../build.xml file. -->
2.338 + </target>
2.339 + <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."/>
2.340 + <!--
2.341 + =================
2.342 + EXECUTION SECTION
2.343 + =================
2.344 + -->
2.345 + <target name="run" depends="init,compile" description="Run a main class.">
2.346 + <j2seproject1:java>
2.347 + <customize>
2.348 + <arg line="${application.args}"/>
2.349 + </customize>
2.350 + </j2seproject1:java>
2.351 + </target>
2.352 + <target name="run-single" depends="init,compile-single">
2.353 + <fail unless="run.class">Must select one file in the IDE or set run.class</fail>
2.354 + <j2seproject1:java classname="${run.class}"/>
2.355 + </target>
2.356 + <!--
2.357 + =================
2.358 + DEBUGGING SECTION
2.359 + =================
2.360 + -->
2.361 + <target name="-debug-start-debugger" if="netbeans.home" depends="init">
2.362 + <j2seproject1:nbjpdastart name="${debug.class}"/>
2.363 + </target>
2.364 + <target name="-debug-start-debuggee" depends="init,compile">
2.365 + <j2seproject3:debug>
2.366 + <customize>
2.367 + <arg line="${application.args}"/>
2.368 + </customize>
2.369 + </j2seproject3:debug>
2.370 + </target>
2.371 + <target name="debug" if="netbeans.home" depends="init,compile,-debug-start-debugger,-debug-start-debuggee" description="Debug project in IDE."/>
2.372 + <target name="-debug-start-debugger-stepinto" if="netbeans.home" depends="init">
2.373 + <j2seproject1:nbjpdastart stopclassname="${main.class}"/>
2.374 + </target>
2.375 + <target name="debug-stepinto" if="netbeans.home" depends="init,compile,-debug-start-debugger-stepinto,-debug-start-debuggee"/>
2.376 + <target name="-debug-start-debuggee-single" if="netbeans.home" depends="init,compile-single">
2.377 + <fail unless="debug.class">Must select one file in the IDE or set debug.class</fail>
2.378 + <j2seproject3:debug classname="${debug.class}"/>
2.379 + </target>
2.380 + <target name="debug-single" if="netbeans.home" depends="init,compile-single,-debug-start-debugger,-debug-start-debuggee-single"/>
2.381 + <target name="-pre-debug-fix" depends="init">
2.382 + <fail unless="fix.includes">Must set fix.includes</fail>
2.383 + <property name="javac.includes" value="${fix.includes}.java"/>
2.384 + </target>
2.385 + <target name="-do-debug-fix" if="netbeans.home" depends="init,-pre-debug-fix,compile-single">
2.386 + <j2seproject1:nbjpdareload/>
2.387 + </target>
2.388 + <target name="debug-fix" if="netbeans.home" depends="init,-pre-debug-fix,-do-debug-fix"/>
2.389 + <!--
2.390 + ===============
2.391 + JAVADOC SECTION
2.392 + ===============
2.393 + -->
2.394 + <target name="-javadoc-build" depends="init">
2.395 + <mkdir dir="${dist.javadoc.dir}"/>
2.396 + <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">
2.397 + <classpath>
2.398 + <path path="${javac.classpath}"/>
2.399 + </classpath>
2.400 + <sourcepath>
2.401 + <pathelement location="${src.dir}"/>
2.402 + </sourcepath>
2.403 + <packageset dir="${src.dir}" includes="*/**"/>
2.404 + <fileset dir="${src.dir}" includes="*.java"/>
2.405 + </javadoc>
2.406 + </target>
2.407 + <target name="-javadoc-browse" if="netbeans.home" unless="no.javadoc.preview" depends="init,-javadoc-build">
2.408 + <nbbrowse file="${dist.javadoc.dir}/index.html"/>
2.409 + </target>
2.410 + <target name="javadoc" depends="init,-javadoc-build,-javadoc-browse" description="Build Javadoc."/>
2.411 + <!--
2.412 + =========================
2.413 + JUNIT COMPILATION SECTION
2.414 + =========================
2.415 + -->
2.416 + <target name="-pre-pre-compile-test" if="have.tests" depends="init,compile">
2.417 + <mkdir dir="${build.test.classes.dir}"/>
2.418 + </target>
2.419 + <target name="-pre-compile-test">
2.420 + <!-- Empty placeholder for easier customization. -->
2.421 + <!-- You can override this target in the ../build.xml file. -->
2.422 + </target>
2.423 + <target name="-do-compile-test" if="have.tests" depends="init,compile,-pre-pre-compile-test,-pre-compile-test">
2.424 + <j2seproject3:javac srcdir="${test.src.dir}" destdir="${build.test.classes.dir}" debug="true" classpath="${javac.test.classpath}"/>
2.425 + <copy todir="${build.test.classes.dir}">
2.426 + <fileset dir="${test.src.dir}" excludes="**/*.java"/>
2.427 + </copy>
2.428 + </target>
2.429 + <target name="-post-compile-test">
2.430 + <!-- Empty placeholder for easier customization. -->
2.431 + <!-- You can override this target in the ../build.xml file. -->
2.432 + </target>
2.433 + <target name="compile-test" depends="init,compile,-pre-pre-compile-test,-pre-compile-test,-do-compile-test,-post-compile-test"/>
2.434 + <target name="-pre-compile-test-single">
2.435 + <!-- Empty placeholder for easier customization. -->
2.436 + <!-- You can override this target in the ../build.xml file. -->
2.437 + </target>
2.438 + <target name="-do-compile-test-single" if="have.tests" depends="init,compile,-pre-pre-compile-test,-pre-compile-test-single">
2.439 + <fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail>
2.440 + <j2seproject3:javac srcdir="${test.src.dir}" destdir="${build.test.classes.dir}" debug="true" classpath="${javac.test.classpath}">
2.441 + <customize>
2.442 + <patternset includes="${javac.includes}"/>
2.443 + </customize>
2.444 + </j2seproject3:javac>
2.445 + <copy todir="${build.test.classes.dir}">
2.446 + <fileset dir="${test.src.dir}" excludes="**/*.java"/>
2.447 + </copy>
2.448 + </target>
2.449 + <target name="-post-compile-test-single">
2.450 + <!-- Empty placeholder for easier customization. -->
2.451 + <!-- You can override this target in the ../build.xml file. -->
2.452 + </target>
2.453 + <target name="compile-test-single" depends="init,compile,-pre-pre-compile-test,-pre-compile-test-single,-do-compile-test-single,-post-compile-test-single"/>
2.454 + <!--
2.455 + =======================
2.456 + JUNIT EXECUTION SECTION
2.457 + =======================
2.458 + -->
2.459 + <target name="-pre-test-run" if="have.tests" depends="init">
2.460 + <mkdir dir="${build.test.results.dir}"/>
2.461 + </target>
2.462 + <target name="-do-test-run" if="have.tests" depends="init,compile-test,-pre-test-run">
2.463 + <j2seproject3:junit/>
2.464 + </target>
2.465 + <target name="-post-test-run" if="have.tests" depends="init,compile-test,-pre-test-run,-do-test-run">
2.466 + <fail if="tests.failed">Some tests failed; see details above.</fail>
2.467 + </target>
2.468 + <target name="test-report" if="have.tests" depends="init"/>
2.469 + <target name="-test-browse" if="netbeans.home+have.tests" depends="init"/>
2.470 + <target name="test" depends="init,compile-test,-pre-test-run,-do-test-run,test-report,-post-test-run,-test-browse" description="Run unit tests."/>
2.471 + <target name="-pre-test-run-single" if="have.tests" depends="init">
2.472 + <mkdir dir="${build.test.results.dir}"/>
2.473 + </target>
2.474 + <target name="-do-test-run-single" if="have.tests" depends="init,compile-test-single,-pre-test-run-single">
2.475 + <fail unless="test.includes">Must select some files in the IDE or set test.includes</fail>
2.476 + <j2seproject3:junit includes="${test.includes}"/>
2.477 + </target>
2.478 + <target name="-post-test-run-single" if="have.tests" depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single">
2.479 + <fail if="tests.failed">Some tests failed; see details above.</fail>
2.480 + </target>
2.481 + <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."/>
2.482 + <!--
2.483 + =======================
2.484 + JUNIT DEBUGGING SECTION
2.485 + =======================
2.486 + -->
2.487 + <target name="-debug-start-debuggee-test" if="have.tests" depends="init,compile-test">
2.488 + <fail unless="test.class">Must select one file in the IDE or set test.class</fail>
2.489 + <j2seproject3:debug classname="junit.textui.TestRunner" classpath="${debug.test.classpath}">
2.490 + <customize>
2.491 + <arg line="${test.class}"/>
2.492 + </customize>
2.493 + </j2seproject3:debug>
2.494 + </target>
2.495 + <target name="-debug-start-debugger-test" if="netbeans.home+have.tests" depends="init,compile-test">
2.496 + <j2seproject1:nbjpdastart name="${test.class}" classpath="${debug.test.classpath}"/>
2.497 + </target>
2.498 + <target name="debug-test" depends="init,compile-test,-debug-start-debugger-test,-debug-start-debuggee-test"/>
2.499 + <target name="-do-debug-fix-test" if="netbeans.home" depends="init,-pre-debug-fix,compile-test-single">
2.500 + <j2seproject1:nbjpdareload dir="${build.test.classes.dir}"/>
2.501 + </target>
2.502 + <target name="debug-fix-test" if="netbeans.home" depends="init,-pre-debug-fix,-do-debug-fix-test"/>
2.503 + <!--
2.504 + =========================
2.505 + APPLET EXECUTION SECTION
2.506 + =========================
2.507 + -->
2.508 + <target name="run-applet" depends="init,compile-single">
2.509 + <fail unless="applet.url">Must select one file in the IDE or set applet.url</fail>
2.510 + <j2seproject1:java classname="sun.applet.AppletViewer">
2.511 + <customize>
2.512 + <arg value="${applet.url}"/>
2.513 + </customize>
2.514 + </j2seproject1:java>
2.515 + </target>
2.516 + <!--
2.517 + =========================
2.518 + APPLET DEBUGGING SECTION
2.519 + =========================
2.520 + -->
2.521 + <target name="-debug-start-debuggee-applet" if="netbeans.home" depends="init,compile-single">
2.522 + <fail unless="applet.url">Must select one file in the IDE or set applet.url</fail>
2.523 + <j2seproject3:debug classname="sun.applet.AppletViewer">
2.524 + <customize>
2.525 + <arg value="${applet.url}"/>
2.526 + </customize>
2.527 + </j2seproject3:debug>
2.528 + </target>
2.529 + <target name="debug-applet" if="netbeans.home" depends="init,compile-single,-debug-start-debugger,-debug-start-debuggee-applet"/>
2.530 + <!--
2.531 + ===============
2.532 + CLEANUP SECTION
2.533 + ===============
2.534 + -->
2.535 + <target name="deps-clean" depends="init" unless="no.deps"/>
2.536 + <target name="-do-clean" depends="init">
2.537 + <delete dir="${build.dir}"/>
2.538 + <delete dir="${dist.dir}"/>
2.539 + </target>
2.540 + <target name="-post-clean">
2.541 + <!-- Empty placeholder for easier customization. -->
2.542 + <!-- You can override this target in the ../build.xml file. -->
2.543 + </target>
2.544 + <target name="clean" depends="init,deps-clean,-do-clean,-post-clean" description="Clean build products."/>
2.545 +</project>