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

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