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

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690
  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. <fileset dir="${test.src.dir}" excludes="@{excludes},${excludes}" includes="@{includes}">
  199. <filename name="**/DummyTest*"/>
  200. </fileset>
  201. </batchtest>
  202. <classpath>
  203. <path path="${run.test.classpath}"/>
  204. </classpath>
  205. <syspropertyset>
  206. <propertyref prefix="test-sys-prop."/>
  207. <mapper from="test-sys-prop.*" to="*" type="glob"/>
  208. </syspropertyset>
  209. <formatter type="brief" usefile="false"/>
  210. <formatter type="xml"/>
  211. <jvmarg line="${run.jvmargs}"/>
  212. </junit>
  213. </sequential>
  214. </macrodef>
  215. </target>
  216. <target name="-init-macrodef-junit-noclover" unless="clover.installed">
  217. <macrodef name="junit" uri="http://www.netbeans.org/ns/j2se-project/3">
  218. <attribute default="${includes}" name="includes"/>
  219. <attribute default="${excludes}" name="excludes"/>
  220. <attribute default="**" name="testincludes"/>
  221. <sequential>
  222. <junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" showoutput="true" timeout="120000">
  223. <classpath>
  224. <pathelement path="${clover.jar}"/>
  225. </classpath>
  226. <batchtest todir="${build.test.results.dir}">
  227. <fileset dir="${test.src.dir}" excludes="@{excludes},${excludes}" includes="@{includes}">
  228. <filename name="@{testincludes}"/>
  229. </fileset>
  230. </batchtest>
  231. <classpath>
  232. <path path="${run.test.classpath}"/>
  233. </classpath>
  234. <syspropertyset>
  235. <propertyref prefix="test-sys-prop."/>
  236. <mapper from="test-sys-prop.*" to="*" type="glob"/>
  237. </syspropertyset>
  238. <formatter type="brief" usefile="false"/>
  239. <formatter type="xml"/>
  240. <jvmarg line="${run.jvmargs}"/>
  241. </junit>
  242. </sequential>
  243. </macrodef>
  244. </target>
  245. <target name="-init-macrodef-nbjpda">
  246. <macrodef name="nbjpdastart" uri="http://www.netbeans.org/ns/j2se-project/1">
  247. <attribute default="${main.class}" name="name"/>
  248. <attribute default="${debug.classpath}" name="classpath"/>
  249. <attribute default="" name="stopclassname"/>
  250. <sequential>
  251. <nbjpdastart addressproperty="jpda.address" name="@{name}" stopclassname="@{stopclassname}" transport="dt_socket">
  252. <classpath>
  253. <path path="@{classpath}"/>
  254. </classpath>
  255. </nbjpdastart>
  256. </sequential>
  257. </macrodef>
  258. <macrodef name="nbjpdareload" uri="http://www.netbeans.org/ns/j2se-project/1">
  259. <attribute default="${build.classes.dir}" name="dir"/>
  260. <sequential>
  261. <nbjpdareload>
  262. <fileset dir="@{dir}" includes="${fix.includes}*.class"/>
  263. </nbjpdareload>
  264. </sequential>
  265. </macrodef>
  266. </target>
  267. <target name="-init-debug-args">
  268. <property name="version-output" value="java version &quot;${ant.java.version}"/>
  269. <condition property="have-jdk-older-than-1.4">
  270. <or>
  271. <contains string="${version-output}" substring="java version &quot;1.0"/>
  272. <contains string="${version-output}" substring="java version &quot;1.1"/>
  273. <contains string="${version-output}" substring="java version &quot;1.2"/>
  274. <contains string="${version-output}" substring="java version &quot;1.3"/>
  275. </or>
  276. </condition>
  277. <condition else="-Xdebug" property="debug-args-line" value="-Xdebug -Xnoagent -Djava.compiler=none">
  278. <istrue value="${have-jdk-older-than-1.4}"/>
  279. </condition>
  280. </target>
  281. <target depends="-init-debug-args" name="-init-macrodef-debug">
  282. <macrodef name="debug" uri="http://www.netbeans.org/ns/j2se-project/3">
  283. <attribute default="${main.class}" name="classname"/>
  284. <attribute default="${debug.classpath}" name="classpath"/>
  285. <element name="customize" optional="true"/>
  286. <sequential>
  287. <java classname="@{classname}" dir="${work.dir}" fork="true">
  288. <jvmarg line="${debug-args-line}"/>
  289. <jvmarg value="-Xrunjdwp:transport=dt_socket,address=${jpda.address}"/>
  290. <jvmarg line="${run.jvmargs}"/>
  291. <classpath>
  292. <path path="@{classpath}"/>
  293. </classpath>
  294. <syspropertyset>
  295. <propertyref prefix="run-sys-prop."/>
  296. <mapper from="run-sys-prop.*" to="*" type="glob"/>
  297. </syspropertyset>
  298. <customize/>
  299. </java>
  300. </sequential>
  301. </macrodef>
  302. </target>
  303. <target name="-init-macrodef-java">
  304. <macrodef name="java" uri="http://www.netbeans.org/ns/j2se-project/1">
  305. <attribute default="${main.class}" name="classname"/>
  306. <element name="customize" optional="true"/>
  307. <sequential>
  308. <java classname="@{classname}" dir="${work.dir}" fork="true">
  309. <jvmarg line="${run.jvmargs}"/>
  310. <classpath>
  311. <path path="${run.classpath}"/>
  312. </classpath>
  313. <syspropertyset>
  314. <propertyref prefix="run-sys-prop."/>
  315. <mapper from="run-sys-prop.*" to="*" type="glob"/>
  316. </syspropertyset>
  317. <customize/>
  318. </java>
  319. </sequential>
  320. </macrodef>
  321. </target>
  322. <target name="-init-presetdef-jar">
  323. <presetdef name="jar" uri="http://www.netbeans.org/ns/j2se-project/1">
  324. <jar compress="${jar.compress}" jarfile="${dist.jar}">
  325. <j2seproject1:fileset dir="${build.classes.dir}" excludes="${dist.jar.excludes}"/>
  326. </jar>
  327. </presetdef>
  328. </target>
  329. <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"/>
  330. <!--
  331. ===================
  332. COMPILATION SECTION
  333. ===================
  334. -->
  335. <target depends="init" name="deps-jar" unless="no.deps"/>
  336. <target depends="init,deps-jar" name="-pre-pre-compile">
  337. <mkdir dir="${build.classes.dir}"/>
  338. </target>
  339. <target name="-pre-compile">
  340. <!-- Empty placeholder for easier customization. -->
  341. <!-- You can override this target in the ../build.xml file. -->
  342. </target>
  343. <target if="do.depend.true" name="-compile-depend">
  344. <j2seproject3:depend/>
  345. </target>
  346. <target depends="init,deps-jar,-pre-pre-compile,-pre-compile,-compile-depend" if="have.sources" name="-do-compile">
  347. <j2seproject3:javac/>
  348. <copy todir="${build.classes.dir}">
  349. <fileset dir="${src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
  350. </copy>
  351. </target>
  352. <target name="-post-compile">
  353. <!-- Empty placeholder for easier customization. -->
  354. <!-- You can override this target in the ../build.xml file. -->
  355. </target>
  356. <target depends="init,deps-jar,-pre-pre-compile,-pre-compile,-do-compile,-post-compile" description="Compile project." name="compile"/>
  357. <target name="-pre-compile-single">
  358. <!-- Empty placeholder for easier customization. -->
  359. <!-- You can override this target in the ../build.xml file. -->
  360. </target>
  361. <target depends="init,deps-jar,-pre-pre-compile" name="-do-compile-single">
  362. <fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail>
  363. <j2seproject3:force-recompile/>
  364. <j2seproject3:javac excludes="" includes="${javac.includes}" sourcepath="${src.dir}"/>
  365. </target>
  366. <target name="-post-compile-single">
  367. <!-- Empty placeholder for easier customization. -->
  368. <!-- You can override this target in the ../build.xml file. -->
  369. </target>
  370. <target depends="init,deps-jar,-pre-pre-compile,-pre-compile-single,-do-compile-single,-post-compile-single" name="compile-single"/>
  371. <!--
  372. ====================
  373. JAR BUILDING SECTION
  374. ====================
  375. -->
  376. <target depends="init" name="-pre-pre-jar">
  377. <dirname file="${dist.jar}" property="dist.jar.dir"/>
  378. <mkdir dir="${dist.jar.dir}"/>
  379. </target>
  380. <target name="-pre-jar">
  381. <!-- Empty placeholder for easier customization. -->
  382. <!-- You can override this target in the ../build.xml file. -->
  383. </target>
  384. <target depends="init,compile,-pre-pre-jar,-pre-jar" name="-do-jar-without-manifest" unless="manifest.available">
  385. <j2seproject1:jar/>
  386. </target>
  387. <target depends="init,compile,-pre-pre-jar,-pre-jar" if="manifest.available" name="-do-jar-with-manifest" unless="manifest.available+main.class">
  388. <j2seproject1:jar manifest="${manifest.file}"/>
  389. </target>
  390. <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">
  391. <j2seproject1:jar manifest="${manifest.file}">
  392. <j2seproject1:manifest>
  393. <j2seproject1:attribute name="Main-Class" value="${main.class}"/>
  394. </j2seproject1:manifest>
  395. </j2seproject1:jar>
  396. <echo>To run this application from the command line without Ant, try:</echo>
  397. <property location="${build.classes.dir}" name="build.classes.dir.resolved"/>
  398. <property location="${dist.jar}" name="dist.jar.resolved"/>
  399. <pathconvert property="run.classpath.with.dist.jar">
  400. <path path="${run.classpath}"/>
  401. <map from="${build.classes.dir.resolved}" to="${dist.jar.resolved}"/>
  402. </pathconvert>
  403. <echo>java -cp "${run.classpath.with.dist.jar}" ${main.class}</echo>
  404. </target>
  405. <target depends="init,compile,-pre-pre-jar,-pre-jar" if="manifest.available+main.class+mkdist.available" name="-do-jar-with-libraries">
  406. <property location="${build.classes.dir}" name="build.classes.dir.resolved"/>
  407. <pathconvert property="run.classpath.without.build.classes.dir">
  408. <path path="${run.classpath}"/>
  409. <map from="${build.classes.dir.resolved}" to=""/>
  410. </pathconvert>
  411. <pathconvert pathsep=" " property="jar.classpath">
  412. <path path="${run.classpath.without.build.classes.dir}"/>
  413. <chainedmapper>
  414. <flattenmapper/>
  415. <globmapper from="*" to="lib/*"/>
  416. </chainedmapper>
  417. </pathconvert>
  418. <taskdef classname="org.netbeans.modules.java.j2seproject.copylibstask.CopyLibs" classpath="${libs.CopyLibs.classpath}" name="copylibs"/>
  419. <copylibs compress="${jar.compress}" jarfile="${dist.jar}" manifest="${manifest.file}" runtimeclasspath="${run.classpath.without.build.classes.dir}">
  420. <fileset dir="${build.classes.dir}" excludes="${dist.jar.excludes}" />
  421. <manifest>
  422. <attribute name="Main-Class" value="${main.class}"/>
  423. <attribute name="Class-Path" value="${jar.classpath}"/>
  424. </manifest>
  425. </copylibs>
  426. <echo>To run this application from the command line without Ant, try:</echo>
  427. <property location="${dist.jar}" name="dist.jar.resolved"/>
  428. <echo>java -jar "${dist.jar.resolved}"</echo>
  429. </target>
  430. <target name="-post-jar">
  431. <!-- Empty placeholder for easier customization. -->
  432. <!-- You can override this target in the ../build.xml file. -->
  433. </target>
  434. <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"/>
  435. <!--
  436. =================
  437. EXECUTION SECTION
  438. =================
  439. -->
  440. <target depends="init,compile" description="Run a main class." name="run">
  441. <j2seproject1:java>
  442. <customize>
  443. <arg line="${application.args}"/>
  444. </customize>
  445. </j2seproject1:java>
  446. </target>
  447. <target name="-do-not-recompile">
  448. <property name="javac.includes.binary" value=""/>
  449. </target>
  450. <target depends="init,-do-not-recompile,compile-single" name="run-single">
  451. <fail unless="run.class">Must select one file in the IDE or set run.class</fail>
  452. <j2seproject1:java classname="${run.class}"/>
  453. </target>
  454. <!--
  455. =================
  456. DEBUGGING SECTION
  457. =================
  458. -->
  459. <target depends="init" if="netbeans.home" name="-debug-start-debugger">
  460. <j2seproject1:nbjpdastart name="${debug.class}"/>
  461. </target>
  462. <target depends="init,compile" name="-debug-start-debuggee">
  463. <j2seproject3:debug>
  464. <customize>
  465. <arg line="${application.args}"/>
  466. </customize>
  467. </j2seproject3:debug>
  468. </target>
  469. <target depends="init,compile,-debug-start-debugger,-debug-start-debuggee" description="Debug project in IDE." if="netbeans.home" name="debug"/>
  470. <target depends="init" if="netbeans.home" name="-debug-start-debugger-stepinto">
  471. <j2seproject1:nbjpdastart stopclassname="${main.class}"/>
  472. </target>
  473. <target depends="init,compile,-debug-start-debugger-stepinto,-debug-start-debuggee" if="netbeans.home" name="debug-stepinto"/>
  474. <target depends="init,compile-single" if="netbeans.home" name="-debug-start-debuggee-single">
  475. <fail unless="debug.class">Must select one file in the IDE or set debug.class</fail>
  476. <j2seproject3:debug classname="${debug.class}"/>
  477. </target>
  478. <target depends="init,-do-not-recompile,compile-single,-debug-start-debugger,-debug-start-debuggee-single" if="netbeans.home" name="debug-single"/>
  479. <target depends="init" name="-pre-debug-fix">
  480. <fail unless="fix.includes">Must set fix.includes</fail>
  481. <property name="javac.includes" value="${fix.includes}.java"/>
  482. </target>
  483. <target depends="init,-pre-debug-fix,compile-single" if="netbeans.home" name="-do-debug-fix">
  484. <j2seproject1:nbjpdareload/>
  485. </target>
  486. <target depends="init,-pre-debug-fix,-do-debug-fix" if="netbeans.home" name="debug-fix"/>
  487. <!--
  488. ===============
  489. JAVADOC SECTION
  490. ===============
  491. -->
  492. <target depends="init" name="-javadoc-build">
  493. <mkdir dir="${dist.javadoc.dir}"/>
  494. <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}">
  495. <classpath>
  496. <path path="${javac.classpath}"/>
  497. </classpath>
  498. <fileset dir="${src.dir}" excludes="${excludes}" includes="${includes}">
  499. <filename name="**/*.java"/>
  500. </fileset>
  501. </javadoc>
  502. </target>
  503. <target name="move-javadoc-check">
  504. <condition property="move.javadoc">
  505. <isset property="javadoc.moveto"/>
  506. </condition>
  507. </target>
  508. <target name="move-javadoc" depends="move-javadoc-check" if="move.javadoc">
  509. <delete dir="${javadoc.moveto}"/>
  510. <move file="${dist.javadoc.dir}" tofile="${javadoc.moveto}"/>
  511. </target>
  512. <target depends="init,-doccheck-check" name="-doccheck-build" if="doccheck.run">
  513. <mkdir dir="${doccheck.dir}"/>
  514. <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}">
  515. <classpath>
  516. <path path="${javac.classpath}"/>
  517. </classpath>
  518. </javadoc>
  519. </target>
  520. <target name="-doccheck-check">
  521. <condition property="doccheck.run">
  522. <and>
  523. <isset property="doccheck.path"/>
  524. <isset property="doccheck.dir"/>
  525. <available file="${doccheck.path}"/>
  526. </and>
  527. </condition>
  528. </target>
  529. <target depends="init,-javadoc-build" if="netbeans.home" name="-javadoc-browse" unless="no.javadoc.preview">
  530. <nbbrowse file="${dist.javadoc.dir}/index.html"/>
  531. </target>
  532. <target depends="init,-javadoc-build,-javadoc-browse,move-javadoc,-doccheck-build" description="Build Javadoc." name="javadoc"/>
  533. <target depends="-doccheck-build" description="Build Javadoc error report (doccheck)." name="doccheck"/>
  534. <!--
  535. =========================
  536. JUNIT COMPILATION SECTION
  537. =========================
  538. -->
  539. <target depends="init,compile" if="have.tests" name="-pre-pre-compile-test">
  540. <mkdir dir="${build.test.classes.dir}"/>
  541. </target>
  542. <target name="-pre-compile-test">
  543. <!-- Empty placeholder for easier customization. -->
  544. <!-- You can override this target in the ../build.xml file. -->
  545. </target>
  546. <target if="do.depend.true" name="-compile-test-depend">
  547. <j2seproject3:depend classpath="${javac.test.classpath}" destdir="${build.test.classes.dir}" srcdir="${test.src.dir}"/>
  548. </target>
  549. <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test,-compile-test-depend" if="have.tests" name="-do-compile-test">
  550. <j2seproject3:javac classpath="${javac.test.classpath}" debug="true" destdir="${build.test.classes.dir}" srcdir="${test.src.dir}"/>
  551. <copy todir="${build.test.classes.dir}">
  552. <fileset dir="${test.src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
  553. </copy>
  554. </target>
  555. <target name="-post-compile-test">
  556. <!-- Empty placeholder for easier customization. -->
  557. <!-- You can override this target in the ../build.xml file. -->
  558. </target>
  559. <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test,-do-compile-test,-post-compile-test" name="compile-test"/>
  560. <target name="-pre-compile-test-single">
  561. <!-- Empty placeholder for easier customization. -->
  562. <!-- You can override this target in the ../build.xml file. -->
  563. </target>
  564. <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test-single" if="have.tests" name="-do-compile-test-single">
  565. <fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail>
  566. <j2seproject3:force-recompile destdir="${build.test.classes.dir}"/>
  567. <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}"/>
  568. <copy todir="${build.test.classes.dir}">
  569. <fileset dir="${test.src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
  570. </copy>
  571. </target>
  572. <target name="-post-compile-test-single">
  573. <!-- Empty placeholder for easier customization. -->
  574. <!-- You can override this target in the ../build.xml file. -->
  575. </target>
  576. <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test-single,-do-compile-test-single,-post-compile-test-single" name="compile-test-single"/>
  577. <!--
  578. =======================
  579. JUNIT EXECUTION SECTION
  580. =======================
  581. -->
  582. <target depends="init" if="have.tests" name="-pre-test-run">
  583. <mkdir dir="${build.test.results.dir}"/>
  584. </target>
  585. <target depends="init,compile-test,-pre-test-run" if="have.tests" name="-do-test-run">
  586. <j2seproject3:junit testincludes="**/*Test.java"/>
  587. </target>
  588. <target depends="init,compile-test,-pre-test-run,-do-test-run" if="have.tests" name="-post-test-run">
  589. <fail if="tests.failed">Some tests failed; see details above.</fail>
  590. </target>
  591. <target depends="init" if="have.tests" name="test-report"/>
  592. <target depends="init" if="netbeans.home+have.tests" name="-test-browse"/>
  593. <target depends="init,compile-test,-pre-test-run,-do-test-run,test-report,-post-test-run,-test-browse" description="Run unit tests." name="test"/>
  594. <target depends="init" if="have.tests" name="-pre-test-run-single">
  595. <mkdir dir="${build.test.results.dir}"/>
  596. </target>
  597. <target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-do-test-run-single">
  598. <fail unless="test.includes">Must select some files in the IDE or set test.includes</fail>
  599. <j2seproject3:junit excludes="" includes="${test.includes}"/>
  600. </target>
  601. <target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single" if="have.tests" name="-post-test-run-single">
  602. <fail if="tests.failed">Some tests failed; see details above.</fail>
  603. </target>
  604. <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"/>
  605. <!--
  606. =======================
  607. JUNIT DEBUGGING SECTION
  608. =======================
  609. -->
  610. <target depends="init,compile-test" if="have.tests" name="-debug-start-debuggee-test">
  611. <fail unless="test.class">Must select one file in the IDE or set test.class</fail>
  612. <property location="${build.test.results.dir}/TEST-${test.class}.xml" name="test.report.file"/>
  613. <delete file="${test.report.file}"/>
  614. <mkdir dir="${build.test.results.dir}"/>
  615. <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}">
  616. <customize>
  617. <syspropertyset>
  618. <propertyref prefix="test-sys-prop."/>
  619. <mapper from="test-sys-prop.*" to="*" type="glob"/>
  620. </syspropertyset>
  621. <arg value="${test.class}"/>
  622. <arg value="showoutput=true"/>
  623. <arg value="formatter=org.apache.tools.ant.taskdefs.optional.junit.BriefJUnitResultFormatter"/>
  624. <arg value="formatter=org.apache.tools.ant.taskdefs.optional.junit.XMLJUnitResultFormatter,${test.report.file}"/>
  625. </customize>
  626. </j2seproject3:debug>
  627. </target>
  628. <target depends="init,compile-test" if="netbeans.home+have.tests" name="-debug-start-debugger-test">
  629. <j2seproject1:nbjpdastart classpath="${debug.test.classpath}" name="${test.class}"/>
  630. </target>
  631. <target depends="init,-do-not-recompile,compile-test-single,-debug-start-debugger-test,-debug-start-debuggee-test" name="debug-test"/>
  632. <target depends="init,-pre-debug-fix,compile-test-single" if="netbeans.home" name="-do-debug-fix-test">
  633. <j2seproject1:nbjpdareload dir="${build.test.classes.dir}"/>
  634. </target>
  635. <target depends="init,-pre-debug-fix,-do-debug-fix-test" if="netbeans.home" name="debug-fix-test"/>
  636. <!--
  637. =========================
  638. APPLET EXECUTION SECTION
  639. =========================
  640. -->
  641. <target depends="init,compile-single" name="run-applet">
  642. <fail unless="applet.url">Must select one file in the IDE or set applet.url</fail>
  643. <j2seproject1:java classname="sun.applet.AppletViewer">
  644. <customize>
  645. <arg value="${applet.url}"/>
  646. </customize>
  647. </j2seproject1:java>
  648. </target>
  649. <!--
  650. =========================
  651. APPLET DEBUGGING SECTION
  652. =========================
  653. -->
  654. <target depends="init,compile-single" if="netbeans.home" name="-debug-start-debuggee-applet">
  655. <fail unless="applet.url">Must select one file in the IDE or set applet.url</fail>
  656. <j2seproject3:debug classname="sun.applet.AppletViewer">
  657. <customize>
  658. <arg value="${applet.url}"/>
  659. </customize>
  660. </j2seproject3:debug>
  661. </target>
  662. <target depends="init,compile-single,-debug-start-debugger,-debug-start-debuggee-applet" if="netbeans.home" name="debug-applet"/>
  663. <!--
  664. ===============
  665. CLEANUP SECTION
  666. ===============
  667. -->
  668. <target depends="init" name="deps-clean" unless="no.deps"/>
  669. <target depends="init" name="-do-clean">
  670. <delete dir="${build.dir}"/>
  671. <delete dir="${dist.dir}"/>
  672. </target>
  673. <target name="-post-clean">
  674. <!-- Empty placeholder for easier customization. -->
  675. <!-- You can override this target in the ../build.xml file. -->
  676. </target>
  677. <target depends="init,deps-clean,-do-clean,-post-clean" description="Clean build products." name="clean"/>
  678. </project>