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.

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