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

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