| 1 | <?xml version="1.0" encoding="UTF-8"?> |
| 2 | <!-- |
| 3 | *** GENERATED FROM project.xml - DO NOT EDIT *** |
| 4 | *** EDIT ../build.xml INSTEAD *** |
| 5 | |
| 6 | For the purpose of easier reading the script |
| 7 | is divided into following sections: |
| 8 | |
| 9 | - initialization |
| 10 | - compilation |
| 11 | - jar |
| 12 | - execution |
| 13 | - debugging |
| 14 | - javadoc |
| 15 | - junit compilation |
| 16 | - junit execution |
| 17 | - junit debugging |
| 18 | - applet |
| 19 | - cleanup |
| 20 | |
| 21 | --> |
| 22 | <project name="crosscrypt-impl" default="default" basedir=".." xmlns:bluejproject="http://www.netbeans.org/ns/bluej-project/2"> |
| 23 | <target name="default" depends="test,jar,javadoc" description="Build and test whole project."/> |
| 24 | <!-- |
| 25 | ====================== |
| 26 | INITIALIZATION SECTION |
| 27 | ====================== |
| 28 | --> |
| 29 | <target name="-pre-init"> |
| 30 | <!-- Empty placeholder for easier customization. --> |
| 31 | <!-- You can override this target in the ../build.xml file. --> |
| 32 | </target> |
| 33 | <target name="-init-private" depends="-pre-init"> |
| 34 | <property file="nbproject/private/private.properties"/> |
| 35 | </target> |
| 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"/> |
| 42 | </target> |
| 43 | <target name="-init-project" depends="-pre-init,-init-private,-init-user"> |
| 44 | <property file="nbproject/project.properties"/> |
| 45 | </target> |
| 46 | |
| 47 | <target name="-init-bluej" depends="-do-init" if="bluej.home.available"> |
| 48 | <fileset dir="${bluej.userlib}" id="bluej.home.libraries"> |
| 49 | <include name="*.jar"/> |
| 50 | <include name="*.zip"/> |
| 51 | </fileset> |
| 52 | <pathconvert property="bluej.libraries" refid="bluej.home.libraries"/> |
| 53 | </target> |
| 54 | |
| 55 | <target name="-do-init" depends="-pre-init,-init-private,-init-user,-init-project,-init-macrodef-property"> |
| 56 | <condition property="bluej.home.available"> |
| 57 | <and> |
| 58 | <isset property="bluej.userlib"/> |
| 59 | <available file="${bluej.userlib}"/> |
| 60 | </and> |
| 61 | </condition> |
| 62 | |
| 63 | <condition property="main.class.available"> |
| 64 | <and> |
| 65 | <isset property="main.class"/> |
| 66 | <not> |
| 67 | <equals arg1="${main.class}" arg2="" trim="true"/> |
| 68 | </not> |
| 69 | </and> |
| 70 | </condition> |
| 71 | <available file="${manifest.file}" property="manifest.available"/> |
| 72 | <condition property="manifest.available+main.class"> |
| 73 | <and> |
| 74 | <isset property="manifest.available"/> |
| 75 | <istrue value="${main.class.available}"/> |
| 76 | </and> |
| 77 | </condition> |
| 78 | <condition property="manifest.available+main.class+mkdist.available"> |
| 79 | <and> |
| 80 | <istrue value="${manifest.available+main.class}"/> |
| 81 | <isset property="libs.CopyLibs.classpath"/> |
| 82 | </and> |
| 83 | </condition> |
| 84 | <condition property="have.tests"> |
| 85 | <or> |
| 86 | <available file="${test.src.dir}"/> |
| 87 | </or> |
| 88 | </condition> |
| 89 | <condition property="have.sources"> |
| 90 | <or> |
| 91 | <available file="${src.dir}"/> |
| 92 | </or> |
| 93 | </condition> |
| 94 | <condition property="netbeans.home+have.tests"> |
| 95 | <and> |
| 96 | <isset property="netbeans.home"/> |
| 97 | <isset property="have.tests"/> |
| 98 | </and> |
| 99 | </condition> |
| 100 | <condition property="no.javadoc.preview"> |
| 101 | <isfalse value="${javadoc.preview}"/> |
| 102 | </condition> |
| 103 | <property name="run.jvmargs" value=""/> |
| 104 | <property name="javac.compilerargs" value=""/> |
| 105 | <property name="work.dir" value="${basedir}"/> |
| 106 | <condition property="no.deps"> |
| 107 | <and> |
| 108 | <istrue value="${no.dependencies}"/> |
| 109 | </and> |
| 110 | </condition> |
| 111 | <property name="javac.debug" value="true"/> |
| 112 | <property name="javadoc.preview" value="true"/> |
| 113 | </target> |
| 114 | <target name="-post-init"> |
| 115 | <!-- Empty placeholder for easier customization. --> |
| 116 | <!-- You can override this target in the ../build.xml file. --> |
| 117 | </target> |
| 118 | <target name="-init-check" depends="-pre-init,-init-private,-init-user,-init-project,-do-init"> |
| 119 | <fail unless="src.dir">Must set src.dir</fail> |
| 120 | <fail unless="test.src.dir">Must set test.src.dir</fail> |
| 121 | <fail unless="build.dir">Must set build.dir</fail> |
| 122 | <fail unless="dist.dir">Must set dist.dir</fail> |
| 123 | <fail unless="build.classes.dir">Must set build.classes.dir</fail> |
| 124 | <fail unless="dist.javadoc.dir">Must set dist.javadoc.dir</fail> |
| 125 | <fail unless="build.test.classes.dir">Must set build.test.classes.dir</fail> |
| 126 | <fail unless="build.test.results.dir">Must set build.test.results.dir</fail> |
| 127 | <fail unless="build.classes.excludes">Must set build.classes.excludes</fail> |
| 128 | <fail unless="dist.jar">Must set dist.jar</fail> |
| 129 | </target> |
| 130 | <target name="-init-macrodef-property"> |
| 131 | <macrodef name="property" uri="http://www.netbeans.org/ns/bluej-project/2"> |
| 132 | <attribute name="name"/> |
| 133 | <attribute name="value"/> |
| 134 | <sequential> |
| 135 | <property name="@{name}" value="${@{value}}"/> |
| 136 | </sequential> |
| 137 | </macrodef> |
| 138 | </target> |
| 139 | <target name="-init-macrodef-javac"> |
| 140 | <macrodef name="javac" uri="http://www.netbeans.org/ns/bluej-project/2"> |
| 141 | <attribute name="srcdir" default="${src.dir}"/> |
| 142 | <attribute name="destdir" default="${build.classes.dir}"/> |
| 143 | <attribute name="classpath" default="${javac.classpath}"/> |
| 144 | <attribute name="debug" default="${javac.debug}"/> |
| 145 | <element name="customize" optional="true"/> |
| 146 | <sequential> |
| 147 | <javac srcdir="@{srcdir}" destdir="@{destdir}" debug="@{debug}" deprecation="${javac.deprecation}" source="${javac.source}" target="${javac.target}" includeantruntime="false"> |
| 148 | <classpath> |
| 149 | <path path="@{classpath}"/> |
| 150 | <fileset dir="${basedir}"> |
| 151 | <include name="+libs/*.jar"/> |
| 152 | <include name="+libs/*.zip"/> |
| 153 | </fileset> |
| 154 | <path path="${bluej.libraries}"/> |
| 155 | <path path="${bluej.config.libraries}"/> |
| 156 | </classpath> |
| 157 | <compilerarg line="${javac.compilerargs}"/> |
| 158 | <customize/> |
| 159 | </javac> |
| 160 | </sequential> |
| 161 | </macrodef> |
| 162 | </target> |
| 163 | <target name="-init-macrodef-junit"> |
| 164 | <macrodef name="junit" uri="http://www.netbeans.org/ns/bluej-project/2"> |
| 165 | <attribute name="includes" default="**/*Test.java"/> |
| 166 | <sequential> |
| 167 | <junit showoutput="true" fork="true" dir="${basedir}" failureproperty="tests.failed" errorproperty="tests.failed"> |
| 168 | <batchtest todir="${build.test.results.dir}"> |
| 169 | <fileset dir="${test.src.dir}" includes="@{includes}"/> |
| 170 | </batchtest> |
| 171 | <classpath> |
| 172 | <path path="${run.test.classpath}"/> |
| 173 | <fileset dir="${basedir}"> |
| 174 | <include name="+libs/*.jar"/> |
| 175 | <include name="+libs/*.zip"/> |
| 176 | </fileset> |
| 177 | <path path="${bluej.libraries}"/> |
| 178 | <path path="${bluej.config.libraries}"/> |
| 179 | |
| 180 | <!--path path="${run.test.classpath}"/--> |
| 181 | </classpath> |
| 182 | <syspropertyset> |
| 183 | <propertyref prefix="test-sys-prop."/> |
| 184 | <mapper type="glob" from="test-sys-prop.*" to="*"/> |
| 185 | </syspropertyset> |
| 186 | <formatter type="brief" usefile="false"/> |
| 187 | <formatter type="xml"/> |
| 188 | <jvmarg line="${run.jvmargs}"/> |
| 189 | </junit> |
| 190 | </sequential> |
| 191 | </macrodef> |
| 192 | </target> |
| 193 | <target name="-init-macrodef-nbjpda"> |
| 194 | <macrodef name="nbjpdastart" uri="http://www.netbeans.org/ns/bluej-project/2"> |
| 195 | <attribute name="name" default="${main.class}"/> |
| 196 | <attribute name="classpath" default="${debug.classpath}"/> |
| 197 | <attribute name="stopclassname" default=""/> |
| 198 | <sequential> |
| 199 | <nbjpdastart transport="dt_socket" addressproperty="jpda.address" name="@{name}" stopclassname="@{stopclassname}"> |
| 200 | <classpath> |
| 201 | <path path="@{classpath}"/> |
| 202 | <fileset dir="${basedir}"> |
| 203 | <include name="+libs/*.jar"/> |
| 204 | <include name="+libs/*.zip"/> |
| 205 | </fileset> |
| 206 | <path path="${bluej.libraries}"/> |
| 207 | <path path="${bluej.config.libraries}"/> |
| 208 | </classpath> |
| 209 | </nbjpdastart> |
| 210 | </sequential> |
| 211 | </macrodef> |
| 212 | <macrodef name="nbjpdareload" uri="http://www.netbeans.org/ns/bluej-project/2"> |
| 213 | <attribute name="dir" default="${build.classes.dir}"/> |
| 214 | <sequential> |
| 215 | <nbjpdareload> |
| 216 | <fileset includes="${fix.includes}*.class" dir="@{dir}"/> |
| 217 | </nbjpdareload> |
| 218 | </sequential> |
| 219 | </macrodef> |
| 220 | </target> |
| 221 | <target name="-init-macrodef-debug"> |
| 222 | <macrodef name="debug" uri="http://www.netbeans.org/ns/bluej-project/2"> |
| 223 | <attribute name="classname" default="${main.class}"/> |
| 224 | <attribute name="classpath" default="${debug.classpath}"/> |
| 225 | <element name="customize" optional="true"/> |
| 226 | <sequential> |
| 227 | <java fork="true" classname="@{classname}" dir="${work.dir}"> |
| 228 | <jvmarg value="-Xdebug"/> |
| 229 | <jvmarg value="-Xnoagent"/> |
| 230 | <jvmarg value="-Djava.compiler=none"/> |
| 231 | <jvmarg value="-Xrunjdwp:transport=dt_socket,address=${jpda.address}"/> |
| 232 | <jvmarg line="${run.jvmargs}"/> |
| 233 | <classpath> |
| 234 | <path path="@{classpath}"/> |
| 235 | <fileset dir="${basedir}"> |
| 236 | <include name="+libs/*.jar"/> |
| 237 | <include name="+libs/*.zip"/> |
| 238 | </fileset> |
| 239 | <path path="${bluej.libraries}"/> |
| 240 | <path path="${bluej.config.libraries}"/> |
| 241 | </classpath> |
| 242 | <syspropertyset> |
| 243 | <propertyref prefix="run-sys-prop."/> |
| 244 | <mapper type="glob" from="run-sys-prop.*" to="*"/> |
| 245 | </syspropertyset> |
| 246 | <customize/> |
| 247 | </java> |
| 248 | </sequential> |
| 249 | </macrodef> |
| 250 | </target> |
| 251 | <target name="-init-macrodef-java"> |
| 252 | <macrodef name="java" uri="http://www.netbeans.org/ns/bluej-project/2"> |
| 253 | <attribute name="classname" default="${main.class}"/> |
| 254 | <element name="customize" optional="true"/> |
| 255 | <sequential> |
| 256 | <java fork="true" classname="@{classname}" dir="${work.dir}"> |
| 257 | <jvmarg line="${run.jvmargs}"/> |
| 258 | <classpath> |
| 259 | <path path="${run.classpath}"/> |
| 260 | <fileset dir="${basedir}"> |
| 261 | <include name="+libs/*.jar"/> |
| 262 | <include name="+libs/*.zip"/> |
| 263 | </fileset> |
| 264 | <path path="${bluej.libraries}"/> |
| 265 | <path path="${bluej.config.libraries}"/> |
| 266 | </classpath> |
| 267 | <syspropertyset> |
| 268 | <propertyref prefix="run-sys-prop."/> |
| 269 | <mapper type="glob" from="run-sys-prop.*" to="*"/> |
| 270 | </syspropertyset> |
| 271 | <customize/> |
| 272 | </java> |
| 273 | </sequential> |
| 274 | </macrodef> |
| 275 | </target> |
| 276 | <target name="-init-presetdef-jar"> |
| 277 | <presetdef name="jar" uri="http://www.netbeans.org/ns/bluej-project/2"> |
| 278 | <jar jarfile="${dist.jar}" compress="${jar.compress}"> |
| 279 | <bluejproject:fileset dir="${build.classes.dir}" excludes="${dist.jar},dist/,doc/,nbproject/,build.xml,**/*.java,**/*.ctxt,**/bluej.pkg"/> |
| 280 | </jar> |
| 281 | </presetdef> |
| 282 | </target> |
| 283 | <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, -init-bluej"/> |
| 284 | <!-- |
| 285 | =================== |
| 286 | COMPILATION SECTION |
| 287 | =================== |
| 288 | --> |
| 289 | <target name="deps-jar" depends="init" unless="no.deps"/> |
| 290 | <target name="-pre-pre-compile" depends="init,deps-jar"> |
| 291 | <mkdir dir="${build.classes.dir}"/> |
| 292 | </target> |
| 293 | <target name="-pre-compile"> |
| 294 | <!-- Empty placeholder for easier customization. --> |
| 295 | <!-- You can override this target in the ../build.xml file. --> |
| 296 | </target> |
| 297 | <target name="-do-compile" depends="init,deps-jar,-pre-pre-compile,-pre-compile" if="have.sources"> |
| 298 | <bluejproject:javac/> |
| 299 | <copy todir="${build.classes.dir}"> |
| 300 | <fileset dir="${src.dir}" excludes="${build.classes.excludes}"/> |
| 301 | </copy> |
| 302 | </target> |
| 303 | <target name="-post-compile"> |
| 304 | <!-- Empty placeholder for easier customization. --> |
| 305 | <!-- You can override this target in the ../build.xml file. --> |
| 306 | </target> |
| 307 | <target name="compile" depends="init,deps-jar,-pre-pre-compile,-pre-compile,-do-compile,-post-compile" description="Compile project."/> |
| 308 | <target name="-pre-compile-single"> |
| 309 | <!-- Empty placeholder for easier customization. --> |
| 310 | <!-- You can override this target in the ../build.xml file. --> |
| 311 | </target> |
| 312 | <target name="-do-compile-single" depends="init,deps-jar,-pre-pre-compile"> |
| 313 | <fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail> |
| 314 | <bluejproject:javac> |
| 315 | <customize> |
| 316 | <patternset includes="${javac.includes}"/> |
| 317 | </customize> |
| 318 | </bluejproject:javac> |
| 319 | </target> |
| 320 | <target name="-post-compile-single"> |
| 321 | <!-- Empty placeholder for easier customization. --> |
| 322 | <!-- You can override this target in the ../build.xml file. --> |
| 323 | </target> |
| 324 | <target name="compile-single" depends="init,deps-jar,-pre-pre-compile,-pre-compile-single,-do-compile-single,-post-compile-single"/> |
| 325 | <!-- |
| 326 | ==================== |
| 327 | JAR BUILDING SECTION |
| 328 | ==================== |
| 329 | --> |
| 330 | <target name="-pre-pre-jar" depends="init"> |
| 331 | <dirname property="dist.jar.dir" file="${dist.jar}"/> |
| 332 | <mkdir dir="${dist.jar.dir}"/> |
| 333 | </target> |
| 334 | <target name="-pre-jar"> |
| 335 | <!-- Empty placeholder for easier customization. --> |
| 336 | <!-- You can override this target in the ../build.xml file. --> |
| 337 | </target> |
| 338 | <target name="-do-jar-without-mainclass" depends="init,compile,-pre-pre-jar,-pre-jar" unless="main.class.available"> |
| 339 | <bluejproject:jar/> |
| 340 | </target> |
| 341 | <target name="-do-jar-without-manifest" depends="init,compile,-pre-pre-jar,-pre-jar" if="main.class.available" unless="manifest.available"> |
| 342 | <bluejproject:jar> |
| 343 | <bluejproject:manifest> |
| 344 | <bluejproject:attribute name="Main-Class" value="${main.class}"/> |
| 345 | </bluejproject:manifest> |
| 346 | </bluejproject:jar> |
| 347 | </target> |
| 348 | <target name="-do-jar-with-manifest" depends="init,compile,-pre-pre-jar,-pre-jar" if="manifest.available" unless="manifest.available+main.class"> |
| 349 | <bluejproject:jar manifest="${manifest.file}"/> |
| 350 | </target> |
| 351 | <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"> |
| 352 | <bluejproject:jar manifest="${manifest.file}"> |
| 353 | <bluejproject:manifest> |
| 354 | <bluejproject:attribute name="Main-Class" value="${main.class}"/> |
| 355 | </bluejproject:manifest> |
| 356 | </bluejproject:jar> |
| 357 | <echo>To run this application from the command line without Ant, try:</echo> |
| 358 | <property name="build.classes.dir.resolved" location="${build.classes.dir}"/> |
| 359 | <property name="dist.jar.resolved" location="${dist.jar}"/> |
| 360 | <pathconvert property="run.classpath.with.dist.jar"> |
| 361 | <path path="${run.classpath}"/> |
| 362 | <fileset dir="${basedir}"> |
| 363 | <include name="+libs/*.jar"/> |
| 364 | <include name="+libs/*.zip"/> |
| 365 | </fileset> |
| 366 | <path path="${bluej.libraries}"/> |
| 367 | <path path="${bluej.config.libraries}"/> |
| 368 | <map from="${build.classes.dir.resolved}" to="${dist.jar.resolved}"/> |
| 369 | </pathconvert> |
| 370 | <echo>java -cp "${run.classpath.with.dist.jar}" ${main.class}</echo> |
| 371 | </target> |
| 372 | <target name="-do-jar-with-libraries" depends="init,compile,-pre-pre-jar,-pre-jar" if="manifest.available+main.class+mkdist.available"> |
| 373 | <property name="build.classes.dir.resolved" location="${build.classes.dir}"/> |
| 374 | <pathconvert property="run.classpath.without.build.classes.dir"> |
| 375 | <path path="${run.classpath}"/> |
| 376 | <fileset dir="${basedir}"> |
| 377 | <include name="+libs/*.jar"/> |
| 378 | <include name="+libs/*.zip"/> |
| 379 | </fileset> |
| 380 | <path path="${bluej.libraries}"/> |
| 381 | <path path="${bluej.config.libraries}"/> |
| 382 | <map from="${build.classes.dir.resolved}" to=""/> |
| 383 | </pathconvert> |
| 384 | <pathconvert property="jar.classpath" pathsep=" "> |
| 385 | <path path="${run.classpath.without.build.classes.dir}"/> |
| 386 | <chainedmapper> |
| 387 | <flattenmapper/> |
| 388 | <globmapper from="*" to="lib/*"/> |
| 389 | </chainedmapper> |
| 390 | </pathconvert> |
| 391 | <taskdef classname="org.netbeans.modules.java.j2seproject.copylibstask.CopyLibs" name="copylibs" classpath="${libs.CopyLibs.classpath}"/> |
| 392 | <copylibs manifest="${manifest.file}" runtimeclasspath="${run.classpath.without.build.classes.dir}" jarfile="${dist.jar}" compress="${jar.compress}"> |
| 393 | <fileset dir="${build.classes.dir}" excludes="${dist.jar}"/> |
| 394 | <manifest> |
| 395 | <attribute name="Main-Class" value="${main.class}"/> |
| 396 | <attribute name="Class-Path" value="${jar.classpath}"/> |
| 397 | </manifest> |
| 398 | </copylibs> |
| 399 | <echo>To run this application from the command line without Ant, try:</echo> |
| 400 | <property name="dist.jar.resolved" location="${dist.jar}"/> |
| 401 | <echo>java -jar "${dist.jar.resolved}"</echo> |
| 402 | </target> |
| 403 | <target name="-post-jar"> |
| 404 | <!-- Empty placeholder for easier customization. --> |
| 405 | <!-- You can override this target in the ../build.xml file. --> |
| 406 | </target> |
| 407 | <target name="jar" depends="init,compile,-pre-jar,-do-jar-with-manifest,-do-jar-without-manifest,-do-jar-without-mainclass,-do-jar-with-mainclass,-do-jar-with-libraries,-post-jar" description="Build JAR."/> |
| 408 | <!-- |
| 409 | ================= |
| 410 | EXECUTION SECTION |
| 411 | ================= |
| 412 | --> |
| 413 | <target name="run" depends="init,compile" description="Run a main class."> |
| 414 | <bluejproject:java> |
| 415 | <customize> |
| 416 | <arg line="${application.args}"/> |
| 417 | </customize> |
| 418 | </bluejproject:java> |
| 419 | </target> |
| 420 | <target name="run-single" depends="init,compile-single"> |
| 421 | <fail unless="run.class">Must select one file in the IDE or set run.class</fail> |
| 422 | <bluejproject:java classname="${run.class}"/> |
| 423 | </target> |
| 424 | <!-- |
| 425 | ================= |
| 426 | DEBUGGING SECTION |
| 427 | ================= |
| 428 | --> |
| 429 | <target name="-debug-start-debugger" if="netbeans.home" depends="init"> |
| 430 | <bluejproject:nbjpdastart name="${debug.class}"/> |
| 431 | </target> |
| 432 | <target name="-debug-start-debuggee" depends="init,compile"> |
| 433 | <bluejproject:debug> |
| 434 | <customize> |
| 435 | <arg line="${application.args}"/> |
| 436 | </customize> |
| 437 | </bluejproject:debug> |
| 438 | </target> |
| 439 | <target name="debug" if="netbeans.home" depends="init,compile,-debug-start-debugger,-debug-start-debuggee" description="Debug project in IDE."/> |
| 440 | <target name="-debug-start-debugger-stepinto" if="netbeans.home" depends="init"> |
| 441 | <bluejproject:nbjpdastart stopclassname="${main.class}"/> |
| 442 | </target> |
| 443 | <target name="debug-stepinto" if="netbeans.home" depends="init,compile,-debug-start-debugger-stepinto,-debug-start-debuggee"/> |
| 444 | <target name="-debug-start-debuggee-single" if="netbeans.home" depends="init,compile-single"> |
| 445 | <fail unless="debug.class">Must select one file in the IDE or set debug.class</fail> |
| 446 | <bluejproject:debug classname="${debug.class}"/> |
| 447 | </target> |
| 448 | <target name="debug-single" if="netbeans.home" depends="init,compile-single,-debug-start-debugger,-debug-start-debuggee-single"/> |
| 449 | <target name="-pre-debug-fix" depends="init"> |
| 450 | <fail unless="fix.includes">Must set fix.includes</fail> |
| 451 | <property name="javac.includes" value="${fix.includes}.java"/> |
| 452 | </target> |
| 453 | <target name="-do-debug-fix" if="netbeans.home" depends="init,-pre-debug-fix,compile-single"> |
| 454 | <bluejproject:nbjpdareload/> |
| 455 | </target> |
| 456 | <target name="debug-fix" if="netbeans.home" depends="init,-pre-debug-fix,-do-debug-fix"/> |
| 457 | <!-- |
| 458 | =============== |
| 459 | JAVADOC SECTION |
| 460 | =============== |
| 461 | --> |
| 462 | <target name="-javadoc-build" depends="init"> |
| 463 | <mkdir dir="${dist.javadoc.dir}"/> |
| 464 | <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"> |
| 465 | <classpath> |
| 466 | <path path="${javac.classpath}"/> |
| 467 | <fileset dir="${basedir}"> |
| 468 | <include name="+libs/*.jar"/> |
| 469 | <include name="+libs/*.zip"/> |
| 470 | </fileset> |
| 471 | <path path="${bluej.libraries}"/> |
| 472 | <path path="${bluej.config.libraries}"/> |
| 473 | </classpath> |
| 474 | <sourcepath> |
| 475 | <pathelement location="${src.dir}"/> |
| 476 | </sourcepath> |
| 477 | <packageset dir="${src.dir}" includes="*/**"/> |
| 478 | <fileset dir="${src.dir}" includes="*.java"/> |
| 479 | </javadoc> |
| 480 | </target> |
| 481 | <target name="-javadoc-browse" if="netbeans.home" unless="no.javadoc.preview" depends="init,-javadoc-build"> |
| 482 | <nbbrowse file="${dist.javadoc.dir}/index.html"/> |
| 483 | </target> |
| 484 | <target name="javadoc" depends="init,-javadoc-build,-javadoc-browse" description="Build Javadoc."/> |
| 485 | <!-- |
| 486 | ========================= |
| 487 | JUNIT COMPILATION SECTION |
| 488 | ========================= |
| 489 | --> |
| 490 | <target name="-pre-pre-compile-test" if="have.tests" depends="init,compile"> |
| 491 | <mkdir dir="${build.test.classes.dir}"/> |
| 492 | </target> |
| 493 | <target name="-pre-compile-test"> |
| 494 | <!-- Empty placeholder for easier customization. --> |
| 495 | <!-- You can override this target in the ../build.xml file. --> |
| 496 | </target> |
| 497 | <target name="-do-compile-test" if="have.tests" depends="init,compile,-pre-pre-compile-test,-pre-compile-test"> |
| 498 | <bluejproject:javac srcdir="${test.src.dir}" destdir="${build.test.classes.dir}" debug="true" classpath="${javac.test.classpath}"/> |
| 499 | <copy todir="${build.test.classes.dir}"> |
| 500 | <fileset dir="${test.src.dir}" excludes="**/*.java"/> |
| 501 | </copy> |
| 502 | </target> |
| 503 | <target name="-post-compile-test"> |
| 504 | <!-- Empty placeholder for easier customization. --> |
| 505 | <!-- You can override this target in the ../build.xml file. --> |
| 506 | </target> |
| 507 | <target name="compile-test" depends="init,compile,-pre-pre-compile-test,-pre-compile-test,-do-compile-test,-post-compile-test"/> |
| 508 | <target name="-pre-compile-test-single"> |
| 509 | <!-- Empty placeholder for easier customization. --> |
| 510 | <!-- You can override this target in the ../build.xml file. --> |
| 511 | </target> |
| 512 | <target name="-do-compile-test-single" if="have.tests" depends="init,compile,-pre-pre-compile-test,-pre-compile-test-single"> |
| 513 | <fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail> |
| 514 | <bluejproject:javac srcdir="${test.src.dir}" destdir="${build.test.classes.dir}" debug="true" classpath="${javac.test.classpath}"> |
| 515 | <customize> |
| 516 | <patternset includes="${javac.includes}"/> |
| 517 | </customize> |
| 518 | </bluejproject:javac> |
| 519 | <copy todir="${build.test.classes.dir}"> |
| 520 | <fileset dir="${test.src.dir}" excludes="**/*.java"/> |
| 521 | </copy> |
| 522 | </target> |
| 523 | <target name="-post-compile-test-single"> |
| 524 | <!-- Empty placeholder for easier customization. --> |
| 525 | <!-- You can override this target in the ../build.xml file. --> |
| 526 | </target> |
| 527 | <target name="compile-test-single" depends="init,compile,-pre-pre-compile-test,-pre-compile-test-single,-do-compile-test-single,-post-compile-test-single"/> |
| 528 | <!-- |
| 529 | ======================= |
| 530 | JUNIT EXECUTION SECTION |
| 531 | ======================= |
| 532 | --> |
| 533 | <target name="-pre-test-run" if="have.tests" depends="init"> |
| 534 | <mkdir dir="${build.test.results.dir}"/> |
| 535 | </target> |
| 536 | <target name="-do-test-run" if="have.tests" depends="init,compile-test,-pre-test-run"> |
| 537 | <bluejproject:junit/> |
| 538 | </target> |
| 539 | <target name="-post-test-run" if="have.tests" depends="init,compile-test,-pre-test-run,-do-test-run"> |
| 540 | <fail if="tests.failed">Some tests failed; see details above.</fail> |
| 541 | </target> |
| 542 | <target name="test-report" if="have.tests" depends="init"/> |
| 543 | <target name="-test-browse" if="netbeans.home+have.tests" depends="init"/> |
| 544 | <target name="test" depends="init,compile-test,-pre-test-run,-do-test-run,test-report,-post-test-run,-test-browse" description="Run unit tests."/> |
| 545 | <target name="-pre-test-run-single" if="have.tests" depends="init"> |
| 546 | <mkdir dir="${build.test.results.dir}"/> |
| 547 | </target> |
| 548 | <target name="-do-test-run-single" if="have.tests" depends="init,compile-test-single,-pre-test-run-single"> |
| 549 | <fail unless="test.includes">Must select some files in the IDE or set test.includes</fail> |
| 550 | <bluejproject:junit includes="${test.includes}"/> |
| 551 | </target> |
| 552 | <target name="-post-test-run-single" if="have.tests" depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single"> |
| 553 | <fail if="tests.failed">Some tests failed; see details above.</fail> |
| 554 | </target> |
| 555 | <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."/> |
| 556 | <!-- |
| 557 | ======================= |
| 558 | JUNIT DEBUGGING SECTION |
| 559 | ======================= |
| 560 | --> |
| 561 | <target name="-debug-start-debuggee-test" if="have.tests" depends="init,compile-test"> |
| 562 | <fail unless="test.class">Must select one file in the IDE or set test.class</fail> |
| 563 | <bluejproject:debug classname="junit.textui.TestRunner" classpath="${debug.test.classpath}"> |
| 564 | <customize> |
| 565 | <arg line="${test.class}"/> |
| 566 | </customize> |
| 567 | </bluejproject:debug> |
| 568 | </target> |
| 569 | <target name="-debug-start-debugger-test" if="netbeans.home+have.tests" depends="init,compile-test"> |
| 570 | <bluejproject:nbjpdastart name="${test.class}" classpath="${debug.test.classpath}"/> |
| 571 | </target> |
| 572 | <target name="debug-test" depends="init,compile-test,-debug-start-debugger-test,-debug-start-debuggee-test"/> |
| 573 | <target name="-do-debug-fix-test" if="netbeans.home" depends="init,-pre-debug-fix,compile-test-single"> |
| 574 | <bluejproject:nbjpdareload dir="${build.test.classes.dir}"/> |
| 575 | </target> |
| 576 | <target name="debug-fix-test" if="netbeans.home" depends="init,-pre-debug-fix,-do-debug-fix-test"/> |
| 577 | <!-- |
| 578 | =============== |
| 579 | CLEANUP SECTION |
| 580 | =============== |
| 581 | --> |
| 582 | <target name="deps-clean" depends="init" unless="no.deps"/> |
| 583 | <target name="-do-clean" depends="init"> |
| 584 | <delete> |
| 585 | <fileset dir="${build.dir}" includes="**/*.class"/> |
| 586 | </delete> |
| 587 | <delete dir="${dist.dir}"/> |
| 588 | </target> |
| 589 | <target name="-post-clean"> |
| 590 | <!-- Empty placeholder for easier customization. --> |
| 591 | <!-- You can override this target in the ../build.xml file. --> |
| 592 | </target> |
| 593 | <target name="clean" depends="init,deps-clean,-do-clean,-post-clean" description="Clean build products."/> |
| 594 | </project> |