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

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