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

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