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 33KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650
  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 xmlns:j2seproject1="http://www.netbeans.org/ns/j2se-project/1" xmlns:j2seproject2="http://www.netbeans.org/ns/j2se-project/2" xmlns:j2seproject3="http://www.netbeans.org/ns/j2se-project/3" xmlns:jaxrpc="http://www.netbeans.org/ns/j2se-project/jax-rpc" basedir=".." default="default" name="DMDirc-impl">
  20. <target depends="test,jar,javadoc" description="Build and test whole project." name="default"/>
  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 depends="-pre-init" name="-init-private">
  31. <property file="nbproject/private/config.properties"/>
  32. <property file="nbproject/private/configs/${config}.properties"/>
  33. <property file="nbproject/private/private.properties"/>
  34. </target>
  35. <target depends="-pre-init,-init-private" name="-init-user">
  36. <property file="${user.properties.file}"/>
  37. <!-- The two properties below are usually overridden -->
  38. <!-- by the active platform. Just a fallback. -->
  39. <property name="default.javac.source" value="1.4"/>
  40. <property name="default.javac.target" value="1.4"/>
  41. </target>
  42. <target depends="-pre-init,-init-private,-init-user" name="-init-project">
  43. <property file="nbproject/configs/${config}.properties"/>
  44. <property file="nbproject/project.properties"/>
  45. </target>
  46. <target depends="-pre-init,-init-private,-init-user,-init-project,-init-macrodef-property" name="-do-init">
  47. <available file="${manifest.file}" property="manifest.available"/>
  48. <condition property="manifest.available+main.class">
  49. <and>
  50. <isset property="manifest.available"/>
  51. <isset property="main.class"/>
  52. <not>
  53. <equals arg1="${main.class}" arg2="" trim="true"/>
  54. </not>
  55. </and>
  56. </condition>
  57. <condition property="have.tests">
  58. <or>
  59. <available file="${test.src.dir}"/>
  60. </or>
  61. </condition>
  62. <condition property="have.sources">
  63. <or>
  64. <available file="${src.dir}"/>
  65. </or>
  66. </condition>
  67. <condition property="netbeans.home+have.tests">
  68. <and>
  69. <isset property="netbeans.home"/>
  70. <isset property="have.tests"/>
  71. </and>
  72. </condition>
  73. <condition property="no.javadoc.preview">
  74. <and>
  75. <isset property="javadoc.preview"/>
  76. <isfalse value="${javadoc.preview}"/>
  77. </and>
  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. <property name="application.args" value=""/>
  90. <property name="source.encoding" value="${file.encoding}"/>
  91. <condition property="javadoc.encoding.used" value="${javadoc.encoding}">
  92. <and>
  93. <isset property="javadoc.encoding"/>
  94. <not>
  95. <equals arg1="${javadoc.encoding}" arg2=""/>
  96. </not>
  97. </and>
  98. </condition>
  99. <property name="javadoc.encoding.used" value="${source.encoding}"/>
  100. <property name="includes" value="**"/>
  101. <property name="excludes" value=""/>
  102. <property name="do.depend" value="true"/>
  103. <condition property="do.depend.true">
  104. <istrue value="${do.depend}"/>
  105. </condition>
  106. </target>
  107. <target name="-post-init">
  108. <!-- Empty placeholder for easier customization. -->
  109. <!-- You can override this target in the ../build.xml file. -->
  110. </target>
  111. <target depends="-pre-init,-init-private,-init-user,-init-project,-do-init" name="-init-check">
  112. <fail unless="src.dir">Must set src.dir</fail>
  113. <fail unless="test.src.dir">Must set test.src.dir</fail>
  114. <fail unless="build.dir">Must set build.dir</fail>
  115. <fail unless="dist.dir">Must set dist.dir</fail>
  116. <fail unless="build.classes.dir">Must set build.classes.dir</fail>
  117. <fail unless="dist.javadoc.dir">Must set dist.javadoc.dir</fail>
  118. <fail unless="build.test.classes.dir">Must set build.test.classes.dir</fail>
  119. <fail unless="build.test.results.dir">Must set build.test.results.dir</fail>
  120. <fail unless="build.classes.excludes">Must set build.classes.excludes</fail>
  121. <fail unless="dist.jar">Must set dist.jar</fail>
  122. </target>
  123. <target name="-init-macrodef-property">
  124. <macrodef name="property" uri="http://www.netbeans.org/ns/j2se-project/1">
  125. <attribute name="name"/>
  126. <attribute name="value"/>
  127. <sequential>
  128. <property name="@{name}" value="${@{value}}"/>
  129. </sequential>
  130. </macrodef>
  131. </target>
  132. <target name="-init-macrodef-javac">
  133. <macrodef name="javac" uri="http://www.netbeans.org/ns/j2se-project/3">
  134. <attribute default="${src.dir}" name="srcdir"/>
  135. <attribute default="${build.classes.dir}" name="destdir"/>
  136. <attribute default="${javac.classpath}" name="classpath"/>
  137. <attribute default="${includes}" name="includes"/>
  138. <attribute default="${excludes}" name="excludes"/>
  139. <attribute default="${javac.debug}" name="debug"/>
  140. <attribute default="" name="javac.compilerargs.jaxws"/>
  141. <attribute default="" name="sourcepath"/>
  142. <element name="customize" optional="true"/>
  143. <sequential>
  144. <javac debug="@{debug}" deprecation="${javac.deprecation}" destdir="@{destdir}" encoding="${source.encoding}" excludes="@{excludes}" includeantruntime="false" includes="@{includes}" source="${javac.source}" sourcepath="@{sourcepath}" srcdir="@{srcdir}" target="${javac.target}">
  145. <classpath>
  146. <path path="@{classpath}"/>
  147. </classpath>
  148. <compilerarg line="${javac.compilerargs} @{javac.compilerargs.jaxws}"/>
  149. <customize/>
  150. </javac>
  151. </sequential>
  152. </macrodef>
  153. <macrodef name="depend" uri="http://www.netbeans.org/ns/j2se-project/3">
  154. <attribute default="${src.dir}" name="srcdir"/>
  155. <attribute default="${build.classes.dir}" name="destdir"/>
  156. <attribute default="${javac.classpath}" name="classpath"/>
  157. <sequential>
  158. <depend cache="${build.dir}/depcache" destdir="@{destdir}" excludes="${excludes}" includes="${includes}" srcdir="@{srcdir}">
  159. <classpath>
  160. <path path="@{classpath}"/>
  161. </classpath>
  162. </depend>
  163. </sequential>
  164. </macrodef>
  165. <macrodef name="force-recompile" uri="http://www.netbeans.org/ns/j2se-project/3">
  166. <attribute default="${build.classes.dir}" name="destdir"/>
  167. <sequential>
  168. <fail unless="javac.includes">Must set javac.includes</fail>
  169. <pathconvert pathsep="," property="javac.includes.binary">
  170. <path>
  171. <filelist dir="@{destdir}" files="${javac.includes}"/>
  172. </path>
  173. <globmapper from="*.java" to="*.class"/>
  174. </pathconvert>
  175. <delete>
  176. <files includes="${javac.includes.binary}"/>
  177. </delete>
  178. </sequential>
  179. </macrodef>
  180. </target>
  181. <target name="-init-macrodef-junit">
  182. <macrodef name="junit" uri="http://www.netbeans.org/ns/j2se-project/3">
  183. <attribute default="${includes}" name="includes"/>
  184. <attribute default="${excludes}" name="excludes"/>
  185. <attribute default="**" name="testincludes"/>
  186. <sequential>
  187. <junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" showoutput="true" timeout="120000">
  188. <classpath>
  189. <pathelement path="${clover.jar}"/>
  190. </classpath>
  191. <batchtest todir="${build.test.results.dir}">
  192. <fileset dir="${test.src.dir}" excludes="@{excludes},${excludes}" includes="@{includes}">
  193. <filename name="@{testincludes}"/>
  194. </fileset>
  195. </batchtest>
  196. <classpath>
  197. <path path="${run.test.classpath}"/>
  198. </classpath>
  199. <syspropertyset>
  200. <propertyref prefix="test-sys-prop."/>
  201. <mapper from="test-sys-prop.*" to="*" type="glob"/>
  202. </syspropertyset>
  203. <formatter type="brief" usefile="false"/>
  204. <formatter type="xml"/>
  205. <jvmarg line="${run.jvmargs}"/>
  206. </junit>
  207. </sequential>
  208. </macrodef>
  209. </target>
  210. <target name="-init-macrodef-nbjpda">
  211. <macrodef name="nbjpdastart" uri="http://www.netbeans.org/ns/j2se-project/1">
  212. <attribute default="${main.class}" name="name"/>
  213. <attribute default="${debug.classpath}" name="classpath"/>
  214. <attribute default="" name="stopclassname"/>
  215. <sequential>
  216. <nbjpdastart addressproperty="jpda.address" name="@{name}" stopclassname="@{stopclassname}" transport="dt_socket">
  217. <classpath>
  218. <path path="@{classpath}"/>
  219. </classpath>
  220. </nbjpdastart>
  221. </sequential>
  222. </macrodef>
  223. <macrodef name="nbjpdareload" uri="http://www.netbeans.org/ns/j2se-project/1">
  224. <attribute default="${build.classes.dir}" name="dir"/>
  225. <sequential>
  226. <nbjpdareload>
  227. <fileset dir="@{dir}" includes="${fix.includes}*.class"/>
  228. </nbjpdareload>
  229. </sequential>
  230. </macrodef>
  231. </target>
  232. <target name="-init-debug-args">
  233. <property name="version-output" value="java version &quot;${ant.java.version}"/>
  234. <condition property="have-jdk-older-than-1.4">
  235. <or>
  236. <contains string="${version-output}" substring="java version &quot;1.0"/>
  237. <contains string="${version-output}" substring="java version &quot;1.1"/>
  238. <contains string="${version-output}" substring="java version &quot;1.2"/>
  239. <contains string="${version-output}" substring="java version &quot;1.3"/>
  240. </or>
  241. </condition>
  242. <condition else="-Xdebug" property="debug-args-line" value="-Xdebug -Xnoagent -Djava.compiler=none">
  243. <istrue value="${have-jdk-older-than-1.4}"/>
  244. </condition>
  245. </target>
  246. <target depends="-init-debug-args" name="-init-macrodef-debug">
  247. <macrodef name="debug" uri="http://www.netbeans.org/ns/j2se-project/3">
  248. <attribute default="${main.class}" name="classname"/>
  249. <attribute default="${debug.classpath}" name="classpath"/>
  250. <element name="customize" optional="true"/>
  251. <sequential>
  252. <java classname="@{classname}" dir="${work.dir}" fork="true">
  253. <jvmarg line="${debug-args-line}"/>
  254. <jvmarg value="-Xrunjdwp:transport=dt_socket,address=${jpda.address}"/>
  255. <jvmarg line="${run.jvmargs}"/>
  256. <classpath>
  257. <path path="@{classpath}"/>
  258. </classpath>
  259. <syspropertyset>
  260. <propertyref prefix="run-sys-prop."/>
  261. <mapper from="run-sys-prop.*" to="*" type="glob"/>
  262. </syspropertyset>
  263. <customize/>
  264. </java>
  265. </sequential>
  266. </macrodef>
  267. </target>
  268. <target name="-init-macrodef-java">
  269. <macrodef name="java" uri="http://www.netbeans.org/ns/j2se-project/1">
  270. <attribute default="${main.class}" name="classname"/>
  271. <element name="customize" optional="true"/>
  272. <sequential>
  273. <java classname="@{classname}" dir="${work.dir}" fork="true">
  274. <jvmarg line="${run.jvmargs}"/>
  275. <classpath>
  276. <path path="${run.classpath}"/>
  277. </classpath>
  278. <syspropertyset>
  279. <propertyref prefix="run-sys-prop."/>
  280. <mapper from="run-sys-prop.*" to="*" type="glob"/>
  281. </syspropertyset>
  282. <customize/>
  283. </java>
  284. </sequential>
  285. </macrodef>
  286. </target>
  287. <target name="-init-presetdef-jar">
  288. <presetdef name="jar" uri="http://www.netbeans.org/ns/j2se-project/1">
  289. <jar compress="${jar.compress}" jarfile="${dist.jar}">
  290. <j2seproject1:fileset dir="${build.classes.dir}" excludes="${dist.jar.excludes}"/>
  291. </jar>
  292. </presetdef>
  293. </target>
  294. <target depends="-pre-init,-init-private,-init-user,-init-project,-do-init,-post-init,-init-check,-init-macrodef-property,-init-macrodef-javac,-init-macrodef-junit,-init-macrodef-nbjpda,-init-macrodef-debug,-init-macrodef-java,-init-presetdef-jar" name="init"/>
  295. <!--
  296. ===================
  297. COMPILATION SECTION
  298. ===================
  299. -->
  300. <target depends="init" name="deps-jar" unless="no.deps"/>
  301. <target depends="init,deps-jar" name="-pre-pre-compile">
  302. <mkdir dir="${build.classes.dir}"/>
  303. </target>
  304. <target name="-pre-compile">
  305. <!-- Empty placeholder for easier customization. -->
  306. <!-- You can override this target in the ../build.xml file. -->
  307. </target>
  308. <target if="do.depend.true" name="-compile-depend">
  309. <j2seproject3:depend/>
  310. </target>
  311. <target depends="init,deps-jar,-pre-pre-compile,-pre-compile,-compile-depend" if="have.sources" name="-do-compile">
  312. <j2seproject3:javac/>
  313. <copy todir="${build.classes.dir}">
  314. <fileset dir="${src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
  315. </copy>
  316. </target>
  317. <target name="-post-compile">
  318. <!-- Empty placeholder for easier customization. -->
  319. <!-- You can override this target in the ../build.xml file. -->
  320. </target>
  321. <target depends="init,deps-jar,-pre-pre-compile,-pre-compile,-do-compile,-post-compile" description="Compile project." name="compile"/>
  322. <target name="-pre-compile-single">
  323. <!-- Empty placeholder for easier customization. -->
  324. <!-- You can override this target in the ../build.xml file. -->
  325. </target>
  326. <target depends="init,deps-jar,-pre-pre-compile" name="-do-compile-single">
  327. <fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail>
  328. <j2seproject3:force-recompile/>
  329. <j2seproject3:javac excludes="" includes="${javac.includes}" sourcepath="${src.dir}"/>
  330. </target>
  331. <target name="-post-compile-single">
  332. <!-- Empty placeholder for easier customization. -->
  333. <!-- You can override this target in the ../build.xml file. -->
  334. </target>
  335. <target depends="init,deps-jar,-pre-pre-compile,-pre-compile-single,-do-compile-single,-post-compile-single" name="compile-single"/>
  336. <!--
  337. ====================
  338. JAR BUILDING SECTION
  339. ====================
  340. -->
  341. <target depends="init" name="-pre-pre-jar">
  342. <dirname file="${dist.jar}" property="dist.jar.dir"/>
  343. <mkdir dir="${dist.jar.dir}"/>
  344. </target>
  345. <target name="-pre-jar">
  346. <!-- Empty placeholder for easier customization. -->
  347. <!-- You can override this target in the ../build.xml file. -->
  348. </target>
  349. <target depends="init,compile,-pre-pre-jar,-pre-jar" name="-do-jar-without-manifest" unless="manifest.available">
  350. <j2seproject1:jar/>
  351. </target>
  352. <target depends="init,compile,-pre-pre-jar,-pre-jar" if="manifest.available" name="-do-jar-with-manifest" unless="manifest.available+main.class">
  353. <j2seproject1:jar manifest="${manifest.file}"/>
  354. </target>
  355. <target depends="init,compile,-pre-pre-jar,-pre-jar" if="manifest.available+main.class" name="-do-jar-with-mainclass" unless="manifest.available+main.class+mkdist.available">
  356. <j2seproject1:jar manifest="${manifest.file}">
  357. <j2seproject1:manifest>
  358. <j2seproject1:attribute name="Main-Class" value="${main.class}"/>
  359. </j2seproject1:manifest>
  360. </j2seproject1:jar>
  361. <echo>To run this application from the command line without Ant, try:</echo>
  362. <property location="${build.classes.dir}" name="build.classes.dir.resolved"/>
  363. <property location="${dist.jar}" name="dist.jar.resolved"/>
  364. <pathconvert property="run.classpath.with.dist.jar">
  365. <path path="${run.classpath}"/>
  366. <map from="${build.classes.dir.resolved}" to="${dist.jar.resolved}"/>
  367. </pathconvert>
  368. <echo>java -cp "${run.classpath.with.dist.jar}" ${main.class}</echo>
  369. </target>
  370. <target depends="init,compile,-pre-pre-jar,-pre-jar" if="manifest.available+main.class+mkdist.available" name="-do-jar-with-libraries">
  371. <property location="${build.classes.dir}" name="build.classes.dir.resolved"/>
  372. <pathconvert property="run.classpath.without.build.classes.dir">
  373. <path path="${run.classpath}"/>
  374. <map from="${build.classes.dir.resolved}" to=""/>
  375. </pathconvert>
  376. <pathconvert pathsep=" " property="jar.classpath">
  377. <path path="${run.classpath.without.build.classes.dir}"/>
  378. <chainedmapper>
  379. <flattenmapper/>
  380. <globmapper from="*" to="lib/*"/>
  381. </chainedmapper>
  382. </pathconvert>
  383. <taskdef classname="org.netbeans.modules.java.j2seproject.copylibstask.CopyLibs" classpath="${libs.CopyLibs.classpath}" name="copylibs"/>
  384. <copylibs compress="${jar.compress}" jarfile="${dist.jar}" manifest="${manifest.file}" runtimeclasspath="${run.classpath.without.build.classes.dir}">
  385. <fileset dir="${build.classes.dir}" excludes="${dist.jar.excludes}" />
  386. <manifest>
  387. <attribute name="Main-Class" value="${main.class}"/>
  388. <attribute name="Class-Path" value="${jar.classpath}"/>
  389. </manifest>
  390. </copylibs>
  391. <echo>To run this application from the command line without Ant, try:</echo>
  392. <property location="${dist.jar}" name="dist.jar.resolved"/>
  393. <echo>java -jar "${dist.jar.resolved}"</echo>
  394. </target>
  395. <target name="-post-jar">
  396. <!-- Empty placeholder for easier customization. -->
  397. <!-- You can override this target in the ../build.xml file. -->
  398. </target>
  399. <target depends="init,compile,-pre-jar,-do-jar-with-manifest,-do-jar-without-manifest,-do-jar-with-mainclass,-do-jar-with-libraries,-post-jar" description="Build JAR." name="jar"/>
  400. <!--
  401. =================
  402. EXECUTION SECTION
  403. =================
  404. -->
  405. <target depends="init,compile" description="Run a main class." name="run">
  406. <j2seproject1:java>
  407. <customize>
  408. <arg line="${application.args}"/>
  409. </customize>
  410. </j2seproject1:java>
  411. </target>
  412. <target name="-do-not-recompile">
  413. <property name="javac.includes.binary" value=""/>
  414. </target>
  415. <target depends="init,-do-not-recompile,compile-single" name="run-single">
  416. <fail unless="run.class">Must select one file in the IDE or set run.class</fail>
  417. <j2seproject1:java classname="${run.class}"/>
  418. </target>
  419. <!--
  420. =================
  421. DEBUGGING SECTION
  422. =================
  423. -->
  424. <target depends="init" if="netbeans.home" name="-debug-start-debugger">
  425. <j2seproject1:nbjpdastart name="${debug.class}"/>
  426. </target>
  427. <target depends="init,compile" name="-debug-start-debuggee">
  428. <j2seproject3:debug>
  429. <customize>
  430. <arg line="${application.args}"/>
  431. </customize>
  432. </j2seproject3:debug>
  433. </target>
  434. <target depends="init,compile,-debug-start-debugger,-debug-start-debuggee" description="Debug project in IDE." if="netbeans.home" name="debug"/>
  435. <target depends="init" if="netbeans.home" name="-debug-start-debugger-stepinto">
  436. <j2seproject1:nbjpdastart stopclassname="${main.class}"/>
  437. </target>
  438. <target depends="init,compile,-debug-start-debugger-stepinto,-debug-start-debuggee" if="netbeans.home" name="debug-stepinto"/>
  439. <target depends="init,compile-single" if="netbeans.home" name="-debug-start-debuggee-single">
  440. <fail unless="debug.class">Must select one file in the IDE or set debug.class</fail>
  441. <j2seproject3:debug classname="${debug.class}"/>
  442. </target>
  443. <target depends="init,-do-not-recompile,compile-single,-debug-start-debugger,-debug-start-debuggee-single" if="netbeans.home" name="debug-single"/>
  444. <target depends="init" name="-pre-debug-fix">
  445. <fail unless="fix.includes">Must set fix.includes</fail>
  446. <property name="javac.includes" value="${fix.includes}.java"/>
  447. </target>
  448. <target depends="init,-pre-debug-fix,compile-single" if="netbeans.home" name="-do-debug-fix">
  449. <j2seproject1:nbjpdareload/>
  450. </target>
  451. <target depends="init,-pre-debug-fix,-do-debug-fix" if="netbeans.home" name="debug-fix"/>
  452. <!--
  453. ===============
  454. JAVADOC SECTION
  455. ===============
  456. -->
  457. <target depends="init" name="-javadoc-build">
  458. <mkdir dir="${dist.javadoc.dir}"/>
  459. <javadoc additionalparam="${javadoc.additionalparam}" author="${javadoc.author}" charset="${javadoc.encoding.used}" destdir="${dist.javadoc.dir}" docencoding="${javadoc.encoding.used}" encoding="${javadoc.encoding.used}" failonerror="true" noindex="${javadoc.noindex}" nonavbar="${javadoc.nonavbar}" notree="${javadoc.notree}" private="${javadoc.private}" source="${javac.source}" splitindex="${javadoc.splitindex}" use="${javadoc.use}" useexternalfile="true" version="${javadoc.version}" windowtitle="${javadoc.windowtitle}">
  460. <classpath>
  461. <path path="${javac.classpath}"/>
  462. </classpath>
  463. <fileset dir="${src.dir}" excludes="${excludes}" includes="${includes}">
  464. <filename name="**/*.java"/>
  465. </fileset>
  466. </javadoc>
  467. </target>
  468. <target name="move-javadoc-check">
  469. <condition property="move.javadoc">
  470. <isset property="javadoc.moveto"/>
  471. </condition>
  472. </target>
  473. <target name="move-javadoc" depends="move-javadoc-check" if="move.javadoc">
  474. <delete dir="${javadoc.moveto}"/>
  475. <move file="${dist.javadoc.dir}" tofile="${javadoc.moveto}"/>
  476. </target>
  477. <target depends="init,-doccheck-check" name="-doccheck-build" if="doccheck.run">
  478. <mkdir dir="${doccheck.dir}"/>
  479. <javadoc additionalparam="-doclet com.sun.tools.doclets.doccheck.DocCheck -docletpath ${doccheck.path} -skipPkg net.miginfocom.*" author="${javadoc.author}" destdir="${doccheck.dir}" failonerror="true" private="${javadoc.private}" source="${javac.source}" sourcepath="${src.dir}" useexternalfile="true" version="${javadoc.version}">
  480. <classpath>
  481. <path path="${javac.classpath}"/>
  482. </classpath>
  483. </javadoc>
  484. </target>
  485. <target name="-doccheck-check">
  486. <condition property="doccheck.run">
  487. <and>
  488. <isset property="doccheck.path"/>
  489. <isset property="doccheck.dir"/>
  490. <available file="${doccheck.path}"/>
  491. </and>
  492. </condition>
  493. </target>
  494. <target depends="init,-javadoc-build" if="netbeans.home" name="-javadoc-browse" unless="no.javadoc.preview">
  495. <nbbrowse file="${dist.javadoc.dir}/index.html"/>
  496. </target>
  497. <target depends="init,-javadoc-build,-javadoc-browse,move-javadoc,-doccheck-build" description="Build Javadoc." name="javadoc"/>
  498. <target depends="-doccheck-build" description="Build Javadoc error report (doccheck)." name="doccheck"/>
  499. <!--
  500. =========================
  501. JUNIT COMPILATION SECTION
  502. =========================
  503. -->
  504. <target depends="init,compile" if="have.tests" name="-pre-pre-compile-test">
  505. <mkdir dir="${build.test.classes.dir}"/>
  506. </target>
  507. <target name="-pre-compile-test">
  508. <!-- Empty placeholder for easier customization. -->
  509. <!-- You can override this target in the ../build.xml file. -->
  510. </target>
  511. <target if="do.depend.true" name="-compile-test-depend">
  512. <j2seproject3:depend classpath="${javac.test.classpath}" destdir="${build.test.classes.dir}" srcdir="${test.src.dir}"/>
  513. </target>
  514. <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test,-compile-test-depend" if="have.tests" name="-do-compile-test">
  515. <j2seproject3:javac classpath="${javac.test.classpath}" debug="true" destdir="${build.test.classes.dir}" srcdir="${test.src.dir}"/>
  516. <copy todir="${build.test.classes.dir}">
  517. <fileset dir="${test.src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
  518. </copy>
  519. </target>
  520. <target name="-post-compile-test">
  521. <!-- Empty placeholder for easier customization. -->
  522. <!-- You can override this target in the ../build.xml file. -->
  523. </target>
  524. <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test,-do-compile-test,-post-compile-test" name="compile-test"/>
  525. <target name="-pre-compile-test-single">
  526. <!-- Empty placeholder for easier customization. -->
  527. <!-- You can override this target in the ../build.xml file. -->
  528. </target>
  529. <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test-single" if="have.tests" name="-do-compile-test-single">
  530. <fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail>
  531. <j2seproject3:force-recompile destdir="${build.test.classes.dir}"/>
  532. <j2seproject3:javac classpath="${javac.test.classpath}" debug="true" destdir="${build.test.classes.dir}" excludes="" includes="${javac.includes}" sourcepath="${test.src.dir}" srcdir="${test.src.dir}"/>
  533. <copy todir="${build.test.classes.dir}">
  534. <fileset dir="${test.src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
  535. </copy>
  536. </target>
  537. <target name="-post-compile-test-single">
  538. <!-- Empty placeholder for easier customization. -->
  539. <!-- You can override this target in the ../build.xml file. -->
  540. </target>
  541. <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test-single,-do-compile-test-single,-post-compile-test-single" name="compile-test-single"/>
  542. <!--
  543. =======================
  544. JUNIT EXECUTION SECTION
  545. =======================
  546. -->
  547. <target depends="init" if="have.tests" name="-pre-test-run">
  548. <mkdir dir="${build.test.results.dir}"/>
  549. </target>
  550. <target depends="init,compile-test,-pre-test-run" if="have.tests" name="-do-test-run">
  551. <j2seproject3:junit testincludes="**/*Test.java"/>
  552. </target>
  553. <target depends="init,compile-test,-pre-test-run,-do-test-run" if="have.tests" name="-post-test-run">
  554. <fail if="tests.failed">Some tests failed; see details above.</fail>
  555. </target>
  556. <target depends="init" if="have.tests" name="test-report"/>
  557. <target depends="init" if="netbeans.home+have.tests" name="-test-browse"/>
  558. <target depends="init,compile-test,-pre-test-run,-do-test-run,test-report,-post-test-run,-test-browse" description="Run unit tests." name="test"/>
  559. <target depends="init" if="have.tests" name="-pre-test-run-single">
  560. <mkdir dir="${build.test.results.dir}"/>
  561. </target>
  562. <target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-do-test-run-single">
  563. <fail unless="test.includes">Must select some files in the IDE or set test.includes</fail>
  564. <j2seproject3:junit excludes="" includes="${test.includes}"/>
  565. </target>
  566. <target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single" if="have.tests" name="-post-test-run-single">
  567. <fail if="tests.failed">Some tests failed; see details above.</fail>
  568. </target>
  569. <target depends="init,-do-not-recompile,compile-test-single,-pre-test-run-single,-do-test-run-single,-post-test-run-single" description="Run single unit test." name="test-single"/>
  570. <!--
  571. =======================
  572. JUNIT DEBUGGING SECTION
  573. =======================
  574. -->
  575. <target depends="init,compile-test" if="have.tests" name="-debug-start-debuggee-test">
  576. <fail unless="test.class">Must select one file in the IDE or set test.class</fail>
  577. <property location="${build.test.results.dir}/TEST-${test.class}.xml" name="test.report.file"/>
  578. <delete file="${test.report.file}"/>
  579. <mkdir dir="${build.test.results.dir}"/>
  580. <j2seproject3:debug classname="org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner" classpath="${ant.home}/lib/ant.jar:${ant.home}/lib/ant-junit.jar:${debug.test.classpath}">
  581. <customize>
  582. <syspropertyset>
  583. <propertyref prefix="test-sys-prop."/>
  584. <mapper from="test-sys-prop.*" to="*" type="glob"/>
  585. </syspropertyset>
  586. <arg value="${test.class}"/>
  587. <arg value="showoutput=true"/>
  588. <arg value="formatter=org.apache.tools.ant.taskdefs.optional.junit.BriefJUnitResultFormatter"/>
  589. <arg value="formatter=org.apache.tools.ant.taskdefs.optional.junit.XMLJUnitResultFormatter,${test.report.file}"/>
  590. </customize>
  591. </j2seproject3:debug>
  592. </target>
  593. <target depends="init,compile-test" if="netbeans.home+have.tests" name="-debug-start-debugger-test">
  594. <j2seproject1:nbjpdastart classpath="${debug.test.classpath}" name="${test.class}"/>
  595. </target>
  596. <target depends="init,-do-not-recompile,compile-test-single,-debug-start-debugger-test,-debug-start-debuggee-test" name="debug-test"/>
  597. <target depends="init,-pre-debug-fix,compile-test-single" if="netbeans.home" name="-do-debug-fix-test">
  598. <j2seproject1:nbjpdareload dir="${build.test.classes.dir}"/>
  599. </target>
  600. <target depends="init,-pre-debug-fix,-do-debug-fix-test" if="netbeans.home" name="debug-fix-test"/>
  601. <!--
  602. =========================
  603. APPLET EXECUTION SECTION
  604. =========================
  605. -->
  606. <target depends="init,compile-single" name="run-applet">
  607. <fail unless="applet.url">Must select one file in the IDE or set applet.url</fail>
  608. <j2seproject1:java classname="sun.applet.AppletViewer">
  609. <customize>
  610. <arg value="${applet.url}"/>
  611. </customize>
  612. </j2seproject1:java>
  613. </target>
  614. <!--
  615. =========================
  616. APPLET DEBUGGING SECTION
  617. =========================
  618. -->
  619. <target depends="init,compile-single" if="netbeans.home" name="-debug-start-debuggee-applet">
  620. <fail unless="applet.url">Must select one file in the IDE or set applet.url</fail>
  621. <j2seproject3:debug classname="sun.applet.AppletViewer">
  622. <customize>
  623. <arg value="${applet.url}"/>
  624. </customize>
  625. </j2seproject3:debug>
  626. </target>
  627. <target depends="init,compile-single,-debug-start-debugger,-debug-start-debuggee-applet" if="netbeans.home" name="debug-applet"/>
  628. <!--
  629. ===============
  630. CLEANUP SECTION
  631. ===============
  632. -->
  633. <target depends="init" name="deps-clean" unless="no.deps"/>
  634. <target depends="init" name="-do-clean">
  635. <delete dir="${build.dir}"/>
  636. <delete dir="${dist.dir}"/>
  637. </target>
  638. <target name="-post-clean">
  639. <!-- Empty placeholder for easier customization. -->
  640. <!-- You can override this target in the ../build.xml file. -->
  641. </target>
  642. <target depends="init,deps-clean,-do-clean,-post-clean" description="Clean build products." name="clean"/>
  643. </project>