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

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