You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

build-impl.xml 26KB

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