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

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