Java IRC bot
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 56KB

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