選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。

build-impl.xml 56KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078
  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: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-Utils-impl">
  20. <fail message="Please build using Ant 1.8.0 or higher.">
  21. <condition>
  22. <not>
  23. <antversion atleast="1.8.0"/>
  24. </not>
  25. </condition>
  26. </fail>
  27. <target depends="test,jar,javadoc" description="Build and test whole project." name="default"/>
  28. <!--
  29. ======================
  30. INITIALIZATION SECTION
  31. ======================
  32. -->
  33. <target name="-pre-init">
  34. <!-- Empty placeholder for easier customization. -->
  35. <!-- You can override this target in the ../build.xml file. -->
  36. </target>
  37. <target depends="-pre-init" name="-init-private">
  38. <property file="nbproject/private/config.properties"/>
  39. <property file="nbproject/private/configs/${config}.properties"/>
  40. <property file="nbproject/private/private.properties"/>
  41. </target>
  42. <target name="-pre-init-libraries">
  43. <property location="./lib/nblibraries.properties" name="libraries.path"/>
  44. <dirname file="${libraries.path}" property="libraries.dir.nativedirsep"/>
  45. <pathconvert dirsep="/" property="libraries.dir">
  46. <path path="${libraries.dir.nativedirsep}"/>
  47. </pathconvert>
  48. <basename file="${libraries.path}" property="libraries.basename" suffix=".properties"/>
  49. <available file="${libraries.dir}/${libraries.basename}-private.properties" property="private.properties.available"/>
  50. </target>
  51. <target depends="-pre-init-libraries" if="private.properties.available" name="-init-private-libraries">
  52. <loadproperties encoding="ISO-8859-1" srcfile="${libraries.dir}/${libraries.basename}-private.properties">
  53. <filterchain>
  54. <replacestring from="$${base}" to="${libraries.dir}"/>
  55. <escapeunicode/>
  56. </filterchain>
  57. </loadproperties>
  58. </target>
  59. <target depends="-pre-init,-init-private,-init-private-libraries" name="-init-libraries">
  60. <loadproperties encoding="ISO-8859-1" srcfile="${libraries.path}">
  61. <filterchain>
  62. <replacestring from="$${base}" to="${libraries.dir}"/>
  63. <escapeunicode/>
  64. </filterchain>
  65. </loadproperties>
  66. </target>
  67. <target depends="-pre-init,-init-private,-init-libraries" name="-init-user">
  68. <property file="${user.properties.file}"/>
  69. <!-- The two properties below are usually overridden -->
  70. <!-- by the active platform. Just a fallback. -->
  71. <property name="default.javac.source" value="1.4"/>
  72. <property name="default.javac.target" value="1.4"/>
  73. </target>
  74. <target depends="-pre-init,-init-private,-init-libraries,-init-user" name="-init-project">
  75. <property file="nbproject/configs/${config}.properties"/>
  76. <property file="nbproject/project.properties"/>
  77. </target>
  78. <target depends="-pre-init,-init-private,-init-libraries,-init-user,-init-project,-init-macrodef-property" name="-do-init">
  79. <available file="${manifest.file}" property="manifest.available"/>
  80. <condition property="splashscreen.available">
  81. <and>
  82. <not>
  83. <equals arg1="${application.splash}" arg2="" trim="true"/>
  84. </not>
  85. <available file="${application.splash}"/>
  86. </and>
  87. </condition>
  88. <condition property="main.class.available">
  89. <and>
  90. <isset property="main.class"/>
  91. <not>
  92. <equals arg1="${main.class}" arg2="" trim="true"/>
  93. </not>
  94. </and>
  95. </condition>
  96. <condition property="manifest.available+main.class">
  97. <and>
  98. <isset property="manifest.available"/>
  99. <isset property="main.class.available"/>
  100. </and>
  101. </condition>
  102. <condition property="do.archive">
  103. <not>
  104. <istrue value="${jar.archive.disabled}"/>
  105. </not>
  106. </condition>
  107. <condition property="do.mkdist">
  108. <and>
  109. <isset property="do.archive"/>
  110. <isset property="libs.CopyLibs.classpath"/>
  111. <not>
  112. <istrue value="${mkdist.disabled}"/>
  113. </not>
  114. </and>
  115. </condition>
  116. <condition property="manifest.available+main.class+mkdist.available">
  117. <and>
  118. <istrue value="${manifest.available+main.class}"/>
  119. <isset property="do.mkdist"/>
  120. </and>
  121. </condition>
  122. <condition property="do.archive+manifest.available">
  123. <and>
  124. <isset property="manifest.available"/>
  125. <istrue value="${do.archive}"/>
  126. </and>
  127. </condition>
  128. <condition property="do.archive+main.class.available">
  129. <and>
  130. <isset property="main.class.available"/>
  131. <istrue value="${do.archive}"/>
  132. </and>
  133. </condition>
  134. <condition property="do.archive+splashscreen.available">
  135. <and>
  136. <isset property="splashscreen.available"/>
  137. <istrue value="${do.archive}"/>
  138. </and>
  139. </condition>
  140. <condition property="do.archive+manifest.available+main.class">
  141. <and>
  142. <istrue value="${manifest.available+main.class}"/>
  143. <istrue value="${do.archive}"/>
  144. </and>
  145. </condition>
  146. <condition property="manifest.available-mkdist.available">
  147. <or>
  148. <istrue value="${manifest.available}"/>
  149. <isset property="do.mkdist"/>
  150. </or>
  151. </condition>
  152. <condition property="manifest.available+main.class-mkdist.available">
  153. <or>
  154. <istrue value="${manifest.available+main.class}"/>
  155. <isset property="do.mkdist"/>
  156. </or>
  157. </condition>
  158. <condition property="have.tests">
  159. <or>
  160. <available file="${test.src.dir}"/>
  161. </or>
  162. </condition>
  163. <condition property="have.sources">
  164. <or>
  165. <available file="${src.dir}"/>
  166. </or>
  167. </condition>
  168. <condition property="netbeans.home+have.tests">
  169. <and>
  170. <isset property="netbeans.home"/>
  171. <isset property="have.tests"/>
  172. </and>
  173. </condition>
  174. <condition property="no.javadoc.preview">
  175. <and>
  176. <isset property="javadoc.preview"/>
  177. <isfalse value="${javadoc.preview}"/>
  178. </and>
  179. </condition>
  180. <property name="run.jvmargs" value=""/>
  181. <property name="javac.compilerargs" value=""/>
  182. <property name="work.dir" value="${basedir}"/>
  183. <condition property="no.deps">
  184. <and>
  185. <istrue value="${no.dependencies}"/>
  186. </and>
  187. </condition>
  188. <property name="javac.debug" value="true"/>
  189. <property name="javadoc.preview" value="true"/>
  190. <property name="application.args" value=""/>
  191. <property name="source.encoding" value="${file.encoding}"/>
  192. <property name="runtime.encoding" value="${source.encoding}"/>
  193. <condition property="javadoc.encoding.used" value="${javadoc.encoding}">
  194. <and>
  195. <isset property="javadoc.encoding"/>
  196. <not>
  197. <equals arg1="${javadoc.encoding}" arg2=""/>
  198. </not>
  199. </and>
  200. </condition>
  201. <property name="javadoc.encoding.used" value="${source.encoding}"/>
  202. <property name="includes" value="**"/>
  203. <property name="excludes" value=""/>
  204. <property name="do.depend" value="false"/>
  205. <condition property="do.depend.true">
  206. <istrue value="${do.depend}"/>
  207. </condition>
  208. <path id="endorsed.classpath.path" path="${endorsed.classpath}"/>
  209. <condition else="" property="endorsed.classpath.cmd.line.arg" value="-Xbootclasspath/p:'${toString:endorsed.classpath.path}'">
  210. <length length="0" string="${endorsed.classpath}" when="greater"/>
  211. </condition>
  212. <condition else="false" property="jdkBug6558476">
  213. <and>
  214. <matches pattern="1\.[56]" string="${java.specification.version}"/>
  215. <not>
  216. <os family="unix"/>
  217. </not>
  218. </and>
  219. </condition>
  220. <property name="javac.fork" value="${jdkBug6558476}"/>
  221. <property name="jar.index" value="false"/>
  222. <property name="jar.index.metainf" value="${jar.index}"/>
  223. <property name="copylibs.rebase" value="true"/>
  224. <available file="${meta.inf.dir}/persistence.xml" property="has.persistence.xml"/>
  225. </target>
  226. <target name="-post-init">
  227. <!-- Empty placeholder for easier customization. -->
  228. <!-- You can override this target in the ../build.xml file. -->
  229. </target>
  230. <target depends="-pre-init,-init-private,-init-libraries,-init-user,-init-project,-do-init" name="-init-check">
  231. <fail unless="src.dir">Must set src.dir</fail>
  232. <fail unless="test.src.dir">Must set test.src.dir</fail>
  233. <fail unless="build.dir">Must set build.dir</fail>
  234. <fail unless="dist.dir">Must set dist.dir</fail>
  235. <fail unless="build.classes.dir">Must set build.classes.dir</fail>
  236. <fail unless="dist.javadoc.dir">Must set dist.javadoc.dir</fail>
  237. <fail unless="build.test.classes.dir">Must set build.test.classes.dir</fail>
  238. <fail unless="build.test.results.dir">Must set build.test.results.dir</fail>
  239. <fail unless="build.classes.excludes">Must set build.classes.excludes</fail>
  240. <fail unless="dist.jar">Must set dist.jar</fail>
  241. </target>
  242. <target name="-init-macrodef-property">
  243. <macrodef name="property" uri="http://www.netbeans.org/ns/j2se-project/1">
  244. <attribute name="name"/>
  245. <attribute name="value"/>
  246. <sequential>
  247. <property name="@{name}" value="${@{value}}"/>
  248. </sequential>
  249. </macrodef>
  250. </target>
  251. <target depends="-init-ap-cmdline-properties" if="ap.supported.internal" name="-init-macrodef-javac-with-processors">
  252. <macrodef name="javac" uri="http://www.netbeans.org/ns/j2se-project/3">
  253. <attribute default="${src.dir}" name="srcdir"/>
  254. <attribute default="${build.classes.dir}" name="destdir"/>
  255. <attribute default="${javac.classpath}" name="classpath"/>
  256. <attribute default="${javac.processorpath}" name="processorpath"/>
  257. <attribute default="${build.generated.sources.dir}/ap-source-output" name="apgeneratedsrcdir"/>
  258. <attribute default="${includes}" name="includes"/>
  259. <attribute default="${excludes}" name="excludes"/>
  260. <attribute default="${javac.debug}" name="debug"/>
  261. <attribute default="${empty.dir}" name="sourcepath"/>
  262. <attribute default="${empty.dir}" name="gensrcdir"/>
  263. <element name="customize" optional="true"/>
  264. <sequential>
  265. <property location="${build.dir}/empty" name="empty.dir"/>
  266. <mkdir dir="${empty.dir}"/>
  267. <mkdir dir="@{apgeneratedsrcdir}"/>
  268. <javac debug="@{debug}" deprecation="${javac.deprecation}" destdir="@{destdir}" encoding="${source.encoding}" excludes="@{excludes}" fork="${javac.fork}" includeantruntime="false" includes="@{includes}" source="${javac.source}" sourcepath="@{sourcepath}" srcdir="@{srcdir}" target="${javac.target}" tempdir="${java.io.tmpdir}">
  269. <src>
  270. <dirset dir="@{gensrcdir}" erroronmissingdir="false">
  271. <include name="*"/>
  272. </dirset>
  273. </src>
  274. <classpath>
  275. <path path="@{classpath}"/>
  276. </classpath>
  277. <compilerarg line="${endorsed.classpath.cmd.line.arg}"/>
  278. <compilerarg line="${javac.compilerargs}"/>
  279. <compilerarg value="-processorpath"/>
  280. <compilerarg path="@{processorpath}:${empty.dir}"/>
  281. <compilerarg line="${ap.processors.internal}"/>
  282. <compilerarg line="${annotation.processing.processor.options}"/>
  283. <compilerarg value="-s"/>
  284. <compilerarg path="@{apgeneratedsrcdir}"/>
  285. <compilerarg line="${ap.proc.none.internal}"/>
  286. <customize/>
  287. </javac>
  288. </sequential>
  289. </macrodef>
  290. </target>
  291. <target depends="-init-ap-cmdline-properties" name="-init-macrodef-javac-without-processors" unless="ap.supported.internal">
  292. <macrodef name="javac" uri="http://www.netbeans.org/ns/j2se-project/3">
  293. <attribute default="${src.dir}" name="srcdir"/>
  294. <attribute default="${build.classes.dir}" name="destdir"/>
  295. <attribute default="${javac.classpath}" name="classpath"/>
  296. <attribute default="${javac.processorpath}" name="processorpath"/>
  297. <attribute default="${build.generated.sources.dir}/ap-source-output" name="apgeneratedsrcdir"/>
  298. <attribute default="${includes}" name="includes"/>
  299. <attribute default="${excludes}" name="excludes"/>
  300. <attribute default="${javac.debug}" name="debug"/>
  301. <attribute default="${empty.dir}" name="sourcepath"/>
  302. <attribute default="${empty.dir}" name="gensrcdir"/>
  303. <element name="customize" optional="true"/>
  304. <sequential>
  305. <property location="${build.dir}/empty" name="empty.dir"/>
  306. <mkdir dir="${empty.dir}"/>
  307. <javac debug="@{debug}" deprecation="${javac.deprecation}" destdir="@{destdir}" encoding="${source.encoding}" excludes="@{excludes}" fork="${javac.fork}" includeantruntime="false" includes="@{includes}" source="${javac.source}" sourcepath="@{sourcepath}" srcdir="@{srcdir}" target="${javac.target}" tempdir="${java.io.tmpdir}">
  308. <src>
  309. <dirset dir="@{gensrcdir}" erroronmissingdir="false">
  310. <include name="*"/>
  311. </dirset>
  312. </src>
  313. <classpath>
  314. <path path="@{classpath}"/>
  315. </classpath>
  316. <compilerarg line="${endorsed.classpath.cmd.line.arg}"/>
  317. <compilerarg line="${javac.compilerargs}"/>
  318. <customize/>
  319. </javac>
  320. </sequential>
  321. </macrodef>
  322. </target>
  323. <target depends="-init-macrodef-javac-with-processors,-init-macrodef-javac-without-processors" name="-init-macrodef-javac">
  324. <macrodef name="depend" uri="http://www.netbeans.org/ns/j2se-project/3">
  325. <attribute default="${src.dir}" name="srcdir"/>
  326. <attribute default="${build.classes.dir}" name="destdir"/>
  327. <attribute default="${javac.classpath}" name="classpath"/>
  328. <sequential>
  329. <depend cache="${build.dir}/depcache" destdir="@{destdir}" excludes="${excludes}" includes="${includes}" srcdir="@{srcdir}">
  330. <classpath>
  331. <path path="@{classpath}"/>
  332. </classpath>
  333. </depend>
  334. </sequential>
  335. </macrodef>
  336. <macrodef name="force-recompile" uri="http://www.netbeans.org/ns/j2se-project/3">
  337. <attribute default="${build.classes.dir}" name="destdir"/>
  338. <sequential>
  339. <fail unless="javac.includes">Must set javac.includes</fail>
  340. <pathconvert pathsep="${line.separator}" property="javac.includes.binary">
  341. <path>
  342. <filelist dir="@{destdir}" files="${javac.includes}"/>
  343. </path>
  344. <globmapper from="*.java" to="*.class"/>
  345. </pathconvert>
  346. <tempfile deleteonexit="true" property="javac.includesfile.binary"/>
  347. <echo file="${javac.includesfile.binary}" message="${javac.includes.binary}"/>
  348. <delete>
  349. <files includesfile="${javac.includesfile.binary}"/>
  350. </delete>
  351. <delete>
  352. <fileset file="${javac.includesfile.binary}"/>
  353. </delete>
  354. </sequential>
  355. </macrodef>
  356. </target>
  357. <target name="-init-macrodef-junit">
  358. <macrodef name="junit" uri="http://www.netbeans.org/ns/j2se-project/3">
  359. <attribute default="${includes}" name="includes"/>
  360. <attribute default="${excludes}" name="excludes"/>
  361. <attribute default="**" name="testincludes"/>
  362. <sequential>
  363. <property name="junit.forkmode" value="perTest"/>
  364. <junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" forkmode="${junit.forkmode}" showoutput="true" tempdir="${build.dir}">
  365. <batchtest todir="${build.test.results.dir}">
  366. <fileset dir="${test.src.dir}" excludes="@{excludes},${excludes}" includes="@{includes}">
  367. <filename name="@{testincludes}"/>
  368. </fileset>
  369. </batchtest>
  370. <classpath>
  371. <path path="${run.test.classpath}"/>
  372. </classpath>
  373. <syspropertyset>
  374. <propertyref prefix="test-sys-prop."/>
  375. <mapper from="test-sys-prop.*" to="*" type="glob"/>
  376. </syspropertyset>
  377. <formatter type="brief" usefile="false"/>
  378. <formatter type="xml"/>
  379. <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
  380. <jvmarg value="-ea"/>
  381. <jvmarg line="${run.jvmargs}"/>
  382. </junit>
  383. </sequential>
  384. </macrodef>
  385. </target>
  386. <target depends="-profile-pre-init, init, -profile-post-init, -profile-init-macrodef-profile, -profile-init-check" name="profile-init"/>
  387. <target name="-profile-pre-init">
  388. <!-- Empty placeholder for easier customization. -->
  389. <!-- You can override this target in the ../build.xml file. -->
  390. </target>
  391. <target name="-profile-post-init">
  392. <!-- Empty placeholder for easier customization. -->
  393. <!-- You can override this target in the ../build.xml file. -->
  394. </target>
  395. <target name="-profile-init-macrodef-profile">
  396. <macrodef name="resolve">
  397. <attribute name="name"/>
  398. <attribute name="value"/>
  399. <sequential>
  400. <property name="@{name}" value="${env.@{value}}"/>
  401. </sequential>
  402. </macrodef>
  403. <macrodef name="profile">
  404. <attribute default="${main.class}" name="classname"/>
  405. <element name="customize" optional="true"/>
  406. <sequential>
  407. <property environment="env"/>
  408. <resolve name="profiler.current.path" value="${profiler.info.pathvar}"/>
  409. <java classname="@{classname}" dir="${profiler.info.dir}" fork="true" jvm="${profiler.info.jvm}">
  410. <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
  411. <jvmarg value="${profiler.info.jvmargs.agent}"/>
  412. <jvmarg line="${profiler.info.jvmargs}"/>
  413. <env key="${profiler.info.pathvar}" path="${profiler.info.agentpath}:${profiler.current.path}"/>
  414. <arg line="${application.args}"/>
  415. <classpath>
  416. <path path="${run.classpath}"/>
  417. </classpath>
  418. <syspropertyset>
  419. <propertyref prefix="run-sys-prop."/>
  420. <mapper from="run-sys-prop.*" to="*" type="glob"/>
  421. </syspropertyset>
  422. <customize/>
  423. </java>
  424. </sequential>
  425. </macrodef>
  426. </target>
  427. <target depends="-profile-pre-init, init, -profile-post-init, -profile-init-macrodef-profile" name="-profile-init-check">
  428. <fail unless="profiler.info.jvm">Must set JVM to use for profiling in profiler.info.jvm</fail>
  429. <fail unless="profiler.info.jvmargs.agent">Must set profiler agent JVM arguments in profiler.info.jvmargs.agent</fail>
  430. </target>
  431. <target depends="-init-debug-args" name="-init-macrodef-nbjpda">
  432. <macrodef name="nbjpdastart" uri="http://www.netbeans.org/ns/j2se-project/1">
  433. <attribute default="${main.class}" name="name"/>
  434. <attribute default="${debug.classpath}" name="classpath"/>
  435. <attribute default="" name="stopclassname"/>
  436. <sequential>
  437. <nbjpdastart addressproperty="jpda.address" name="@{name}" stopclassname="@{stopclassname}" transport="${debug-transport}">
  438. <classpath>
  439. <path path="@{classpath}"/>
  440. </classpath>
  441. </nbjpdastart>
  442. </sequential>
  443. </macrodef>
  444. <macrodef name="nbjpdareload" uri="http://www.netbeans.org/ns/j2se-project/1">
  445. <attribute default="${build.classes.dir}" name="dir"/>
  446. <sequential>
  447. <nbjpdareload>
  448. <fileset dir="@{dir}" includes="${fix.classes}">
  449. <include name="${fix.includes}*.class"/>
  450. </fileset>
  451. </nbjpdareload>
  452. </sequential>
  453. </macrodef>
  454. </target>
  455. <target name="-init-debug-args">
  456. <property name="version-output" value="java version &quot;${ant.java.version}"/>
  457. <condition property="have-jdk-older-than-1.4">
  458. <or>
  459. <contains string="${version-output}" substring="java version &quot;1.0"/>
  460. <contains string="${version-output}" substring="java version &quot;1.1"/>
  461. <contains string="${version-output}" substring="java version &quot;1.2"/>
  462. <contains string="${version-output}" substring="java version &quot;1.3"/>
  463. </or>
  464. </condition>
  465. <condition else="-Xdebug" property="debug-args-line" value="-Xdebug -Xnoagent -Djava.compiler=none">
  466. <istrue value="${have-jdk-older-than-1.4}"/>
  467. </condition>
  468. <condition else="dt_socket" property="debug-transport-by-os" value="dt_shmem">
  469. <os family="windows"/>
  470. </condition>
  471. <condition else="${debug-transport-by-os}" property="debug-transport" value="${debug.transport}">
  472. <isset property="debug.transport"/>
  473. </condition>
  474. </target>
  475. <target depends="-init-debug-args" name="-init-macrodef-debug">
  476. <macrodef name="debug" uri="http://www.netbeans.org/ns/j2se-project/3">
  477. <attribute default="${main.class}" name="classname"/>
  478. <attribute default="${debug.classpath}" name="classpath"/>
  479. <element name="customize" optional="true"/>
  480. <sequential>
  481. <java classname="@{classname}" dir="${work.dir}" fork="true">
  482. <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
  483. <jvmarg line="${debug-args-line}"/>
  484. <jvmarg value="-Xrunjdwp:transport=${debug-transport},address=${jpda.address}"/>
  485. <jvmarg value="-Dfile.encoding=${runtime.encoding}"/>
  486. <redirector errorencoding="${runtime.encoding}" inputencoding="${runtime.encoding}" outputencoding="${runtime.encoding}"/>
  487. <jvmarg line="${run.jvmargs}"/>
  488. <classpath>
  489. <path path="@{classpath}"/>
  490. </classpath>
  491. <syspropertyset>
  492. <propertyref prefix="run-sys-prop."/>
  493. <mapper from="run-sys-prop.*" to="*" type="glob"/>
  494. </syspropertyset>
  495. <customize/>
  496. </java>
  497. </sequential>
  498. </macrodef>
  499. </target>
  500. <target name="-init-macrodef-java">
  501. <macrodef name="java" uri="http://www.netbeans.org/ns/j2se-project/1">
  502. <attribute default="${main.class}" name="classname"/>
  503. <attribute default="${run.classpath}" name="classpath"/>
  504. <element name="customize" optional="true"/>
  505. <sequential>
  506. <java classname="@{classname}" dir="${work.dir}" fork="true">
  507. <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
  508. <jvmarg value="-Dfile.encoding=${runtime.encoding}"/>
  509. <redirector errorencoding="${runtime.encoding}" inputencoding="${runtime.encoding}" outputencoding="${runtime.encoding}"/>
  510. <jvmarg line="${run.jvmargs}"/>
  511. <classpath>
  512. <path path="@{classpath}"/>
  513. </classpath>
  514. <syspropertyset>
  515. <propertyref prefix="run-sys-prop."/>
  516. <mapper from="run-sys-prop.*" to="*" type="glob"/>
  517. </syspropertyset>
  518. <customize/>
  519. </java>
  520. </sequential>
  521. </macrodef>
  522. </target>
  523. <target name="-init-macrodef-copylibs">
  524. <macrodef name="copylibs" uri="http://www.netbeans.org/ns/j2se-project/3">
  525. <attribute default="${manifest.file}" name="manifest"/>
  526. <element name="customize" optional="true"/>
  527. <sequential>
  528. <property location="${build.classes.dir}" name="build.classes.dir.resolved"/>
  529. <pathconvert property="run.classpath.without.build.classes.dir">
  530. <path path="${run.classpath}"/>
  531. <map from="${build.classes.dir.resolved}" to=""/>
  532. </pathconvert>
  533. <pathconvert pathsep=" " property="jar.classpath">
  534. <path path="${run.classpath.without.build.classes.dir}"/>
  535. <chainedmapper>
  536. <flattenmapper/>
  537. <globmapper from="*" to="lib/*"/>
  538. </chainedmapper>
  539. </pathconvert>
  540. <taskdef classname="org.netbeans.modules.java.j2seproject.copylibstask.CopyLibs" classpath="${libs.CopyLibs.classpath}" name="copylibs"/>
  541. <copylibs compress="${jar.compress}" index="${jar.index}" indexMetaInf="${jar.index.metainf}" jarfile="${dist.jar}" manifest="@{manifest}" rebase="${copylibs.rebase}" runtimeclasspath="${run.classpath.without.build.classes.dir}">
  542. <fileset dir="${build.classes.dir}"/>
  543. <manifest>
  544. <attribute name="Class-Path" value="${jar.classpath}"/>
  545. <customize/>
  546. </manifest>
  547. </copylibs>
  548. </sequential>
  549. </macrodef>
  550. </target>
  551. <target name="-init-presetdef-jar">
  552. <presetdef name="jar" uri="http://www.netbeans.org/ns/j2se-project/1">
  553. <jar compress="${jar.compress}" index="${jar.index}" jarfile="${dist.jar}">
  554. <j2seproject1:fileset dir="${build.classes.dir}"/>
  555. </jar>
  556. </presetdef>
  557. </target>
  558. <target name="-init-ap-cmdline-properties">
  559. <property name="annotation.processing.enabled" value="true"/>
  560. <property name="annotation.processing.processors.list" value=""/>
  561. <property name="annotation.processing.processor.options" value=""/>
  562. <property name="annotation.processing.run.all.processors" value="true"/>
  563. <property name="javac.processorpath" value="${javac.classpath}"/>
  564. <property name="javac.test.processorpath" value="${javac.test.classpath}"/>
  565. <condition property="ap.supported.internal" value="true">
  566. <not>
  567. <matches pattern="1\.[0-5](\..*)?" string="${javac.source}"/>
  568. </not>
  569. </condition>
  570. </target>
  571. <target depends="-init-ap-cmdline-properties" if="ap.supported.internal" name="-init-ap-cmdline-supported">
  572. <condition else="" property="ap.processors.internal" value="-processor ${annotation.processing.processors.list}">
  573. <isfalse value="${annotation.processing.run.all.processors}"/>
  574. </condition>
  575. <condition else="" property="ap.proc.none.internal" value="-proc:none">
  576. <isfalse value="${annotation.processing.enabled}"/>
  577. </condition>
  578. </target>
  579. <target depends="-init-ap-cmdline-properties,-init-ap-cmdline-supported" name="-init-ap-cmdline">
  580. <property name="ap.cmd.line.internal" value=""/>
  581. </target>
  582. <target depends="-pre-init,-init-private,-init-libraries,-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,-init-ap-cmdline" name="init"/>
  583. <!--
  584. ===================
  585. COMPILATION SECTION
  586. ===================
  587. -->
  588. <target name="-deps-jar-init" unless="built-jar.properties">
  589. <property location="${build.dir}/built-jar.properties" name="built-jar.properties"/>
  590. <delete file="${built-jar.properties}" quiet="true"/>
  591. </target>
  592. <target if="already.built.jar.${basedir}" name="-warn-already-built-jar">
  593. <echo level="warn" message="Cycle detected: DMDirc-Utils was already built"/>
  594. </target>
  595. <target depends="init,-deps-jar-init" name="deps-jar" unless="no.deps">
  596. <mkdir dir="${build.dir}"/>
  597. <touch file="${built-jar.properties}" verbose="false"/>
  598. <property file="${built-jar.properties}" prefix="already.built.jar."/>
  599. <antcall target="-warn-already-built-jar"/>
  600. <propertyfile file="${built-jar.properties}">
  601. <entry key="${basedir}" value=""/>
  602. </propertyfile>
  603. </target>
  604. <target depends="init,-check-automatic-build,-clean-after-automatic-build" name="-verify-automatic-build"/>
  605. <target depends="init" name="-check-automatic-build">
  606. <available file="${build.classes.dir}/.netbeans_automatic_build" property="netbeans.automatic.build"/>
  607. </target>
  608. <target depends="init" if="netbeans.automatic.build" name="-clean-after-automatic-build">
  609. <antcall target="clean"/>
  610. </target>
  611. <target depends="init,deps-jar" name="-pre-pre-compile">
  612. <mkdir dir="${build.classes.dir}"/>
  613. </target>
  614. <target name="-pre-compile">
  615. <!-- Empty placeholder for easier customization. -->
  616. <!-- You can override this target in the ../build.xml file. -->
  617. </target>
  618. <target if="do.depend.true" name="-compile-depend">
  619. <pathconvert property="build.generated.subdirs">
  620. <dirset dir="${build.generated.sources.dir}" erroronmissingdir="false">
  621. <include name="*"/>
  622. </dirset>
  623. </pathconvert>
  624. <j2seproject3:depend srcdir="${src.dir}:${build.generated.subdirs}"/>
  625. </target>
  626. <target depends="init,deps-jar,-pre-pre-compile,-pre-compile, -copy-persistence-xml,-compile-depend" if="have.sources" name="-do-compile">
  627. <j2seproject3:javac gensrcdir="${build.generated.sources.dir}"/>
  628. <copy todir="${build.classes.dir}">
  629. <fileset dir="${src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
  630. </copy>
  631. </target>
  632. <target if="has.persistence.xml" name="-copy-persistence-xml">
  633. <mkdir dir="${build.classes.dir}/META-INF"/>
  634. <copy todir="${build.classes.dir}/META-INF">
  635. <fileset dir="${meta.inf.dir}" includes="persistence.xml"/>
  636. </copy>
  637. </target>
  638. <target name="-post-compile">
  639. <!-- Empty placeholder for easier customization. -->
  640. <!-- You can override this target in the ../build.xml file. -->
  641. </target>
  642. <target depends="init,deps-jar,-verify-automatic-build,-pre-pre-compile,-pre-compile,-do-compile,-post-compile" description="Compile project." name="compile"/>
  643. <target name="-pre-compile-single">
  644. <!-- Empty placeholder for easier customization. -->
  645. <!-- You can override this target in the ../build.xml file. -->
  646. </target>
  647. <target depends="init,deps-jar,-pre-pre-compile" name="-do-compile-single">
  648. <fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail>
  649. <j2seproject3:force-recompile/>
  650. <j2seproject3:javac excludes="" gensrcdir="${build.generated.sources.dir}" includes="${javac.includes}" sourcepath="${src.dir}"/>
  651. </target>
  652. <target name="-post-compile-single">
  653. <!-- Empty placeholder for easier customization. -->
  654. <!-- You can override this target in the ../build.xml file. -->
  655. </target>
  656. <target depends="init,deps-jar,-verify-automatic-build,-pre-pre-compile,-pre-compile-single,-do-compile-single,-post-compile-single" name="compile-single"/>
  657. <!--
  658. ====================
  659. JAR BUILDING SECTION
  660. ====================
  661. -->
  662. <target depends="init" name="-pre-pre-jar">
  663. <dirname file="${dist.jar}" property="dist.jar.dir"/>
  664. <mkdir dir="${dist.jar.dir}"/>
  665. </target>
  666. <target name="-pre-jar">
  667. <!-- Empty placeholder for easier customization. -->
  668. <!-- You can override this target in the ../build.xml file. -->
  669. </target>
  670. <target depends="init,compile,-pre-pre-jar,-pre-jar" if="do.archive" name="-do-jar-without-manifest" unless="manifest.available-mkdist.available">
  671. <j2seproject1:jar/>
  672. </target>
  673. <target depends="init,compile,-pre-pre-jar,-pre-jar" if="do.archive+manifest.available" name="-do-jar-with-manifest" unless="manifest.available+main.class-mkdist.available">
  674. <j2seproject1:jar manifest="${manifest.file}"/>
  675. </target>
  676. <target depends="init,compile,-pre-pre-jar,-pre-jar" if="do.archive+manifest.available+main.class" name="-do-jar-with-mainclass" unless="manifest.available+main.class+mkdist.available">
  677. <j2seproject1:jar manifest="${manifest.file}">
  678. <j2seproject1:manifest>
  679. <j2seproject1:attribute name="Main-Class" value="${main.class}"/>
  680. </j2seproject1:manifest>
  681. </j2seproject1:jar>
  682. <echo level="info">To run this application from the command line without Ant, try:</echo>
  683. <property location="${build.classes.dir}" name="build.classes.dir.resolved"/>
  684. <property location="${dist.jar}" name="dist.jar.resolved"/>
  685. <pathconvert property="run.classpath.with.dist.jar">
  686. <path path="${run.classpath}"/>
  687. <map from="${build.classes.dir.resolved}" to="${dist.jar.resolved}"/>
  688. </pathconvert>
  689. <echo level="info">java -cp "${run.classpath.with.dist.jar}" ${main.class}</echo>
  690. </target>
  691. <target depends="init" if="do.archive" name="-do-jar-with-libraries-create-manifest" unless="manifest.available">
  692. <tempfile deleteonexit="true" destdir="${build.dir}" property="tmp.manifest.file"/>
  693. <touch file="${tmp.manifest.file}" verbose="false"/>
  694. </target>
  695. <target depends="init" if="do.archive+manifest.available" name="-do-jar-with-libraries-copy-manifest">
  696. <tempfile deleteonexit="true" destdir="${build.dir}" property="tmp.manifest.file"/>
  697. <copy file="${manifest.file}" tofile="${tmp.manifest.file}"/>
  698. </target>
  699. <target depends="init,-do-jar-with-libraries-create-manifest,-do-jar-with-libraries-copy-manifest" if="do.archive+main.class.available" name="-do-jar-with-libraries-set-main">
  700. <manifest file="${tmp.manifest.file}" mode="update">
  701. <attribute name="Main-Class" value="${main.class}"/>
  702. </manifest>
  703. </target>
  704. <target depends="init,-do-jar-with-libraries-create-manifest,-do-jar-with-libraries-copy-manifest" if="do.archive+splashscreen.available" name="-do-jar-with-libraries-set-splashscreen">
  705. <basename file="${application.splash}" property="splashscreen.basename"/>
  706. <mkdir dir="${build.classes.dir}/META-INF"/>
  707. <copy failonerror="false" file="${application.splash}" todir="${build.classes.dir}/META-INF"/>
  708. <manifest file="${tmp.manifest.file}" mode="update">
  709. <attribute name="SplashScreen-Image" value="META-INF/${splashscreen.basename}"/>
  710. </manifest>
  711. </target>
  712. <target depends="init,-init-macrodef-copylibs,compile,-pre-pre-jar,-pre-jar,-do-jar-with-libraries-create-manifest,-do-jar-with-libraries-copy-manifest,-do-jar-with-libraries-set-main,-do-jar-with-libraries-set-splashscreen" if="do.mkdist" name="-do-jar-with-libraries-pack">
  713. <j2seproject3:copylibs manifest="${tmp.manifest.file}"/>
  714. <echo level="info">To run this application from the command line without Ant, try:</echo>
  715. <property location="${dist.jar}" name="dist.jar.resolved"/>
  716. <echo level="info">java -jar "${dist.jar.resolved}"</echo>
  717. </target>
  718. <target depends="-do-jar-with-libraries-pack" if="do.archive" name="-do-jar-with-libraries-delete-manifest">
  719. <delete>
  720. <fileset file="${tmp.manifest.file}"/>
  721. </delete>
  722. </target>
  723. <target depends="init,compile,-pre-pre-jar,-pre-jar,-do-jar-with-libraries-create-manifest,-do-jar-with-libraries-copy-manifest,-do-jar-with-libraries-set-main,-do-jar-with-libraries-set-splashscreen,-do-jar-with-libraries-pack,-do-jar-with-libraries-delete-manifest" name="-do-jar-with-libraries"/>
  724. <target name="-post-jar">
  725. <!-- Empty placeholder for easier customization. -->
  726. <!-- You can override this target in the ../build.xml file. -->
  727. </target>
  728. <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"/>
  729. <!--
  730. =================
  731. EXECUTION SECTION
  732. =================
  733. -->
  734. <target depends="init,compile" description="Run a main class." name="run">
  735. <j2seproject1:java>
  736. <customize>
  737. <arg line="${application.args}"/>
  738. </customize>
  739. </j2seproject1:java>
  740. </target>
  741. <target name="-do-not-recompile">
  742. <property name="javac.includes.binary" value=""/>
  743. </target>
  744. <target depends="init,compile-single" name="run-single">
  745. <fail unless="run.class">Must select one file in the IDE or set run.class</fail>
  746. <j2seproject1:java classname="${run.class}"/>
  747. </target>
  748. <target depends="init,compile-test-single" name="run-test-with-main">
  749. <fail unless="run.class">Must select one file in the IDE or set run.class</fail>
  750. <j2seproject1:java classname="${run.class}" classpath="${run.test.classpath}"/>
  751. </target>
  752. <!--
  753. =================
  754. DEBUGGING SECTION
  755. =================
  756. -->
  757. <target depends="init" if="netbeans.home" name="-debug-start-debugger">
  758. <j2seproject1:nbjpdastart name="${debug.class}"/>
  759. </target>
  760. <target depends="init" if="netbeans.home" name="-debug-start-debugger-main-test">
  761. <j2seproject1:nbjpdastart classpath="${debug.test.classpath}" name="${debug.class}"/>
  762. </target>
  763. <target depends="init,compile" name="-debug-start-debuggee">
  764. <j2seproject3:debug>
  765. <customize>
  766. <arg line="${application.args}"/>
  767. </customize>
  768. </j2seproject3:debug>
  769. </target>
  770. <target depends="init,compile,-debug-start-debugger,-debug-start-debuggee" description="Debug project in IDE." if="netbeans.home" name="debug"/>
  771. <target depends="init" if="netbeans.home" name="-debug-start-debugger-stepinto">
  772. <j2seproject1:nbjpdastart stopclassname="${main.class}"/>
  773. </target>
  774. <target depends="init,compile,-debug-start-debugger-stepinto,-debug-start-debuggee" if="netbeans.home" name="debug-stepinto"/>
  775. <target depends="init,compile-single" if="netbeans.home" name="-debug-start-debuggee-single">
  776. <fail unless="debug.class">Must select one file in the IDE or set debug.class</fail>
  777. <j2seproject3:debug classname="${debug.class}"/>
  778. </target>
  779. <target depends="init,compile-single,-debug-start-debugger,-debug-start-debuggee-single" if="netbeans.home" name="debug-single"/>
  780. <target depends="init,compile-test-single" if="netbeans.home" name="-debug-start-debuggee-main-test">
  781. <fail unless="debug.class">Must select one file in the IDE or set debug.class</fail>
  782. <j2seproject3:debug classname="${debug.class}" classpath="${debug.test.classpath}"/>
  783. </target>
  784. <target depends="init,compile-test-single,-debug-start-debugger-main-test,-debug-start-debuggee-main-test" if="netbeans.home" name="debug-test-with-main"/>
  785. <target depends="init" name="-pre-debug-fix">
  786. <fail unless="fix.includes">Must set fix.includes</fail>
  787. <property name="javac.includes" value="${fix.includes}.java"/>
  788. </target>
  789. <target depends="init,-pre-debug-fix,compile-single" if="netbeans.home" name="-do-debug-fix">
  790. <j2seproject1:nbjpdareload/>
  791. </target>
  792. <target depends="init,-pre-debug-fix,-do-debug-fix" if="netbeans.home" name="debug-fix"/>
  793. <!--
  794. =================
  795. PROFILING SECTION
  796. =================
  797. -->
  798. <target depends="profile-init,compile" description="Profile a project in the IDE." if="netbeans.home" name="profile">
  799. <nbprofiledirect>
  800. <classpath>
  801. <path path="${run.classpath}"/>
  802. </classpath>
  803. </nbprofiledirect>
  804. <profile/>
  805. </target>
  806. <target depends="profile-init,compile-single" description="Profile a selected class in the IDE." if="netbeans.home" name="profile-single">
  807. <fail unless="profile.class">Must select one file in the IDE or set profile.class</fail>
  808. <nbprofiledirect>
  809. <classpath>
  810. <path path="${run.classpath}"/>
  811. </classpath>
  812. </nbprofiledirect>
  813. <profile classname="${profile.class}"/>
  814. </target>
  815. <!--
  816. =========================
  817. APPLET PROFILING SECTION
  818. =========================
  819. -->
  820. <target depends="profile-init,compile-single" if="netbeans.home" name="profile-applet">
  821. <nbprofiledirect>
  822. <classpath>
  823. <path path="${run.classpath}"/>
  824. </classpath>
  825. </nbprofiledirect>
  826. <profile classname="sun.applet.AppletViewer">
  827. <customize>
  828. <arg value="${applet.url}"/>
  829. </customize>
  830. </profile>
  831. </target>
  832. <!--
  833. =========================
  834. TESTS PROFILING SECTION
  835. =========================
  836. -->
  837. <target depends="profile-init,compile-test-single" if="netbeans.home" name="profile-test-single">
  838. <nbprofiledirect>
  839. <classpath>
  840. <path path="${run.test.classpath}"/>
  841. </classpath>
  842. </nbprofiledirect>
  843. <junit dir="${profiler.info.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" jvm="${profiler.info.jvm}" showoutput="true">
  844. <env key="${profiler.info.pathvar}" path="${profiler.info.agentpath}:${profiler.current.path}"/>
  845. <jvmarg value="${profiler.info.jvmargs.agent}"/>
  846. <jvmarg line="${profiler.info.jvmargs}"/>
  847. <test name="${profile.class}"/>
  848. <classpath>
  849. <path path="${run.test.classpath}"/>
  850. </classpath>
  851. <syspropertyset>
  852. <propertyref prefix="test-sys-prop."/>
  853. <mapper from="test-sys-prop.*" to="*" type="glob"/>
  854. </syspropertyset>
  855. <formatter type="brief" usefile="false"/>
  856. <formatter type="xml"/>
  857. </junit>
  858. </target>
  859. <!--
  860. ===============
  861. JAVADOC SECTION
  862. ===============
  863. -->
  864. <target depends="init" if="have.sources" name="-javadoc-build">
  865. <mkdir dir="${dist.javadoc.dir}"/>
  866. <condition else="" property="javadoc.endorsed.classpath.cmd.line.arg" value="-J${endorsed.classpath.cmd.line.arg}">
  867. <and>
  868. <isset property="endorsed.classpath.cmd.line.arg"/>
  869. <not>
  870. <equals arg1="${endorsed.classpath.cmd.line.arg}" arg2=""/>
  871. </not>
  872. </and>
  873. </condition>
  874. <javadoc additionalparam="${javadoc.additionalparam}" author="${javadoc.author}" charset="UTF-8" destdir="${dist.javadoc.dir}" docencoding="UTF-8" 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}">
  875. <classpath>
  876. <path path="${javac.classpath}"/>
  877. </classpath>
  878. <fileset dir="${src.dir}" excludes="*.java,${excludes}" includes="${includes}">
  879. <filename name="**/*.java"/>
  880. </fileset>
  881. <fileset dir="${build.generated.sources.dir}" erroronmissingdir="false">
  882. <include name="**/*.java"/>
  883. <exclude name="*.java"/>
  884. </fileset>
  885. <arg line="${javadoc.endorsed.classpath.cmd.line.arg}"/>
  886. </javadoc>
  887. <copy todir="${dist.javadoc.dir}">
  888. <fileset dir="${src.dir}" excludes="${excludes}" includes="${includes}">
  889. <filename name="**/doc-files/**"/>
  890. </fileset>
  891. <fileset dir="${build.generated.sources.dir}" erroronmissingdir="false">
  892. <include name="**/doc-files/**"/>
  893. </fileset>
  894. </copy>
  895. </target>
  896. <target depends="init,-javadoc-build" if="netbeans.home" name="-javadoc-browse" unless="no.javadoc.preview">
  897. <nbbrowse file="${dist.javadoc.dir}/index.html"/>
  898. </target>
  899. <target depends="init,-javadoc-build,-javadoc-browse" description="Build Javadoc." name="javadoc"/>
  900. <!--
  901. =========================
  902. JUNIT COMPILATION SECTION
  903. =========================
  904. -->
  905. <target depends="init,compile" if="have.tests" name="-pre-pre-compile-test">
  906. <mkdir dir="${build.test.classes.dir}"/>
  907. </target>
  908. <target name="-pre-compile-test">
  909. <!-- Empty placeholder for easier customization. -->
  910. <!-- You can override this target in the ../build.xml file. -->
  911. </target>
  912. <target if="do.depend.true" name="-compile-test-depend">
  913. <j2seproject3:depend classpath="${javac.test.classpath}" destdir="${build.test.classes.dir}" srcdir="${test.src.dir}"/>
  914. </target>
  915. <target depends="init,deps-jar,compile,-pre-pre-compile-test,-pre-compile-test,-compile-test-depend" if="have.tests" name="-do-compile-test">
  916. <j2seproject3:javac apgeneratedsrcdir="${build.test.classes.dir}" classpath="${javac.test.classpath}" debug="true" destdir="${build.test.classes.dir}" processorpath="${javac.test.processorpath}" srcdir="${test.src.dir}"/>
  917. <copy todir="${build.test.classes.dir}">
  918. <fileset dir="${test.src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
  919. </copy>
  920. </target>
  921. <target name="-post-compile-test">
  922. <!-- Empty placeholder for easier customization. -->
  923. <!-- You can override this target in the ../build.xml file. -->
  924. </target>
  925. <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test,-do-compile-test,-post-compile-test" name="compile-test"/>
  926. <target name="-pre-compile-test-single">
  927. <!-- Empty placeholder for easier customization. -->
  928. <!-- You can override this target in the ../build.xml file. -->
  929. </target>
  930. <target depends="init,deps-jar,compile,-pre-pre-compile-test,-pre-compile-test-single" if="have.tests" name="-do-compile-test-single">
  931. <fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail>
  932. <j2seproject3:force-recompile destdir="${build.test.classes.dir}"/>
  933. <j2seproject3:javac apgeneratedsrcdir="${build.test.classes.dir}" classpath="${javac.test.classpath}" debug="true" destdir="${build.test.classes.dir}" excludes="" includes="${javac.includes}" processorpath="${javac.test.processorpath}" sourcepath="${test.src.dir}" srcdir="${test.src.dir}"/>
  934. <copy todir="${build.test.classes.dir}">
  935. <fileset dir="${test.src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
  936. </copy>
  937. </target>
  938. <target name="-post-compile-test-single">
  939. <!-- Empty placeholder for easier customization. -->
  940. <!-- You can override this target in the ../build.xml file. -->
  941. </target>
  942. <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test-single,-do-compile-test-single,-post-compile-test-single" name="compile-test-single"/>
  943. <!--
  944. =======================
  945. JUNIT EXECUTION SECTION
  946. =======================
  947. -->
  948. <target depends="init" if="have.tests" name="-pre-test-run">
  949. <mkdir dir="${build.test.results.dir}"/>
  950. </target>
  951. <target depends="init,compile-test,-pre-test-run" if="have.tests" name="-do-test-run">
  952. <j2seproject3:junit testincludes="**/*Test.java"/>
  953. </target>
  954. <target depends="init,compile-test,-pre-test-run,-do-test-run" if="have.tests" name="-post-test-run">
  955. <fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail>
  956. </target>
  957. <target depends="init" if="have.tests" name="test-report"/>
  958. <target depends="init" if="netbeans.home+have.tests" name="-test-browse"/>
  959. <target depends="init,compile-test,-pre-test-run,-do-test-run,test-report,-post-test-run,-test-browse" description="Run unit tests." name="test"/>
  960. <target depends="init" if="have.tests" name="-pre-test-run-single">
  961. <mkdir dir="${build.test.results.dir}"/>
  962. </target>
  963. <target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-do-test-run-single">
  964. <fail unless="test.includes">Must select some files in the IDE or set test.includes</fail>
  965. <j2seproject3:junit excludes="" includes="${test.includes}"/>
  966. </target>
  967. <target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single" if="have.tests" name="-post-test-run-single">
  968. <fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail>
  969. </target>
  970. <target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single,-post-test-run-single" description="Run single unit test." name="test-single"/>
  971. <!--
  972. =======================
  973. JUNIT DEBUGGING SECTION
  974. =======================
  975. -->
  976. <target depends="init,compile-test" if="have.tests" name="-debug-start-debuggee-test">
  977. <fail unless="test.class">Must select one file in the IDE or set test.class</fail>
  978. <property location="${build.test.results.dir}/TEST-${test.class}.xml" name="test.report.file"/>
  979. <delete file="${test.report.file}"/>
  980. <mkdir dir="${build.test.results.dir}"/>
  981. <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}">
  982. <customize>
  983. <syspropertyset>
  984. <propertyref prefix="test-sys-prop."/>
  985. <mapper from="test-sys-prop.*" to="*" type="glob"/>
  986. </syspropertyset>
  987. <arg value="${test.class}"/>
  988. <arg value="showoutput=true"/>
  989. <arg value="formatter=org.apache.tools.ant.taskdefs.optional.junit.BriefJUnitResultFormatter"/>
  990. <arg value="formatter=org.apache.tools.ant.taskdefs.optional.junit.XMLJUnitResultFormatter,${test.report.file}"/>
  991. </customize>
  992. </j2seproject3:debug>
  993. </target>
  994. <target depends="init,compile-test" if="netbeans.home+have.tests" name="-debug-start-debugger-test">
  995. <j2seproject1:nbjpdastart classpath="${debug.test.classpath}" name="${test.class}"/>
  996. </target>
  997. <target depends="init,compile-test-single,-debug-start-debugger-test,-debug-start-debuggee-test" name="debug-test"/>
  998. <target depends="init,-pre-debug-fix,compile-test-single" if="netbeans.home" name="-do-debug-fix-test">
  999. <j2seproject1:nbjpdareload dir="${build.test.classes.dir}"/>
  1000. </target>
  1001. <target depends="init,-pre-debug-fix,-do-debug-fix-test" if="netbeans.home" name="debug-fix-test"/>
  1002. <!--
  1003. =========================
  1004. APPLET EXECUTION SECTION
  1005. =========================
  1006. -->
  1007. <target depends="init,compile-single" name="run-applet">
  1008. <fail unless="applet.url">Must select one file in the IDE or set applet.url</fail>
  1009. <j2seproject1:java classname="sun.applet.AppletViewer">
  1010. <customize>
  1011. <arg value="${applet.url}"/>
  1012. </customize>
  1013. </j2seproject1:java>
  1014. </target>
  1015. <!--
  1016. =========================
  1017. APPLET DEBUGGING SECTION
  1018. =========================
  1019. -->
  1020. <target depends="init,compile-single" if="netbeans.home" name="-debug-start-debuggee-applet">
  1021. <fail unless="applet.url">Must select one file in the IDE or set applet.url</fail>
  1022. <j2seproject3:debug classname="sun.applet.AppletViewer">
  1023. <customize>
  1024. <arg value="${applet.url}"/>
  1025. </customize>
  1026. </j2seproject3:debug>
  1027. </target>
  1028. <target depends="init,compile-single,-debug-start-debugger,-debug-start-debuggee-applet" if="netbeans.home" name="debug-applet"/>
  1029. <!--
  1030. ===============
  1031. CLEANUP SECTION
  1032. ===============
  1033. -->
  1034. <target name="-deps-clean-init" unless="built-clean.properties">
  1035. <property location="${build.dir}/built-clean.properties" name="built-clean.properties"/>
  1036. <delete file="${built-clean.properties}" quiet="true"/>
  1037. </target>
  1038. <target if="already.built.clean.${basedir}" name="-warn-already-built-clean">
  1039. <echo level="warn" message="Cycle detected: DMDirc-Utils was already built"/>
  1040. </target>
  1041. <target depends="init,-deps-clean-init" name="deps-clean" unless="no.deps">
  1042. <mkdir dir="${build.dir}"/>
  1043. <touch file="${built-clean.properties}" verbose="false"/>
  1044. <property file="${built-clean.properties}" prefix="already.built.clean."/>
  1045. <antcall target="-warn-already-built-clean"/>
  1046. <propertyfile file="${built-clean.properties}">
  1047. <entry key="${basedir}" value=""/>
  1048. </propertyfile>
  1049. </target>
  1050. <target depends="init" name="-do-clean">
  1051. <delete dir="${build.dir}"/>
  1052. <delete dir="${dist.dir}" followsymlinks="false" includeemptydirs="true"/>
  1053. </target>
  1054. <target name="-post-clean">
  1055. <!-- Empty placeholder for easier customization. -->
  1056. <!-- You can override this target in the ../build.xml file. -->
  1057. </target>
  1058. <target depends="init,deps-clean,-do-clean,-post-clean" description="Clean build products." name="clean"/>
  1059. <target name="-check-call-dep">
  1060. <property file="${call.built.properties}" prefix="already.built."/>
  1061. <condition property="should.call.dep">
  1062. <not>
  1063. <isset property="already.built.${call.subproject}"/>
  1064. </not>
  1065. </condition>
  1066. </target>
  1067. <target depends="-check-call-dep" if="should.call.dep" name="-maybe-call-dep">
  1068. <ant antfile="${call.script}" inheritall="false" target="${call.target}">
  1069. <propertyset>
  1070. <propertyref prefix="transfer."/>
  1071. <mapper from="transfer.*" to="*" type="glob"/>
  1072. </propertyset>
  1073. </ant>
  1074. </target>
  1075. </project>