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

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