a simple Java-FX Application which Simulate the Approximation of Pi https://nextn.xyz
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 96 KiB

5 年之前
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769
  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. - test compilation
  14. - test execution
  15. - test debugging
  16. - applet
  17. - cleanup
  18. -->
  19. <project xmlns:if="ant:if" 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" xmlns:unless="ant:unless" basedir=".." default="default" name="MontecarloPi-impl">
  20. <import file="jfx-impl.xml"/>
  21. <fail message="Please build using Ant 1.8.0 or higher.">
  22. <condition>
  23. <not>
  24. <antversion atleast="1.8.0"/>
  25. </not>
  26. </condition>
  27. </fail>
  28. <target depends="test,jar,javadoc" description="Build and test whole project." name="default"/>
  29. <!--
  30. ======================
  31. INITIALIZATION SECTION
  32. ======================
  33. -->
  34. <target name="-pre-init">
  35. <!-- Empty placeholder for easier customization. -->
  36. <!-- You can override this target in the ../build.xml file. -->
  37. </target>
  38. <target depends="-pre-init" name="-init-private">
  39. <property file="nbproject/private/config.properties"/>
  40. <property file="nbproject/private/configs/${config}.properties"/>
  41. <property file="nbproject/private/private.properties"/>
  42. </target>
  43. <target depends="-pre-init,-init-private" name="-init-user">
  44. <property file="${user.properties.file}"/>
  45. <!-- The two properties below are usually overridden -->
  46. <!-- by the active platform. Just a fallback. -->
  47. <property name="default.javac.source" value="1.6"/>
  48. <property name="default.javac.target" value="1.6"/>
  49. </target>
  50. <target depends="-pre-init,-init-private,-init-user" name="-init-project">
  51. <property file="nbproject/configs/${config}.properties"/>
  52. <property file="nbproject/project.properties"/>
  53. </target>
  54. <target name="-init-modules-supported">
  55. <condition property="modules.supported.internal" value="true">
  56. <not>
  57. <matches pattern="1\.[0-8](\..*)?" string="${javac.source}"/>
  58. </not>
  59. </condition>
  60. </target>
  61. <target depends="-init-modules-supported" if="modules.supported.internal" name="-init-macrodef-modulename">
  62. <macrodef name="modulename" uri="http://www.netbeans.org/ns/j2se-project/3">
  63. <attribute name="property"/>
  64. <attribute name="sourcepath"/>
  65. <sequential>
  66. <loadresource property="@{property}" quiet="true">
  67. <javaresource classpath="@{sourcepath}" name="module-info.java" parentFirst="false"/>
  68. <filterchain>
  69. <stripjavacomments/>
  70. <linecontainsregexp>
  71. <regexp pattern="module .* \{"/>
  72. </linecontainsregexp>
  73. <tokenfilter>
  74. <linetokenizer/>
  75. <replaceregex flags="s" pattern="(\s*module\s+)(\S*)(\s*\{.*)" replace="\2"/>
  76. </tokenfilter>
  77. <striplinebreaks/>
  78. </filterchain>
  79. </loadresource>
  80. </sequential>
  81. </macrodef>
  82. </target>
  83. <target depends="-init-modules-supported,-init-macrodef-modulename" if="modules.supported.internal" name="-init-source-module-properties">
  84. <fail message="Java 9 support requires Ant 1.10.0 or higher.">
  85. <condition>
  86. <not>
  87. <antversion atleast="1.10.0"/>
  88. </not>
  89. </condition>
  90. </fail>
  91. <j2seproject3:modulename property="module.name" sourcepath="${src.dir}"/>
  92. <condition property="named.module.internal">
  93. <and>
  94. <isset property="module.name"/>
  95. <length length="0" string="${module.name}" when="greater"/>
  96. </and>
  97. </condition>
  98. <condition property="unnamed.module.internal">
  99. <not>
  100. <isset property="named.module.internal"/>
  101. </not>
  102. </condition>
  103. <property name="javac.modulepath" value=""/>
  104. <property name="run.modulepath" value="${javac.modulepath}"/>
  105. <property name="module.build.classes.dir" value="${build.classes.dir}"/>
  106. <property name="debug.modulepath" value="${run.modulepath}"/>
  107. <property name="javac.upgrademodulepath" value=""/>
  108. <property name="run.upgrademodulepath" value="${javac.upgrademodulepath}"/>
  109. <condition else="" property="javac.systemmodulepath.cmd.line.arg" value="--system '${javac.systemmodulepath}'">
  110. <and>
  111. <isset property="javac.systemmodulepath"/>
  112. <length length="0" string="${javac.systemmodulepath}" when="greater"/>
  113. </and>
  114. </condition>
  115. <property name="dist.jlink.dir" value="${dist.dir}/jlink"/>
  116. <property name="dist.jlink.output" value="${dist.jlink.dir}/${application.title}"/>
  117. <property name="module.name" value=""/>
  118. </target>
  119. <target depends="-pre-init,-init-private,-init-user,-init-project,-init-macrodef-property,-init-modules-supported" name="-do-init">
  120. <property name="platform.java" value="${java.home}/bin/java"/>
  121. <available file="${manifest.file}" property="manifest.available"/>
  122. <condition property="splashscreen.available">
  123. <and>
  124. <not>
  125. <equals arg1="${application.splash}" arg2="" trim="true"/>
  126. </not>
  127. <available file="${application.splash}"/>
  128. </and>
  129. </condition>
  130. <condition property="main.class.available">
  131. <and>
  132. <isset property="main.class"/>
  133. <not>
  134. <equals arg1="${main.class}" arg2="" trim="true"/>
  135. </not>
  136. </and>
  137. </condition>
  138. <condition property="profile.available">
  139. <and>
  140. <isset property="javac.profile"/>
  141. <length length="0" string="${javac.profile}" when="greater"/>
  142. <not>
  143. <matches pattern="1\.[0-7](\..*)?" string="${javac.source}"/>
  144. </not>
  145. </and>
  146. </condition>
  147. <condition property="do.archive">
  148. <or>
  149. <not>
  150. <istrue value="${jar.archive.disabled}"/>
  151. </not>
  152. <istrue value="${not.archive.disabled}"/>
  153. </or>
  154. </condition>
  155. <condition property="do.mkdist">
  156. <and>
  157. <isset property="do.archive"/>
  158. <isset property="libs.CopyLibs.classpath"/>
  159. <not>
  160. <istrue value="${mkdist.disabled}"/>
  161. </not>
  162. <not>
  163. <istrue value="${modules.supported.internal}"/>
  164. </not>
  165. </and>
  166. </condition>
  167. <condition property="do.archive+manifest.available">
  168. <and>
  169. <isset property="manifest.available"/>
  170. <istrue value="${do.archive}"/>
  171. </and>
  172. </condition>
  173. <condition property="do.archive+main.class.available">
  174. <and>
  175. <isset property="main.class.available"/>
  176. <istrue value="${do.archive}"/>
  177. </and>
  178. </condition>
  179. <condition property="do.archive+splashscreen.available">
  180. <and>
  181. <isset property="splashscreen.available"/>
  182. <istrue value="${do.archive}"/>
  183. </and>
  184. </condition>
  185. <condition property="do.archive+profile.available">
  186. <and>
  187. <isset property="profile.available"/>
  188. <istrue value="${do.archive}"/>
  189. </and>
  190. </condition>
  191. <condition property="have.tests">
  192. <or>
  193. <available file="${test.src.dir}"/>
  194. </or>
  195. </condition>
  196. <condition property="have.sources">
  197. <or>
  198. <available file="${src.dir}"/>
  199. </or>
  200. </condition>
  201. <condition property="netbeans.home+have.tests">
  202. <and>
  203. <isset property="netbeans.home"/>
  204. <isset property="have.tests"/>
  205. </and>
  206. </condition>
  207. <condition property="no.javadoc.preview">
  208. <and>
  209. <isset property="javadoc.preview"/>
  210. <isfalse value="${javadoc.preview}"/>
  211. </and>
  212. </condition>
  213. <property name="run.jvmargs" value=""/>
  214. <property name="run.jvmargs.ide" value=""/>
  215. <property name="javac.compilerargs" value=""/>
  216. <property name="work.dir" value="${basedir}"/>
  217. <condition property="no.deps">
  218. <and>
  219. <istrue value="${no.dependencies}"/>
  220. </and>
  221. </condition>
  222. <property name="javac.debug" value="true"/>
  223. <property name="javadoc.preview" value="true"/>
  224. <property name="application.args" value=""/>
  225. <property name="source.encoding" value="${file.encoding}"/>
  226. <property name="runtime.encoding" value="${source.encoding}"/>
  227. <property name="manifest.encoding" value="${source.encoding}"/>
  228. <condition property="javadoc.encoding.used" value="${javadoc.encoding}">
  229. <and>
  230. <isset property="javadoc.encoding"/>
  231. <not>
  232. <equals arg1="${javadoc.encoding}" arg2=""/>
  233. </not>
  234. </and>
  235. </condition>
  236. <property name="javadoc.encoding.used" value="${source.encoding}"/>
  237. <property name="includes" value="**"/>
  238. <property name="excludes" value=""/>
  239. <property name="do.depend" value="false"/>
  240. <condition property="do.depend.true">
  241. <istrue value="${do.depend}"/>
  242. </condition>
  243. <path id="endorsed.classpath.path" path="${endorsed.classpath}"/>
  244. <condition else="" property="endorsed.classpath.cmd.line.arg" value="-Xbootclasspath/p:'${toString:endorsed.classpath.path}'">
  245. <and>
  246. <isset property="endorsed.classpath"/>
  247. <not>
  248. <equals arg1="${endorsed.classpath}" arg2="" trim="true"/>
  249. </not>
  250. </and>
  251. </condition>
  252. <condition else="" property="javac.profile.cmd.line.arg" value="-profile ${javac.profile}">
  253. <isset property="profile.available"/>
  254. </condition>
  255. <condition else="false" property="jdkBug6558476">
  256. <and>
  257. <matches pattern="1\.[56]" string="${java.specification.version}"/>
  258. <not>
  259. <os family="unix"/>
  260. </not>
  261. </and>
  262. </condition>
  263. <condition else="false" property="javac.fork">
  264. <or>
  265. <istrue value="${jdkBug6558476}"/>
  266. <istrue value="${javac.external.vm}"/>
  267. </or>
  268. </condition>
  269. <property name="jar.index" value="false"/>
  270. <property name="jar.index.metainf" value="${jar.index}"/>
  271. <property name="copylibs.rebase" value="true"/>
  272. <available file="${meta.inf.dir}/persistence.xml" property="has.persistence.xml"/>
  273. <condition property="junit.available">
  274. <or>
  275. <available classname="org.junit.Test" classpath="${run.test.classpath}"/>
  276. <available classname="junit.framework.Test" classpath="${run.test.classpath}"/>
  277. </or>
  278. </condition>
  279. <condition property="testng.available">
  280. <available classname="org.testng.annotations.Test" classpath="${run.test.classpath}"/>
  281. </condition>
  282. <condition property="junit+testng.available">
  283. <and>
  284. <istrue value="${junit.available}"/>
  285. <istrue value="${testng.available}"/>
  286. </and>
  287. </condition>
  288. <condition else="testng" property="testng.mode" value="mixed">
  289. <istrue value="${junit+testng.available}"/>
  290. </condition>
  291. <condition else="" property="testng.debug.mode" value="-mixed">
  292. <istrue value="${junit+testng.available}"/>
  293. </condition>
  294. <property name="java.failonerror" value="true"/>
  295. </target>
  296. <target name="-post-init">
  297. <!-- Empty placeholder for easier customization. -->
  298. <!-- You can override this target in the ../build.xml file. -->
  299. </target>
  300. <target depends="-pre-init,-init-private,-init-user,-init-project,-do-init" name="-init-check">
  301. <fail unless="src.dir">Must set src.dir</fail>
  302. <fail unless="test.src.dir">Must set test.src.dir</fail>
  303. <fail unless="build.dir">Must set build.dir</fail>
  304. <fail unless="dist.dir">Must set dist.dir</fail>
  305. <fail unless="build.classes.dir">Must set build.classes.dir</fail>
  306. <fail unless="dist.javadoc.dir">Must set dist.javadoc.dir</fail>
  307. <fail unless="build.test.classes.dir">Must set build.test.classes.dir</fail>
  308. <fail unless="build.test.results.dir">Must set build.test.results.dir</fail>
  309. <fail unless="build.classes.excludes">Must set build.classes.excludes</fail>
  310. <fail unless="dist.jar">Must set dist.jar</fail>
  311. </target>
  312. <target name="-init-macrodef-property">
  313. <macrodef name="property" uri="http://www.netbeans.org/ns/j2se-project/1">
  314. <attribute name="name"/>
  315. <attribute name="value"/>
  316. <sequential>
  317. <property name="@{name}" value="${@{value}}"/>
  318. </sequential>
  319. </macrodef>
  320. </target>
  321. <target depends="-init-ap-cmdline-properties,-init-source-module-properties" if="modules.supported.internal" name="-init-macrodef-javac-with-module">
  322. <macrodef name="javac" uri="http://www.netbeans.org/ns/j2se-project/3">
  323. <attribute default="${src.dir}" name="srcdir"/>
  324. <attribute default="${build.classes.dir}" name="destdir"/>
  325. <attribute default="${javac.classpath}" name="classpath"/>
  326. <attribute default="${javac.modulepath}" name="modulepath"/>
  327. <attribute default="${javac.upgrademodulepath}" name="upgrademodulepath"/>
  328. <attribute default="${javac.processorpath}" name="processorpath"/>
  329. <attribute default="${javac.processormodulepath}" name="processormodulepath"/>
  330. <attribute default="${build.generated.sources.dir}/ap-source-output" name="apgeneratedsrcdir"/>
  331. <attribute default="${includes}" name="includes"/>
  332. <attribute default="${excludes}" name="excludes"/>
  333. <attribute default="${javac.debug}" name="debug"/>
  334. <attribute default="${empty.dir}" name="sourcepath" unless:set="named.module.internal"/>
  335. <attribute default="${src.dir}" if:set="named.module.internal" name="sourcepath"/>
  336. <attribute default="${empty.dir}" name="gensrcdir"/>
  337. <element name="customize" optional="true"/>
  338. <sequential>
  339. <condition property="warn.excludes.internal">
  340. <and>
  341. <isset property="named.module.internal"/>
  342. <length length="0" string="@{excludes}" trim="true" when="greater"/>
  343. </and>
  344. </condition>
  345. <echo if:set="warn.excludes.internal" level="warning" message="The javac excludes are not supported in the JDK 9 Named Module."/>
  346. <property location="${build.dir}/empty" name="empty.dir"/>
  347. <mkdir dir="${empty.dir}"/>
  348. <mkdir dir="@{apgeneratedsrcdir}"/>
  349. <condition property="processormodulepath.set">
  350. <resourcecount count="0" when="greater">
  351. <path>
  352. <pathelement path="@{processormodulepath}"/>
  353. </path>
  354. </resourcecount>
  355. </condition>
  356. <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}">
  357. <src>
  358. <dirset dir="@{gensrcdir}" erroronmissingdir="false">
  359. <include name="*"/>
  360. </dirset>
  361. </src>
  362. <classpath>
  363. <path path="@{classpath}"/>
  364. </classpath>
  365. <modulepath>
  366. <path path="@{modulepath}"/>
  367. </modulepath>
  368. <upgrademodulepath>
  369. <path path="@{upgrademodulepath}"/>
  370. </upgrademodulepath>
  371. <compilerarg line="${javac.systemmodulepath.cmd.line.arg}"/>
  372. <compilerarg line="${javac.profile.cmd.line.arg}"/>
  373. <compilerarg line="${javac.compilerargs}"/>
  374. <compilerarg if:set="processormodulepath.set" value="--processor-module-path"/>
  375. <compilerarg if:set="processormodulepath.set" path="@{processormodulepath}"/>
  376. <compilerarg unless:set="processormodulepath.set" value="-processorpath"/>
  377. <compilerarg path="@{processorpath}:${empty.dir}" unless:set="processormodulepath.set"/>
  378. <compilerarg line="${ap.processors.internal}"/>
  379. <compilerarg line="${annotation.processing.processor.options}"/>
  380. <compilerarg value="-s"/>
  381. <compilerarg path="@{apgeneratedsrcdir}"/>
  382. <compilerarg line="${ap.proc.none.internal}"/>
  383. <customize/>
  384. </javac>
  385. </sequential>
  386. </macrodef>
  387. </target>
  388. <target depends="-init-ap-cmdline-properties,-init-source-module-properties" if="ap.supported.internal" name="-init-macrodef-javac-with-processors" unless="modules.supported.internal">
  389. <macrodef name="javac" uri="http://www.netbeans.org/ns/j2se-project/3">
  390. <attribute default="${src.dir}" name="srcdir"/>
  391. <attribute default="${build.classes.dir}" name="destdir"/>
  392. <attribute default="${javac.classpath}" name="classpath"/>
  393. <attribute default="${javac.modulepath}" name="modulepath"/>
  394. <attribute default="${javac.upgrademodulepath}" name="upgrademodulepath"/>
  395. <attribute default="${javac.processorpath}" name="processorpath"/>
  396. <attribute default="${build.generated.sources.dir}/ap-source-output" name="apgeneratedsrcdir"/>
  397. <attribute default="${includes}" name="includes"/>
  398. <attribute default="${excludes}" name="excludes"/>
  399. <attribute default="${javac.debug}" name="debug"/>
  400. <attribute default="${empty.dir}" name="sourcepath"/>
  401. <attribute default="${empty.dir}" name="gensrcdir"/>
  402. <element name="customize" optional="true"/>
  403. <sequential>
  404. <property location="${build.dir}/empty" name="empty.dir"/>
  405. <mkdir dir="${empty.dir}"/>
  406. <mkdir dir="@{apgeneratedsrcdir}"/>
  407. <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}">
  408. <src>
  409. <dirset dir="@{gensrcdir}" erroronmissingdir="false">
  410. <include name="*"/>
  411. </dirset>
  412. </src>
  413. <classpath>
  414. <path path="@{classpath}"/>
  415. </classpath>
  416. <compilerarg line="${endorsed.classpath.cmd.line.arg}"/>
  417. <compilerarg line="${javac.profile.cmd.line.arg}"/>
  418. <compilerarg line="${javac.compilerargs}"/>
  419. <compilerarg value="-processorpath"/>
  420. <compilerarg path="@{processorpath}:${empty.dir}"/>
  421. <compilerarg line="${ap.processors.internal}"/>
  422. <compilerarg line="${annotation.processing.processor.options}"/>
  423. <compilerarg value="-s"/>
  424. <compilerarg path="@{apgeneratedsrcdir}"/>
  425. <compilerarg line="${ap.proc.none.internal}"/>
  426. <customize/>
  427. </javac>
  428. </sequential>
  429. </macrodef>
  430. </target>
  431. <target depends="-init-ap-cmdline-properties,-init-source-module-properties" name="-init-macrodef-javac-without-processors" unless="ap.supported.internal">
  432. <macrodef name="javac" uri="http://www.netbeans.org/ns/j2se-project/3">
  433. <attribute default="${src.dir}" name="srcdir"/>
  434. <attribute default="${build.classes.dir}" name="destdir"/>
  435. <attribute default="${javac.classpath}" name="classpath"/>
  436. <attribute default="${javac.modulepath}" name="modulepath"/>
  437. <attribute default="${javac.upgrademodulepath}" name="upgrademodulepath"/>
  438. <attribute default="${javac.processorpath}" name="processorpath"/>
  439. <attribute default="${build.generated.sources.dir}/ap-source-output" name="apgeneratedsrcdir"/>
  440. <attribute default="${includes}" name="includes"/>
  441. <attribute default="${excludes}" name="excludes"/>
  442. <attribute default="${javac.debug}" name="debug"/>
  443. <attribute default="${empty.dir}" name="sourcepath"/>
  444. <attribute default="${empty.dir}" name="gensrcdir"/>
  445. <element name="customize" optional="true"/>
  446. <sequential>
  447. <property location="${build.dir}/empty" name="empty.dir"/>
  448. <mkdir dir="${empty.dir}"/>
  449. <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}">
  450. <src>
  451. <dirset dir="@{gensrcdir}" erroronmissingdir="false">
  452. <include name="*"/>
  453. </dirset>
  454. </src>
  455. <classpath>
  456. <path path="@{classpath}"/>
  457. </classpath>
  458. <compilerarg line="${endorsed.classpath.cmd.line.arg}"/>
  459. <compilerarg line="${javac.profile.cmd.line.arg}"/>
  460. <compilerarg line="${javac.compilerargs}"/>
  461. <customize/>
  462. </javac>
  463. </sequential>
  464. </macrodef>
  465. </target>
  466. <target depends="-init-macrodef-javac-with-module,-init-macrodef-javac-with-processors,-init-macrodef-javac-without-processors" name="-init-macrodef-javac">
  467. <macrodef name="depend" uri="http://www.netbeans.org/ns/j2se-project/3">
  468. <attribute default="${src.dir}" name="srcdir"/>
  469. <attribute default="${build.classes.dir}" name="destdir"/>
  470. <attribute default="${javac.classpath}" name="classpath"/>
  471. <sequential>
  472. <depend cache="${build.dir}/depcache" destdir="@{destdir}" excludes="${excludes}" includes="${includes}" srcdir="@{srcdir}">
  473. <classpath>
  474. <path path="@{classpath}"/>
  475. </classpath>
  476. </depend>
  477. </sequential>
  478. </macrodef>
  479. <macrodef name="force-recompile" uri="http://www.netbeans.org/ns/j2se-project/3">
  480. <attribute default="${build.classes.dir}" name="destdir"/>
  481. <sequential>
  482. <fail unless="javac.includes">Must set javac.includes</fail>
  483. <pathconvert pathsep="${line.separator}" property="javac.includes.binary">
  484. <path>
  485. <filelist dir="@{destdir}" files="${javac.includes}"/>
  486. </path>
  487. <globmapper from="*.java" to="*.class"/>
  488. </pathconvert>
  489. <tempfile deleteonexit="true" property="javac.includesfile.binary"/>
  490. <echo file="${javac.includesfile.binary}" message="${javac.includes.binary}"/>
  491. <delete>
  492. <files includesfile="${javac.includesfile.binary}"/>
  493. </delete>
  494. <delete>
  495. <fileset file="${javac.includesfile.binary}"/>
  496. </delete>
  497. </sequential>
  498. </macrodef>
  499. </target>
  500. <target if="${junit.available}" name="-init-macrodef-junit-init">
  501. <condition else="false" property="nb.junit.batch" value="true">
  502. <and>
  503. <istrue value="${junit.available}"/>
  504. <not>
  505. <isset property="test.method"/>
  506. </not>
  507. </and>
  508. </condition>
  509. <condition else="false" property="nb.junit.single" value="true">
  510. <and>
  511. <istrue value="${junit.available}"/>
  512. <isset property="test.method"/>
  513. </and>
  514. </condition>
  515. </target>
  516. <target name="-init-test-properties">
  517. <property name="test.binaryincludes" value="&lt;nothing&gt;"/>
  518. <property name="test.binarytestincludes" value=""/>
  519. <property name="test.binaryexcludes" value=""/>
  520. </target>
  521. <target depends="-init-modules-supported" if="modules.supported.internal" name="-init-macrodef-junit-prototype-with-module">
  522. <macrodef name="junit-prototype" uri="http://www.netbeans.org/ns/j2se-project/3">
  523. <attribute default="${includes}" name="includes"/>
  524. <attribute default="${excludes}" name="excludes"/>
  525. <element name="customizePrototype" optional="true"/>
  526. <sequential>
  527. <property name="junit.forkmode" value="perTest"/>
  528. <junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" forkmode="${junit.forkmode}" showoutput="true" tempdir="${build.dir}">
  529. <syspropertyset>
  530. <propertyref prefix="test-sys-prop."/>
  531. <mapper from="test-sys-prop.*" to="*" type="glob"/>
  532. </syspropertyset>
  533. <classpath>
  534. <path path="${run.test.classpath}"/>
  535. </classpath>
  536. <modulepath>
  537. <path path="${run.test.modulepath}"/>
  538. </modulepath>
  539. <formatter type="brief" usefile="false"/>
  540. <formatter type="xml"/>
  541. <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
  542. <jvmarg value="-ea"/>
  543. <jvmarg line="${run.test.jvmargs}"/>
  544. <customizePrototype/>
  545. </junit>
  546. </sequential>
  547. </macrodef>
  548. </target>
  549. <target depends="-init-modules-supported" name="-init-macrodef-junit-prototype-without-module" unless="modules.supported.internal">
  550. <macrodef name="junit-prototype" uri="http://www.netbeans.org/ns/j2se-project/3">
  551. <attribute default="${includes}" name="includes"/>
  552. <attribute default="${excludes}" name="excludes"/>
  553. <element name="customizePrototype" optional="true"/>
  554. <sequential>
  555. <property name="junit.forkmode" value="perTest"/>
  556. <junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" forkmode="${junit.forkmode}" showoutput="true" tempdir="${build.dir}">
  557. <syspropertyset>
  558. <propertyref prefix="test-sys-prop."/>
  559. <mapper from="test-sys-prop.*" to="*" type="glob"/>
  560. </syspropertyset>
  561. <classpath>
  562. <path path="${run.test.classpath}"/>
  563. </classpath>
  564. <formatter type="brief" usefile="false"/>
  565. <formatter type="xml"/>
  566. <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
  567. <jvmarg value="-ea"/>
  568. <customizePrototype/>
  569. </junit>
  570. </sequential>
  571. </macrodef>
  572. </target>
  573. <target depends="-init-test-properties,-init-macrodef-junit-prototype-with-module,-init-macrodef-junit-prototype-without-module" if="${nb.junit.single}" name="-init-macrodef-junit-single" unless="${nb.junit.batch}">
  574. <macrodef name="junit" uri="http://www.netbeans.org/ns/j2se-project/3">
  575. <attribute default="${includes}" name="includes"/>
  576. <attribute default="${excludes}" name="excludes"/>
  577. <attribute default="**" name="testincludes"/>
  578. <attribute default="" name="testmethods"/>
  579. <element name="customize" optional="true"/>
  580. <sequential>
  581. <j2seproject3:junit-prototype>
  582. <customizePrototype>
  583. <test methods="@{testmethods}" name="@{testincludes}" todir="${build.test.results.dir}"/>
  584. <customize/>
  585. </customizePrototype>
  586. </j2seproject3:junit-prototype>
  587. </sequential>
  588. </macrodef>
  589. </target>
  590. <target depends="-init-test-properties,-init-macrodef-junit-prototype-with-module,-init-macrodef-junit-prototype-without-module" if="${nb.junit.batch}" name="-init-macrodef-junit-batch" unless="${nb.junit.single}">
  591. <macrodef name="junit" uri="http://www.netbeans.org/ns/j2se-project/3">
  592. <attribute default="${includes}" name="includes"/>
  593. <attribute default="${excludes}" name="excludes"/>
  594. <attribute default="**" name="testincludes"/>
  595. <attribute default="" name="testmethods"/>
  596. <element name="customize" optional="true"/>
  597. <sequential>
  598. <j2seproject3:junit-prototype>
  599. <customizePrototype>
  600. <batchtest todir="${build.test.results.dir}">
  601. <fileset dir="${test.src.dir}" excludes="@{excludes},${excludes}" includes="@{includes}">
  602. <filename name="@{testincludes}"/>
  603. </fileset>
  604. <fileset dir="${build.test.classes.dir}" excludes="@{excludes},${excludes},${test.binaryexcludes}" includes="${test.binaryincludes}">
  605. <filename name="${test.binarytestincludes}"/>
  606. </fileset>
  607. </batchtest>
  608. <customize/>
  609. </customizePrototype>
  610. </j2seproject3:junit-prototype>
  611. </sequential>
  612. </macrodef>
  613. </target>
  614. <target depends="-init-macrodef-junit-init,-init-macrodef-junit-single, -init-macrodef-junit-batch" if="${junit.available}" name="-init-macrodef-junit"/>
  615. <target if="${testng.available}" name="-init-macrodef-testng">
  616. <macrodef name="testng" uri="http://www.netbeans.org/ns/j2se-project/3">
  617. <attribute default="${includes}" name="includes"/>
  618. <attribute default="${excludes}" name="excludes"/>
  619. <attribute default="**" name="testincludes"/>
  620. <attribute default="" name="testmethods"/>
  621. <element name="customize" optional="true"/>
  622. <sequential>
  623. <condition else="" property="testng.methods.arg" value="@{testincludes}.@{testmethods}">
  624. <isset property="test.method"/>
  625. </condition>
  626. <union id="test.set">
  627. <fileset dir="${test.src.dir}" excludes="@{excludes},**/*.xml,${excludes}" includes="@{includes}">
  628. <filename name="@{testincludes}"/>
  629. </fileset>
  630. </union>
  631. <taskdef classname="org.testng.TestNGAntTask" classpath="${run.test.classpath}" name="testng"/>
  632. <testng classfilesetref="test.set" failureProperty="tests.failed" listeners="org.testng.reporters.VerboseReporter" methods="${testng.methods.arg}" mode="${testng.mode}" outputdir="${build.test.results.dir}" suitename="MontecarloPi" testname="TestNG tests" workingDir="${work.dir}">
  633. <xmlfileset dir="${build.test.classes.dir}" includes="@{testincludes}"/>
  634. <propertyset>
  635. <propertyref prefix="test-sys-prop."/>
  636. <mapper from="test-sys-prop.*" to="*" type="glob"/>
  637. </propertyset>
  638. <classpath>
  639. <path path="${run.test.classpath}"/>
  640. </classpath>
  641. <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
  642. <customize/>
  643. </testng>
  644. </sequential>
  645. </macrodef>
  646. </target>
  647. <target name="-init-macrodef-test-impl">
  648. <macrodef name="test-impl" uri="http://www.netbeans.org/ns/j2se-project/3">
  649. <attribute default="${includes}" name="includes"/>
  650. <attribute default="${excludes}" name="excludes"/>
  651. <attribute default="**" name="testincludes"/>
  652. <attribute default="" name="testmethods"/>
  653. <element implicit="true" name="customize" optional="true"/>
  654. <sequential>
  655. <echo>No tests executed.</echo>
  656. </sequential>
  657. </macrodef>
  658. </target>
  659. <target depends="-init-macrodef-junit" if="${junit.available}" name="-init-macrodef-junit-impl">
  660. <macrodef name="test-impl" uri="http://www.netbeans.org/ns/j2se-project/3">
  661. <attribute default="${includes}" name="includes"/>
  662. <attribute default="${excludes}" name="excludes"/>
  663. <attribute default="**" name="testincludes"/>
  664. <attribute default="" name="testmethods"/>
  665. <element implicit="true" name="customize" optional="true"/>
  666. <sequential>
  667. <j2seproject3:junit excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}">
  668. <customize/>
  669. </j2seproject3:junit>
  670. </sequential>
  671. </macrodef>
  672. </target>
  673. <target depends="-init-macrodef-testng" if="${testng.available}" name="-init-macrodef-testng-impl">
  674. <macrodef name="test-impl" uri="http://www.netbeans.org/ns/j2se-project/3">
  675. <attribute default="${includes}" name="includes"/>
  676. <attribute default="${excludes}" name="excludes"/>
  677. <attribute default="**" name="testincludes"/>
  678. <attribute default="" name="testmethods"/>
  679. <element implicit="true" name="customize" optional="true"/>
  680. <sequential>
  681. <j2seproject3:testng excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}">
  682. <customize/>
  683. </j2seproject3:testng>
  684. </sequential>
  685. </macrodef>
  686. </target>
  687. <target depends="-init-macrodef-test-impl,-init-macrodef-junit-impl,-init-macrodef-testng-impl" name="-init-macrodef-test">
  688. <macrodef name="test" uri="http://www.netbeans.org/ns/j2se-project/3">
  689. <attribute default="${includes}" name="includes"/>
  690. <attribute default="${excludes}" name="excludes"/>
  691. <attribute default="**" name="testincludes"/>
  692. <attribute default="" name="testmethods"/>
  693. <sequential>
  694. <j2seproject3:test-impl excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}">
  695. <customize>
  696. <jvmarg line="${run.jvmargs}"/>
  697. <jvmarg line="${run.jvmargs.ide}"/>
  698. </customize>
  699. </j2seproject3:test-impl>
  700. </sequential>
  701. </macrodef>
  702. </target>
  703. <target depends="-init-macrodef-junit" if="${junit.available}" name="-init-macrodef-junit-debug-impl">
  704. <macrodef name="test-debug-impl" uri="http://www.netbeans.org/ns/j2se-project/3">
  705. <attribute default="${includes}" name="includes"/>
  706. <attribute default="${excludes}" name="excludes"/>
  707. <attribute default="**" name="testincludes"/>
  708. <attribute default="" name="testmethods"/>
  709. <element name="customizeDebuggee" optional="true"/>
  710. <sequential>
  711. <j2seproject3:junit excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}">
  712. <customize>
  713. <jvmarg value="-agentlib:jdwp=transport=${debug-transport},address=${jpda.address}"/>
  714. <customizeDebuggee/>
  715. </customize>
  716. </j2seproject3:junit>
  717. </sequential>
  718. </macrodef>
  719. </target>
  720. <target if="${testng.available}" name="-init-macrodef-testng-debug">
  721. <macrodef name="testng-debug" uri="http://www.netbeans.org/ns/j2se-project/3">
  722. <attribute default="${main.class}" name="testClass"/>
  723. <attribute default="" name="testMethod"/>
  724. <element name="customize2" optional="true"/>
  725. <sequential>
  726. <condition else="-testclass @{testClass}" property="test.class.or.method" value="-methods @{testClass}.@{testMethod}">
  727. <isset property="test.method"/>
  728. </condition>
  729. <condition else="-suitename MontecarloPi -testname @{testClass} ${test.class.or.method}" property="testng.cmd.args" value="@{testClass}">
  730. <matches pattern=".*\.xml" string="@{testClass}"/>
  731. </condition>
  732. <delete dir="${build.test.results.dir}" quiet="true"/>
  733. <mkdir dir="${build.test.results.dir}"/>
  734. <j2seproject3:debug classname="org.testng.TestNG" classpath="${debug.test.classpath}">
  735. <customizeDebuggee>
  736. <customize2/>
  737. <jvmarg value="-ea"/>
  738. <arg line="${testng.debug.mode}"/>
  739. <arg line="-d ${build.test.results.dir}"/>
  740. <arg line="-listener org.testng.reporters.VerboseReporter"/>
  741. <arg line="${testng.cmd.args}"/>
  742. </customizeDebuggee>
  743. </j2seproject3:debug>
  744. </sequential>
  745. </macrodef>
  746. </target>
  747. <target depends="-init-macrodef-testng-debug" if="${testng.available}" name="-init-macrodef-testng-debug-impl">
  748. <macrodef name="testng-debug-impl" uri="http://www.netbeans.org/ns/j2se-project/3">
  749. <attribute default="${main.class}" name="testClass"/>
  750. <attribute default="" name="testMethod"/>
  751. <element implicit="true" name="customize2" optional="true"/>
  752. <sequential>
  753. <j2seproject3:testng-debug testClass="@{testClass}" testMethod="@{testMethod}">
  754. <customize2/>
  755. </j2seproject3:testng-debug>
  756. </sequential>
  757. </macrodef>
  758. </target>
  759. <target depends="-init-macrodef-junit-debug-impl" if="${junit.available}" name="-init-macrodef-test-debug-junit">
  760. <macrodef name="test-debug" uri="http://www.netbeans.org/ns/j2se-project/3">
  761. <attribute default="${includes}" name="includes"/>
  762. <attribute default="${excludes}" name="excludes"/>
  763. <attribute default="**" name="testincludes"/>
  764. <attribute default="" name="testmethods"/>
  765. <attribute default="${main.class}" name="testClass"/>
  766. <attribute default="" name="testMethod"/>
  767. <sequential>
  768. <j2seproject3:test-debug-impl excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}">
  769. <customizeDebuggee>
  770. <jvmarg line="${run.jvmargs}"/>
  771. <jvmarg line="${run.jvmargs.ide}"/>
  772. </customizeDebuggee>
  773. </j2seproject3:test-debug-impl>
  774. </sequential>
  775. </macrodef>
  776. </target>
  777. <target depends="-init-macrodef-testng-debug-impl" if="${testng.available}" name="-init-macrodef-test-debug-testng">
  778. <macrodef name="test-debug" uri="http://www.netbeans.org/ns/j2se-project/3">
  779. <attribute default="${includes}" name="includes"/>
  780. <attribute default="${excludes}" name="excludes"/>
  781. <attribute default="**" name="testincludes"/>
  782. <attribute default="" name="testmethods"/>
  783. <attribute default="${main.class}" name="testClass"/>
  784. <attribute default="" name="testMethod"/>
  785. <sequential>
  786. <j2seproject3:testng-debug-impl testClass="@{testClass}" testMethod="@{testMethod}">
  787. <customize2>
  788. <syspropertyset>
  789. <propertyref prefix="test-sys-prop."/>
  790. <mapper from="test-sys-prop.*" to="*" type="glob"/>
  791. </syspropertyset>
  792. </customize2>
  793. </j2seproject3:testng-debug-impl>
  794. </sequential>
  795. </macrodef>
  796. </target>
  797. <target depends="-init-macrodef-test-debug-junit,-init-macrodef-test-debug-testng" name="-init-macrodef-test-debug"/>
  798. <!--
  799. pre NB7.2 profiling section; consider it deprecated
  800. -->
  801. <target depends="-profile-pre-init, init, -profile-post-init, -profile-init-macrodef-profile, -profile-init-check" if="profiler.info.jvmargs.agent" name="profile-init"/>
  802. <target if="profiler.info.jvmargs.agent" name="-profile-pre-init">
  803. <!-- Empty placeholder for easier customization. -->
  804. <!-- You can override this target in the ../build.xml file. -->
  805. </target>
  806. <target if="profiler.info.jvmargs.agent" name="-profile-post-init">
  807. <!-- Empty placeholder for easier customization. -->
  808. <!-- You can override this target in the ../build.xml file. -->
  809. </target>
  810. <target if="profiler.info.jvmargs.agent" name="-profile-init-macrodef-profile">
  811. <macrodef name="resolve">
  812. <attribute name="name"/>
  813. <attribute name="value"/>
  814. <sequential>
  815. <property name="@{name}" value="${env.@{value}}"/>
  816. </sequential>
  817. </macrodef>
  818. <macrodef name="profile">
  819. <attribute default="${main.class}" name="classname"/>
  820. <element name="customize" optional="true"/>
  821. <sequential>
  822. <property environment="env"/>
  823. <resolve name="profiler.current.path" value="${profiler.info.pathvar}"/>
  824. <java classname="@{classname}" dir="${profiler.info.dir}" failonerror="${java.failonerror}" fork="true" jvm="${profiler.info.jvm}">
  825. <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
  826. <jvmarg value="${profiler.info.jvmargs.agent}"/>
  827. <jvmarg line="${profiler.info.jvmargs}"/>
  828. <env key="${profiler.info.pathvar}" path="${profiler.info.agentpath}:${profiler.current.path}"/>
  829. <arg line="${application.args}"/>
  830. <classpath>
  831. <path path="${run.classpath}"/>
  832. </classpath>
  833. <syspropertyset>
  834. <propertyref prefix="run-sys-prop."/>
  835. <mapper from="run-sys-prop.*" to="*" type="glob"/>
  836. </syspropertyset>
  837. <customize/>
  838. </java>
  839. </sequential>
  840. </macrodef>
  841. </target>
  842. <target depends="-profile-pre-init, init, -profile-post-init, -profile-init-macrodef-profile" if="profiler.info.jvmargs.agent" name="-profile-init-check">
  843. <fail unless="profiler.info.jvm">Must set JVM to use for profiling in profiler.info.jvm</fail>
  844. <fail unless="profiler.info.jvmargs.agent">Must set profiler agent JVM arguments in profiler.info.jvmargs.agent</fail>
  845. </target>
  846. <!--
  847. end of pre NB7.2 profiling section
  848. -->
  849. <target depends="-init-debug-args" name="-init-macrodef-nbjpda">
  850. <macrodef name="nbjpdastart" uri="http://www.netbeans.org/ns/j2se-project/1">
  851. <attribute default="${main.class}" name="name"/>
  852. <attribute default="${debug.modulepath}" name="modulepath"/>
  853. <attribute default="${debug.classpath}" name="classpath"/>
  854. <attribute default="" name="stopclassname"/>
  855. <sequential>
  856. <nbjpdastart addressproperty="jpda.address" name="@{name}" stopclassname="@{stopclassname}" transport="${debug-transport}">
  857. <modulepath>
  858. <path path="@{modulepath}"/>
  859. </modulepath>
  860. <classpath>
  861. <path path="@{classpath}"/>
  862. </classpath>
  863. </nbjpdastart>
  864. </sequential>
  865. </macrodef>
  866. <macrodef name="nbjpdareload" uri="http://www.netbeans.org/ns/j2se-project/1">
  867. <attribute default="${build.classes.dir}" name="dir"/>
  868. <sequential>
  869. <nbjpdareload>
  870. <fileset dir="@{dir}" includes="${fix.classes}">
  871. <include name="${fix.includes}*.class"/>
  872. </fileset>
  873. </nbjpdareload>
  874. </sequential>
  875. </macrodef>
  876. </target>
  877. <target name="-init-debug-args">
  878. <condition else="dt_socket" property="debug-transport-by-os" value="dt_shmem">
  879. <os family="windows"/>
  880. </condition>
  881. <condition else="${debug-transport-by-os}" property="debug-transport" value="${debug.transport}">
  882. <isset property="debug.transport"/>
  883. </condition>
  884. </target>
  885. <target depends="-init-debug-args" name="-init-macrodef-debug">
  886. <macrodef name="debug" uri="http://www.netbeans.org/ns/j2se-project/3">
  887. <attribute default="${module.name}" name="modulename"/>
  888. <attribute default="${main.class}" name="classname"/>
  889. <attribute default="${debug.modulepath}" name="modulepath"/>
  890. <attribute default="${debug.classpath}" name="classpath"/>
  891. <element name="customizeDebuggee" optional="true"/>
  892. <sequential>
  893. <j2seproject1:java classname="@{classname}" classpath="@{classpath}" modulename="@{modulename}" modulepath="@{modulepath}">
  894. <customize>
  895. <jvmarg value="-agentlib:jdwp=transport=${debug-transport},address=${jpda.address}"/>
  896. <customizeDebuggee/>
  897. </customize>
  898. </j2seproject1:java>
  899. </sequential>
  900. </macrodef>
  901. </target>
  902. <target depends="-init-source-module-properties" if="named.module.internal" name="-init-macrodef-java-with-module">
  903. <macrodef name="java" uri="http://www.netbeans.org/ns/j2se-project/1">
  904. <attribute default="${module.name}" name="modulename"/>
  905. <attribute default="${main.class}" name="classname"/>
  906. <attribute default="${run.modulepath}" name="modulepath"/>
  907. <attribute default="${run.upgrademodulepath}" name="upgrademodulepath"/>
  908. <attribute default="${run.classpath}" name="classpath"/>
  909. <attribute default="jvm" name="jvm"/>
  910. <element name="customize" optional="true"/>
  911. <sequential>
  912. <java classname="@{classname}" dir="${work.dir}" failonerror="${java.failonerror}" fork="true" module="@{modulename}">
  913. <classpath>
  914. <path path="@{classpath}"/>
  915. </classpath>
  916. <modulepath>
  917. <pathelement path="@{modulepath}"/>
  918. <pathelement location="${module.build.classes.dir}"/>
  919. </modulepath>
  920. <upgrademodulepath>
  921. <path path="@{upgrademodulepath}"/>
  922. </upgrademodulepath>
  923. <jvmarg value="-Dfile.encoding=${runtime.encoding}"/>
  924. <redirector errorencoding="${runtime.encoding}" inputencoding="${runtime.encoding}" outputencoding="${runtime.encoding}"/>
  925. <jvmarg line="${run.jvmargs}"/>
  926. <jvmarg line="${run.jvmargs.ide}"/>
  927. <syspropertyset>
  928. <propertyref prefix="run-sys-prop."/>
  929. <mapper from="run-sys-prop.*" to="*" type="glob"/>
  930. </syspropertyset>
  931. <customize/>
  932. </java>
  933. </sequential>
  934. </macrodef>
  935. </target>
  936. <target depends="-init-source-module-properties" if="unnamed.module.internal" name="-init-macrodef-java-with-unnamed-module">
  937. <macrodef name="java" uri="http://www.netbeans.org/ns/j2se-project/1">
  938. <attribute default="" name="modulename"/>
  939. <attribute default="${main.class}" name="classname"/>
  940. <attribute default="${run.modulepath}" name="modulepath"/>
  941. <attribute default="${run.upgrademodulepath}" name="upgrademodulepath"/>
  942. <attribute default="${run.classpath}" name="classpath"/>
  943. <attribute default="jvm" name="jvm"/>
  944. <element name="customize" optional="true"/>
  945. <sequential>
  946. <java classname="@{classname}" dir="${work.dir}" failonerror="${java.failonerror}" fork="true">
  947. <classpath>
  948. <path path="@{classpath}"/>
  949. </classpath>
  950. <modulepath>
  951. <path path="@{modulepath}"/>
  952. </modulepath>
  953. <upgrademodulepath>
  954. <path path="@{upgrademodulepath}"/>
  955. </upgrademodulepath>
  956. <jvmarg value="-Dfile.encoding=${runtime.encoding}"/>
  957. <redirector errorencoding="${runtime.encoding}" inputencoding="${runtime.encoding}" outputencoding="${runtime.encoding}"/>
  958. <jvmarg line="${run.jvmargs}"/>
  959. <jvmarg line="${run.jvmargs.ide}"/>
  960. <syspropertyset>
  961. <propertyref prefix="run-sys-prop."/>
  962. <mapper from="run-sys-prop.*" to="*" type="glob"/>
  963. </syspropertyset>
  964. <customize/>
  965. </java>
  966. </sequential>
  967. </macrodef>
  968. </target>
  969. <target depends="-init-source-module-properties" name="-init-macrodef-java-without-module" unless="modules.supported.internal">
  970. <macrodef name="java" uri="http://www.netbeans.org/ns/j2se-project/1">
  971. <attribute default="" name="modulename"/>
  972. <attribute default="${main.class}" name="classname"/>
  973. <attribute default="" name="modulepath"/>
  974. <attribute default="${run.classpath}" name="classpath"/>
  975. <attribute default="jvm" name="jvm"/>
  976. <element name="customize" optional="true"/>
  977. <sequential>
  978. <java classname="@{classname}" dir="${work.dir}" failonerror="${java.failonerror}" fork="true">
  979. <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
  980. <jvmarg value="-Dfile.encoding=${runtime.encoding}"/>
  981. <redirector errorencoding="${runtime.encoding}" inputencoding="${runtime.encoding}" outputencoding="${runtime.encoding}"/>
  982. <jvmarg line="${run.jvmargs}"/>
  983. <jvmarg line="${run.jvmargs.ide}"/>
  984. <classpath>
  985. <path path="@{classpath}"/>
  986. </classpath>
  987. <syspropertyset>
  988. <propertyref prefix="run-sys-prop."/>
  989. <mapper from="run-sys-prop.*" to="*" type="glob"/>
  990. </syspropertyset>
  991. <customize/>
  992. </java>
  993. </sequential>
  994. </macrodef>
  995. </target>
  996. <target depends="-init-macrodef-java-with-module, -init-macrodef-java-with-unnamed-module, -init-macrodef-java-without-module" name="-init-macrodef-java"/>
  997. <target name="-init-macrodef-copylibs">
  998. <macrodef name="copylibs" uri="http://www.netbeans.org/ns/j2se-project/3">
  999. <attribute default="${manifest.file}" name="manifest"/>
  1000. <element name="customize" optional="true"/>
  1001. <sequential>
  1002. <property location="${build.classes.dir}" name="build.classes.dir.resolved"/>
  1003. <pathconvert property="run.classpath.without.build.classes.dir">
  1004. <path path="${run.classpath}"/>
  1005. <map from="${build.classes.dir.resolved}" to=""/>
  1006. </pathconvert>
  1007. <pathconvert pathsep=" " property="jar.classpath">
  1008. <path path="${run.classpath.without.build.classes.dir}"/>
  1009. <chainedmapper>
  1010. <flattenmapper/>
  1011. <filtermapper>
  1012. <replacestring from=" " to="%20"/>
  1013. </filtermapper>
  1014. <globmapper from="*" to="lib/*"/>
  1015. </chainedmapper>
  1016. </pathconvert>
  1017. <taskdef classname="org.netbeans.modules.java.j2seproject.copylibstask.CopyLibs" classpath="${libs.CopyLibs.classpath}" name="copylibs"/>
  1018. <copylibs compress="${jar.compress}" excludeFromCopy="${copylibs.excludes}" index="${jar.index}" indexMetaInf="${jar.index.metainf}" jarfile="${dist.jar}" manifest="@{manifest}" manifestencoding="UTF-8" rebase="${copylibs.rebase}" runtimeclasspath="${run.classpath.without.build.classes.dir}">
  1019. <fileset dir="${build.classes.dir}" excludes="${dist.archive.excludes}"/>
  1020. <manifest>
  1021. <attribute name="Class-Path" value="${jar.classpath}"/>
  1022. <customize/>
  1023. </manifest>
  1024. </copylibs>
  1025. </sequential>
  1026. </macrodef>
  1027. </target>
  1028. <target name="-init-presetdef-jar">
  1029. <presetdef name="jar" uri="http://www.netbeans.org/ns/j2se-project/1">
  1030. <jar compress="${jar.compress}" index="${jar.index}" jarfile="${dist.jar}" manifestencoding="UTF-8">
  1031. <j2seproject1:fileset dir="${build.classes.dir}" excludes="${dist.archive.excludes}"/>
  1032. </jar>
  1033. </presetdef>
  1034. </target>
  1035. <target name="-init-ap-cmdline-properties">
  1036. <property name="annotation.processing.enabled" value="true"/>
  1037. <property name="annotation.processing.processors.list" value=""/>
  1038. <property name="annotation.processing.processor.options" value=""/>
  1039. <property name="annotation.processing.run.all.processors" value="true"/>
  1040. <property name="javac.processorpath" value="${javac.classpath}"/>
  1041. <property name="javac.test.processorpath" value="${javac.test.classpath}"/>
  1042. <condition property="ap.supported.internal" value="true">
  1043. <not>
  1044. <matches pattern="1\.[0-5](\..*)?" string="${javac.source}"/>
  1045. </not>
  1046. </condition>
  1047. </target>
  1048. <target depends="-init-ap-cmdline-properties" if="ap.supported.internal" name="-init-ap-cmdline-supported">
  1049. <condition else="" property="ap.processors.internal" value="-processor ${annotation.processing.processors.list}">
  1050. <isfalse value="${annotation.processing.run.all.processors}"/>
  1051. </condition>
  1052. <condition else="" property="ap.proc.none.internal" value="-proc:none">
  1053. <isfalse value="${annotation.processing.enabled}"/>
  1054. </condition>
  1055. </target>
  1056. <target depends="-init-ap-cmdline-properties,-init-ap-cmdline-supported" name="-init-ap-cmdline">
  1057. <property name="ap.cmd.line.internal" value=""/>
  1058. </target>
  1059. <target depends="-pre-init,-init-private,-init-user,-init-project,-do-init,-post-init,-init-check,-init-macrodef-property,-init-macrodef-javac,-init-macrodef-test,-init-macrodef-test-debug,-init-macrodef-nbjpda,-init-macrodef-debug,-init-macrodef-java,-init-presetdef-jar,-init-ap-cmdline" name="init"/>
  1060. <!--
  1061. ===================
  1062. COMPILATION SECTION
  1063. ===================
  1064. -->
  1065. <target name="-deps-jar-init" unless="built-jar.properties">
  1066. <property location="${build.dir}/built-jar.properties" name="built-jar.properties"/>
  1067. <delete file="${built-jar.properties}" quiet="true"/>
  1068. </target>
  1069. <target if="already.built.jar.${basedir}" name="-warn-already-built-jar">
  1070. <echo level="warn" message="Cycle detected: MontecarloPi was already built"/>
  1071. </target>
  1072. <target depends="init,-deps-jar-init" name="deps-jar" unless="no.deps">
  1073. <mkdir dir="${build.dir}"/>
  1074. <touch file="${built-jar.properties}" verbose="false"/>
  1075. <property file="${built-jar.properties}" prefix="already.built.jar."/>
  1076. <antcall target="-warn-already-built-jar"/>
  1077. <propertyfile file="${built-jar.properties}">
  1078. <entry key="${basedir}" value=""/>
  1079. </propertyfile>
  1080. </target>
  1081. <target depends="init,-check-automatic-build,-clean-after-automatic-build" name="-verify-automatic-build"/>
  1082. <target depends="init" name="-check-automatic-build">
  1083. <available file="${build.classes.dir}/.netbeans_automatic_build" property="netbeans.automatic.build"/>
  1084. </target>
  1085. <target depends="init" if="netbeans.automatic.build" name="-clean-after-automatic-build">
  1086. <antcall target="clean">
  1087. <param name="no.dependencies" value="true"/>
  1088. </antcall>
  1089. </target>
  1090. <target depends="init,deps-jar" name="-pre-pre-compile">
  1091. <mkdir dir="${build.classes.dir}"/>
  1092. </target>
  1093. <target name="-pre-compile">
  1094. <!-- Empty placeholder for easier customization. -->
  1095. <!-- You can override this target in the ../build.xml file. -->
  1096. </target>
  1097. <target if="do.depend.true" name="-compile-depend">
  1098. <pathconvert property="build.generated.subdirs">
  1099. <dirset dir="${build.generated.sources.dir}" erroronmissingdir="false">
  1100. <include name="*"/>
  1101. </dirset>
  1102. </pathconvert>
  1103. <j2seproject3:depend srcdir="${src.dir}:${build.generated.subdirs}"/>
  1104. </target>
  1105. <target depends="init,deps-jar,-pre-pre-compile,-pre-compile, -copy-persistence-xml,-compile-depend" if="have.sources" name="-do-compile">
  1106. <j2seproject3:javac gensrcdir="${build.generated.sources.dir}"/>
  1107. <copy todir="${build.classes.dir}">
  1108. <fileset dir="${src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
  1109. </copy>
  1110. </target>
  1111. <target if="has.persistence.xml" name="-copy-persistence-xml">
  1112. <mkdir dir="${build.classes.dir}/META-INF"/>
  1113. <copy todir="${build.classes.dir}/META-INF">
  1114. <fileset dir="${meta.inf.dir}" includes="persistence.xml orm.xml"/>
  1115. </copy>
  1116. </target>
  1117. <target name="-post-compile">
  1118. <!-- Empty placeholder for easier customization. -->
  1119. <!-- You can override this target in the ../build.xml file. -->
  1120. </target>
  1121. <target depends="init,deps-jar,-verify-automatic-build,-pre-pre-compile,-pre-compile,-do-compile,-post-compile" description="Compile project." name="compile"/>
  1122. <target name="-pre-compile-single">
  1123. <!-- Empty placeholder for easier customization. -->
  1124. <!-- You can override this target in the ../build.xml file. -->
  1125. </target>
  1126. <target depends="init,deps-jar,-pre-pre-compile" name="-do-compile-single">
  1127. <fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail>
  1128. <j2seproject3:force-recompile/>
  1129. <j2seproject3:javac excludes="" gensrcdir="${build.generated.sources.dir}" includes="${javac.includes}, module-info.java" sourcepath="${src.dir}"/>
  1130. </target>
  1131. <target name="-post-compile-single">
  1132. <!-- Empty placeholder for easier customization. -->
  1133. <!-- You can override this target in the ../build.xml file. -->
  1134. </target>
  1135. <target depends="init,deps-jar,-verify-automatic-build,-pre-pre-compile,-pre-compile-single,-do-compile-single,-post-compile-single" name="compile-single"/>
  1136. <!--
  1137. ====================
  1138. JAR BUILDING SECTION
  1139. ====================
  1140. -->
  1141. <target depends="init" name="-pre-pre-jar">
  1142. <dirname file="${dist.jar}" property="dist.jar.dir"/>
  1143. <mkdir dir="${dist.jar.dir}"/>
  1144. </target>
  1145. <target name="-pre-jar">
  1146. <!-- Empty placeholder for easier customization. -->
  1147. <!-- You can override this target in the ../build.xml file. -->
  1148. </target>
  1149. <target depends="init,compile" name="-check-module-main-class">
  1150. <pathconvert property="main.class.file">
  1151. <string value="${main.class}"/>
  1152. <unpackagemapper from="*" to="*.class"/>
  1153. </pathconvert>
  1154. <condition property="do.module.main.class">
  1155. <and>
  1156. <isset property="main.class.available"/>
  1157. <available file="${build.classes.dir}/module-info.class"/>
  1158. <available file="${build.classes.dir}/${main.class.file}"/>
  1159. <isset property="libs.CopyLibs.classpath"/>
  1160. <available classname="org.netbeans.modules.java.j2seproject.moduletask.ModuleMainClass" classpath="${libs.CopyLibs.classpath}"/>
  1161. </and>
  1162. </condition>
  1163. </target>
  1164. <target depends="-check-module-main-class" if="do.module.main.class" name="-set-module-main-class">
  1165. <taskdef classname="org.netbeans.modules.java.j2seproject.moduletask.ModuleMainClass" classpath="${libs.CopyLibs.classpath}" name="modulemainclass"/>
  1166. <modulemainclass failonerror="false" mainclass="${main.class}" moduleinfo="${build.classes.dir}/module-info.class"/>
  1167. </target>
  1168. <target depends="init" if="do.archive" name="-do-jar-create-manifest" unless="manifest.available">
  1169. <tempfile deleteonexit="true" destdir="${build.dir}" property="tmp.manifest.file"/>
  1170. <touch file="${tmp.manifest.file}" verbose="false"/>
  1171. </target>
  1172. <target depends="init" if="do.archive+manifest.available" name="-do-jar-copy-manifest">
  1173. <tempfile deleteonexit="true" destdir="${build.dir}" property="tmp.manifest.file"/>
  1174. <copy encoding="${manifest.encoding}" file="${manifest.file}" outputencoding="UTF-8" tofile="${tmp.manifest.file}"/>
  1175. </target>
  1176. <target depends="init,-do-jar-create-manifest,-do-jar-copy-manifest" if="do.archive+main.class.available" name="-do-jar-set-mainclass">
  1177. <manifest encoding="UTF-8" file="${tmp.manifest.file}" mode="update">
  1178. <attribute name="Main-Class" value="${main.class}"/>
  1179. </manifest>
  1180. </target>
  1181. <target depends="init,-do-jar-create-manifest,-do-jar-copy-manifest" if="do.archive+profile.available" name="-do-jar-set-profile">
  1182. <manifest encoding="UTF-8" file="${tmp.manifest.file}" mode="update">
  1183. <attribute name="Profile" value="${javac.profile}"/>
  1184. </manifest>
  1185. </target>
  1186. <target depends="init,-do-jar-create-manifest,-do-jar-copy-manifest" if="do.archive+splashscreen.available" name="-do-jar-set-splashscreen">
  1187. <basename file="${application.splash}" property="splashscreen.basename"/>
  1188. <mkdir dir="${build.classes.dir}/META-INF"/>
  1189. <copy failonerror="false" file="${application.splash}" todir="${build.classes.dir}/META-INF"/>
  1190. <manifest encoding="UTF-8" file="${tmp.manifest.file}" mode="update">
  1191. <attribute name="SplashScreen-Image" value="META-INF/${splashscreen.basename}"/>
  1192. </manifest>
  1193. </target>
  1194. <target depends="init,-init-macrodef-copylibs,compile,-pre-pre-jar,-pre-jar,-do-jar-create-manifest,-do-jar-copy-manifest,-do-jar-set-mainclass,-do-jar-set-profile,-do-jar-set-splashscreen" if="do.mkdist" name="-do-jar-copylibs">
  1195. <j2seproject3:copylibs manifest="${tmp.manifest.file}"/>
  1196. <echo level="info">To run this application from the command line without Ant, try:</echo>
  1197. <property location="${dist.jar}" name="dist.jar.resolved"/>
  1198. <echo level="info">java -jar "${dist.jar.resolved}"</echo>
  1199. </target>
  1200. <target depends="init,compile,-pre-pre-jar,-pre-jar,-do-jar-create-manifest,-do-jar-copy-manifest,-do-jar-set-mainclass,-do-jar-set-profile,-do-jar-set-splashscreen" if="do.archive" name="-do-jar-jar" unless="do.mkdist">
  1201. <j2seproject1:jar manifest="${tmp.manifest.file}"/>
  1202. <property location="${build.classes.dir}" name="build.classes.dir.resolved"/>
  1203. <property location="${dist.jar}" name="dist.jar.resolved"/>
  1204. <condition else="${dist.jar.resolved}" property="jar.usage.message.class.path.replacement" value="">
  1205. <isset property="named.module.internal"/>
  1206. </condition>
  1207. <pathconvert property="run.classpath.with.dist.jar">
  1208. <path path="${run.classpath}"/>
  1209. <map from="${build.classes.dir.resolved}" to="${jar.usage.message.class.path.replacement}"/>
  1210. </pathconvert>
  1211. <pathconvert property="run.modulepath.with.dist.jar">
  1212. <path location="${dist.jar.resolved}"/>
  1213. <path path="${run.modulepath}"/>
  1214. <map from="${build.classes.dir.resolved}" to="${dist.jar.resolved}"/>
  1215. </pathconvert>
  1216. <condition else="${run.modulepath}" property="jar.usage.message.run.modulepath.with.dist.jar" value="${run.modulepath.with.dist.jar}">
  1217. <isset property="named.module.internal"/>
  1218. </condition>
  1219. <condition else="" property="jar.usage.message.module.path" value=" -p ${jar.usage.message.run.modulepath.with.dist.jar}">
  1220. <and>
  1221. <isset property="modules.supported.internal"/>
  1222. <length length="0" string="${jar.usage.message.run.modulepath.with.dist.jar}" when="greater"/>
  1223. </and>
  1224. </condition>
  1225. <condition else="" property="jar.usage.message.class.path" value=" -cp ${run.classpath.with.dist.jar}">
  1226. <length length="0" string="${run.classpath.with.dist.jar}" when="greater"/>
  1227. </condition>
  1228. <condition else="/${main.class}" property="jar.usage.message.main.class.class.selector" value="">
  1229. <isset property="do.module.main.class"/>
  1230. </condition>
  1231. <condition else=" ${main.class}" property="jar.usage.message.main.class" value=" -m ${module.name}${jar.usage.message.main.class.class.selector}">
  1232. <isset property="named.module.internal"/>
  1233. </condition>
  1234. <condition else="" property="jar.usage.message" value="To run this application from the command line without Ant, try:${line.separator}${platform.java}${jar.usage.message.module.path}${jar.usage.message.class.path}${jar.usage.message.main.class}">
  1235. <isset property="main.class.available"/>
  1236. </condition>
  1237. <condition else="debug" property="jar.usage.level" value="info">
  1238. <isset property="main.class.available"/>
  1239. </condition>
  1240. <echo level="${jar.usage.level}" message="${jar.usage.message}"/>
  1241. </target>
  1242. <target depends="-do-jar-copylibs" if="do.archive" name="-do-jar-delete-manifest">
  1243. <delete>
  1244. <fileset file="${tmp.manifest.file}"/>
  1245. </delete>
  1246. </target>
  1247. <target depends="init,compile,-pre-pre-jar,-pre-jar,-do-jar-create-manifest,-do-jar-copy-manifest,-do-jar-set-mainclass,-do-jar-set-profile,-do-jar-set-splashscreen,-do-jar-jar,-do-jar-delete-manifest" name="-do-jar-without-libraries"/>
  1248. <target depends="init,compile,-pre-pre-jar,-pre-jar,-do-jar-create-manifest,-do-jar-copy-manifest,-do-jar-set-mainclass,-do-jar-set-profile,-do-jar-set-splashscreen,-do-jar-copylibs,-do-jar-delete-manifest" name="-do-jar-with-libraries"/>
  1249. <target depends="-jfx-copylibs,-rebase-libs,jfx-deployment" name="-post-jar">
  1250. <!-- Empty placeholder for easier customization. -->
  1251. <!-- You can override this target in the ../build.xml file. -->
  1252. </target>
  1253. <target depends="init,compile,-pre-jar,-set-module-main-class,-do-jar-without-libraries,-do-jar-with-libraries,-post-jar" name="-do-jar"/>
  1254. <target depends="init,compile,-pre-jar,-do-jar,-post-jar,deploy" description="Build JAR." name="jar"/>
  1255. <!--
  1256. =================
  1257. DEPLOY SECTION
  1258. =================
  1259. -->
  1260. <target name="-pre-deploy">
  1261. <!-- Empty placeholder for easier customization. -->
  1262. <!-- You can override this target in the ../build.xml file. -->
  1263. </target>
  1264. <target depends="init" name="-check-jlink">
  1265. <condition property="do.jlink.internal">
  1266. <and>
  1267. <istrue value="${do.jlink}"/>
  1268. <isset property="do.archive"/>
  1269. <isset property="named.module.internal"/>
  1270. </and>
  1271. </condition>
  1272. </target>
  1273. <target depends="init,-do-jar,-post-jar,-pre-deploy,-check-jlink" if="do.jlink.internal" name="-do-deploy">
  1274. <delete dir="${dist.jlink.dir}" failonerror="false" quiet="true"/>
  1275. <property name="jlink.launcher.name" value="${application.title}"/>
  1276. <condition else="${module.name}" property="jlink.add.modules" value="${module.name},${jlink.additionalmodules}">
  1277. <and>
  1278. <isset property="jlink.additionalmodules"/>
  1279. <length length="0" string="${jlink.additionalmodules}" when="greater"/>
  1280. </and>
  1281. </condition>
  1282. <condition property="jlink.do.strip.internal">
  1283. <and>
  1284. <isset property="jlink.strip"/>
  1285. <istrue value="${jlink.strip}"/>
  1286. </and>
  1287. </condition>
  1288. <condition property="jlink.do.additionalparam.internal">
  1289. <and>
  1290. <isset property="jlink.additionalparam"/>
  1291. <length length="0" string="${jlink.additionalparam}" when="greater"/>
  1292. </and>
  1293. </condition>
  1294. <condition property="jlink.do.launcher.internal">
  1295. <and>
  1296. <istrue value="${jlink.launcher}"/>
  1297. <isset property="main.class.available"/>
  1298. </and>
  1299. </condition>
  1300. <property name="platform.jlink" value="${jdk.home}/bin/jlink"/>
  1301. <property name="jlink.systemmodules.internal" value="${jdk.home}/jmods"/>
  1302. <exec executable="${platform.jlink}">
  1303. <arg value="--module-path"/>
  1304. <arg path="${jlink.systemmodules.internal}:${run.modulepath}:${dist.jar}"/>
  1305. <arg value="--add-modules"/>
  1306. <arg value="${jlink.add.modules}"/>
  1307. <arg if:set="jlink.do.strip.internal" value="--strip-debug"/>
  1308. <arg if:set="jlink.do.launcher.internal" value="--launcher"/>
  1309. <arg if:set="jlink.do.launcher.internal" value="${jlink.launcher.name}=${module.name}/${main.class}"/>
  1310. <arg if:set="jlink.do.additionalparam.internal" line="${jlink.additionalparam}"/>
  1311. <arg value="--output"/>
  1312. <arg value="${dist.jlink.output}"/>
  1313. </exec>
  1314. </target>
  1315. <target name="-post-deploy">
  1316. <!-- Empty placeholder for easier customization. -->
  1317. <!-- You can override this target in the ../build.xml file. -->
  1318. </target>
  1319. <target depends="-do-jar,-post-jar,-pre-deploy,-do-deploy,-post-deploy" name="deploy"/>
  1320. <!--
  1321. =================
  1322. EXECUTION SECTION
  1323. =================
  1324. -->
  1325. <target depends="init,compile,jar" description="Run a main class." name="run">
  1326. <j2seproject1:java>
  1327. <customize>
  1328. <arg line="${application.args}"/>
  1329. </customize>
  1330. </j2seproject1:java>
  1331. </target>
  1332. <target name="-do-not-recompile">
  1333. <property name="javac.includes.binary" value=""/>
  1334. </target>
  1335. <target depends="init,compile-single" name="run-single">
  1336. <fail unless="run.class">Must select one file in the IDE or set run.class</fail>
  1337. <j2seproject1:java classname="${run.class}"/>
  1338. </target>
  1339. <target depends="init,compile-test-single" name="run-test-with-main">
  1340. <fail unless="run.class">Must select one file in the IDE or set run.class</fail>
  1341. <j2seproject1:java classname="${run.class}" classpath="${run.test.classpath}"/>
  1342. </target>
  1343. <!--
  1344. =================
  1345. DEBUGGING SECTION
  1346. =================
  1347. -->
  1348. <target depends="init" if="netbeans.home" name="-debug-start-debugger">
  1349. <j2seproject1:nbjpdastart name="${debug.class}"/>
  1350. </target>
  1351. <target depends="init" if="netbeans.home" name="-debug-start-debugger-main-test">
  1352. <j2seproject1:nbjpdastart classpath="${debug.test.classpath}" name="${debug.class}"/>
  1353. </target>
  1354. <target depends="init,compile" name="-debug-start-debuggee">
  1355. <j2seproject3:debug>
  1356. <customizeDebuggee>
  1357. <arg line="${application.args}"/>
  1358. </customizeDebuggee>
  1359. </j2seproject3:debug>
  1360. </target>
  1361. <target depends="init,compile,-debug-start-debugger,-debug-start-debuggee,jar" description="Debug project in IDE." if="netbeans.home" name="debug"/>
  1362. <target depends="init" if="netbeans.home" name="-debug-start-debugger-stepinto">
  1363. <j2seproject1:nbjpdastart stopclassname="${main.class}"/>
  1364. </target>
  1365. <target depends="init,compile,-debug-start-debugger-stepinto,-debug-start-debuggee" if="netbeans.home" name="debug-stepinto"/>
  1366. <target depends="init,compile-single" if="netbeans.home" name="-debug-start-debuggee-single">
  1367. <fail unless="debug.class">Must select one file in the IDE or set debug.class</fail>
  1368. <j2seproject3:debug classname="${debug.class}"/>
  1369. </target>
  1370. <target depends="init,compile-single,-debug-start-debugger,-debug-start-debuggee-single" if="netbeans.home" name="debug-single"/>
  1371. <target depends="init,compile-test-single" if="netbeans.home" name="-debug-start-debuggee-main-test">
  1372. <fail unless="debug.class">Must select one file in the IDE or set debug.class</fail>
  1373. <j2seproject3:debug classname="${debug.class}" classpath="${debug.test.classpath}"/>
  1374. </target>
  1375. <target depends="init,compile-test-single,-debug-start-debugger-main-test,-debug-start-debuggee-main-test" if="netbeans.home" name="debug-test-with-main"/>
  1376. <target depends="init" name="-pre-debug-fix">
  1377. <fail unless="fix.includes">Must set fix.includes</fail>
  1378. <property name="javac.includes" value="${fix.includes}.java"/>
  1379. </target>
  1380. <target depends="init,-pre-debug-fix,compile-single" if="netbeans.home" name="-do-debug-fix">
  1381. <j2seproject1:nbjpdareload/>
  1382. </target>
  1383. <target depends="init,-pre-debug-fix,-do-debug-fix" if="netbeans.home" name="debug-fix"/>
  1384. <!--
  1385. =================
  1386. PROFILING SECTION
  1387. =================
  1388. -->
  1389. <!--
  1390. pre NB7.2 profiler integration
  1391. -->
  1392. <target depends="profile-init,compile" description="Profile a project in the IDE." if="profiler.info.jvmargs.agent" name="-profile-pre72">
  1393. <fail unless="netbeans.home">This target only works when run from inside the NetBeans IDE.</fail>
  1394. <nbprofiledirect>
  1395. <classpath>
  1396. <path path="${run.classpath}"/>
  1397. </classpath>
  1398. </nbprofiledirect>
  1399. <profile/>
  1400. </target>
  1401. <target depends="profile-init,compile-single" description="Profile a selected class in the IDE." if="profiler.info.jvmargs.agent" name="-profile-single-pre72">
  1402. <fail unless="profile.class">Must select one file in the IDE or set profile.class</fail>
  1403. <fail unless="netbeans.home">This target only works when run from inside the NetBeans IDE.</fail>
  1404. <nbprofiledirect>
  1405. <classpath>
  1406. <path path="${run.classpath}"/>
  1407. </classpath>
  1408. </nbprofiledirect>
  1409. <profile classname="${profile.class}"/>
  1410. </target>
  1411. <target depends="profile-init,compile-single" if="profiler.info.jvmargs.agent" name="-profile-applet-pre72">
  1412. <fail unless="netbeans.home">This target only works when run from inside the NetBeans IDE.</fail>
  1413. <nbprofiledirect>
  1414. <classpath>
  1415. <path path="${run.classpath}"/>
  1416. </classpath>
  1417. </nbprofiledirect>
  1418. <profile classname="sun.applet.AppletViewer">
  1419. <customize>
  1420. <arg value="${applet.url}"/>
  1421. </customize>
  1422. </profile>
  1423. </target>
  1424. <target depends="-init-macrodef-junit,profile-init,compile-test-single" if="profiler.info.jvmargs.agent" name="-profile-test-single-pre72">
  1425. <fail unless="netbeans.home">This target only works when run from inside the NetBeans IDE.</fail>
  1426. <nbprofiledirect>
  1427. <classpath>
  1428. <path path="${run.test.classpath}"/>
  1429. </classpath>
  1430. </nbprofiledirect>
  1431. <j2seproject3:junit excludes="${excludes}" includes="${includes}" testincludes="${profile.class}" testmethods="">
  1432. <customize>
  1433. <jvmarg value="-agentlib:jdwp=transport=${debug-transport},address=${jpda.address}"/>
  1434. <env key="${profiler.info.pathvar}" path="${profiler.info.agentpath}:${profiler.current.path}"/>
  1435. <jvmarg value="${profiler.info.jvmargs.agent}"/>
  1436. <jvmarg line="${profiler.info.jvmargs}"/>
  1437. <classpath>
  1438. <path path="${run.test.classpath}"/>
  1439. </classpath>
  1440. </customize>
  1441. </j2seproject3:junit>
  1442. </target>
  1443. <!--
  1444. end of pre NB72 profiling section
  1445. -->
  1446. <target if="netbeans.home" name="-profile-check">
  1447. <condition property="profiler.configured">
  1448. <or>
  1449. <contains casesensitive="true" string="${run.jvmargs.ide}" substring="-agentpath:"/>
  1450. <contains casesensitive="true" string="${run.jvmargs.ide}" substring="-javaagent:"/>
  1451. </or>
  1452. </condition>
  1453. </target>
  1454. <target depends="-profile-check,-profile-pre72,jar" description="Profile a project in the IDE." if="profiler.configured" name="profile" unless="profiler.info.jvmargs.agent">
  1455. <startprofiler/>
  1456. <antcall target="run"/>
  1457. </target>
  1458. <target depends="-profile-check,-profile-single-pre72" description="Profile a selected class in the IDE." if="profiler.configured" name="profile-single" unless="profiler.info.jvmargs.agent">
  1459. <fail unless="run.class">Must select one file in the IDE or set run.class</fail>
  1460. <startprofiler/>
  1461. <antcall target="run-single"/>
  1462. </target>
  1463. <target depends="-profile-test-single-pre72" description="Profile a selected test in the IDE." name="profile-test-single"/>
  1464. <target depends="-profile-check" description="Profile a selected test in the IDE." if="profiler.configured" name="profile-test" unless="profiler.info.jvmargs">
  1465. <fail unless="test.includes">Must select some files in the IDE or set test.includes</fail>
  1466. <startprofiler/>
  1467. <antcall target="test-single"/>
  1468. </target>
  1469. <target depends="-profile-check" description="Profile a selected class in the IDE." if="profiler.configured" name="profile-test-with-main">
  1470. <fail unless="run.class">Must select one file in the IDE or set run.class</fail>
  1471. <startprofiler/>
  1472. <antcall target="run-test-with-main"/>
  1473. </target>
  1474. <target depends="-profile-check,-profile-applet-pre72" if="profiler.configured" name="profile-applet" unless="profiler.info.jvmargs.agent">
  1475. <fail unless="applet.url">Must select one file in the IDE or set applet.url</fail>
  1476. <startprofiler/>
  1477. <antcall target="run-applet"/>
  1478. </target>
  1479. <!--
  1480. ===============
  1481. JAVADOC SECTION
  1482. ===============
  1483. -->
  1484. <target depends="init" if="have.sources" name="-javadoc-build">
  1485. <mkdir dir="${dist.javadoc.dir}"/>
  1486. <condition else="" property="javadoc.endorsed.classpath.cmd.line.arg" value="-J${endorsed.classpath.cmd.line.arg}">
  1487. <and>
  1488. <isset property="endorsed.classpath.cmd.line.arg"/>
  1489. <not>
  1490. <equals arg1="${endorsed.classpath.cmd.line.arg}" arg2=""/>
  1491. </not>
  1492. </and>
  1493. </condition>
  1494. <condition else="" property="bug5101868workaround" value="*.java">
  1495. <matches pattern="1\.[56](\..*)?" string="${java.version}"/>
  1496. </condition>
  1497. <condition else="" property="javadoc.html5.cmd.line.arg" value="-html5">
  1498. <and>
  1499. <isset property="javadoc.html5"/>
  1500. <available file="${jdk.home}${file.separator}lib${file.separator}jrt-fs.jar"/>
  1501. </and>
  1502. </condition>
  1503. <javadoc additionalparam="-J-Dfile.encoding=${file.encoding} ${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}">
  1504. <classpath>
  1505. <path path="${javac.classpath}"/>
  1506. </classpath>
  1507. <fileset dir="${src.dir}" excludes="${bug5101868workaround},${excludes}" includes="${includes}">
  1508. <filename name="**/*.java"/>
  1509. </fileset>
  1510. <fileset dir="${build.generated.sources.dir}" erroronmissingdir="false">
  1511. <include name="**/*.java"/>
  1512. <exclude name="*.java"/>
  1513. </fileset>
  1514. <arg line="${javadoc.endorsed.classpath.cmd.line.arg}"/>
  1515. <arg line="${javadoc.html5.cmd.line.arg}"/>
  1516. </javadoc>
  1517. <copy todir="${dist.javadoc.dir}">
  1518. <fileset dir="${src.dir}" excludes="${excludes}" includes="${includes}">
  1519. <filename name="**/doc-files/**"/>
  1520. </fileset>
  1521. <fileset dir="${build.generated.sources.dir}" erroronmissingdir="false">
  1522. <include name="**/doc-files/**"/>
  1523. </fileset>
  1524. </copy>
  1525. </target>
  1526. <target depends="init,-javadoc-build" if="netbeans.home" name="-javadoc-browse" unless="no.javadoc.preview">
  1527. <nbbrowse file="${dist.javadoc.dir}/index.html"/>
  1528. </target>
  1529. <target depends="init,-javadoc-build,-javadoc-browse" description="Build Javadoc." name="javadoc"/>
  1530. <!--
  1531. =========================
  1532. TEST COMPILATION SECTION
  1533. =========================
  1534. -->
  1535. <target depends="init,compile" if="have.tests" name="-pre-pre-compile-test">
  1536. <mkdir dir="${build.test.classes.dir}"/>
  1537. </target>
  1538. <target name="-pre-compile-test">
  1539. <!-- Empty placeholder for easier customization. -->
  1540. <!-- You can override this target in the ../build.xml file. -->
  1541. </target>
  1542. <target depends="-init-source-module-properties" if="named.module.internal" name="-init-test-javac-module-properties-with-module">
  1543. <j2seproject3:modulename property="test.module.name" sourcepath="${test.src.dir}"/>
  1544. <condition else="${empty.dir}" property="javac.test.sourcepath" value="${test.src.dir}">
  1545. <and>
  1546. <isset property="test.module.name"/>
  1547. <length length="0" string="${test.module.name}" when="greater"/>
  1548. </and>
  1549. </condition>
  1550. <condition else="--patch-module ${module.name}=${test.src.dir} --add-reads ${module.name}=ALL-UNNAMED" property="javac.test.compilerargs" value="--add-reads ${test.module.name}=ALL-UNNAMED">
  1551. <and>
  1552. <isset property="test.module.name"/>
  1553. <length length="0" string="${test.module.name}" when="greater"/>
  1554. </and>
  1555. </condition>
  1556. </target>
  1557. <target depends="-init-source-module-properties" if="named.module.internal" name="-init-test-run-module-properties">
  1558. <condition else="${module.name}" property="run.test.addexport.source.module.internal" value="${test.module.name}">
  1559. <and>
  1560. <isset property="test.module.name"/>
  1561. <length length="0" string="${test.module.name}" when="greater"/>
  1562. </and>
  1563. </condition>
  1564. <fileset dir="${build.test.classes.dir}" id="run.test.packages.internal" includes="**/*.class"/>
  1565. <property location="${build.test.classes.dir}" name="build.test.classes.dir.abs.internal"/>
  1566. <pathconvert pathsep=" " property="run.test.addexports.internal" refid="run.test.packages.internal">
  1567. <chainedmapper>
  1568. <regexpmapper from="^(.*)\Q${file.separator}\E.*\.class$$" to="\1"/>
  1569. <filtermapper>
  1570. <uniqfilter/>
  1571. <replacestring from="${build.test.classes.dir.abs.internal}" to=""/>
  1572. </filtermapper>
  1573. <cutdirsmapper dirs="1"/>
  1574. <packagemapper from="*" to="--add-exports ${run.test.addexport.source.module.internal}/*=ALL-UNNAMED"/>
  1575. </chainedmapper>
  1576. </pathconvert>
  1577. <condition else="--patch-module ${module.name}=${build.test.classes.dir} --add-modules ${module.name} --add-reads ${module.name}=ALL-UNNAMED ${run.test.addexports.internal}" property="run.test.jvmargs" value="--add-modules ${test.module.name} --add-reads ${test.module.name}=ALL-UNNAMED ${run.test.addexports.internal}">
  1578. <and>
  1579. <isset property="test.module.name"/>
  1580. <length length="0" string="${test.module.name}" when="greater"/>
  1581. </and>
  1582. </condition>
  1583. </target>
  1584. <target depends="-init-source-module-properties" name="-init-test-module-properties-without-module" unless="named.module.internal">
  1585. <property name="javac.test.sourcepath" value="${empty.dir}"/>
  1586. <property name="javac.test.compilerargs" value=""/>
  1587. <property name="run.test.jvmargs" value=""/>
  1588. </target>
  1589. <target depends="-init-test-javac-module-properties-with-module,-init-test-module-properties-without-module" name="-init-test-module-properties"/>
  1590. <target if="do.depend.true" name="-compile-test-depend">
  1591. <j2seproject3:depend classpath="${javac.test.classpath}" destdir="${build.test.classes.dir}" srcdir="${test.src.dir}"/>
  1592. </target>
  1593. <target depends="init,deps-jar,compile,-init-test-module-properties,-pre-pre-compile-test,-pre-compile-test,-compile-test-depend" if="have.tests" name="-do-compile-test">
  1594. <j2seproject3:javac apgeneratedsrcdir="${build.test.classes.dir}" classpath="${javac.test.classpath}" debug="true" destdir="${build.test.classes.dir}" modulepath="${javac.test.modulepath}" processorpath="${javac.test.processorpath}" sourcepath="${javac.test.sourcepath}" srcdir="${test.src.dir}">
  1595. <customize>
  1596. <compilerarg line="${javac.test.compilerargs}"/>
  1597. </customize>
  1598. </j2seproject3:javac>
  1599. <copy todir="${build.test.classes.dir}">
  1600. <fileset dir="${test.src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
  1601. </copy>
  1602. </target>
  1603. <target name="-post-compile-test">
  1604. <!-- Empty placeholder for easier customization. -->
  1605. <!-- You can override this target in the ../build.xml file. -->
  1606. </target>
  1607. <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test,-do-compile-test,-post-compile-test" name="compile-test"/>
  1608. <target name="-pre-compile-test-single">
  1609. <!-- Empty placeholder for easier customization. -->
  1610. <!-- You can override this target in the ../build.xml file. -->
  1611. </target>
  1612. <target depends="init,deps-jar,compile,-init-test-module-properties,-pre-pre-compile-test,-pre-compile-test-single" if="have.tests" name="-do-compile-test-single">
  1613. <fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail>
  1614. <j2seproject3:force-recompile destdir="${build.test.classes.dir}"/>
  1615. <j2seproject3:javac apgeneratedsrcdir="${build.test.classes.dir}" classpath="${javac.test.classpath}" debug="true" destdir="${build.test.classes.dir}" excludes="" includes="${javac.includes}, module-info.java" modulepath="${javac.test.modulepath}" processorpath="${javac.test.processorpath}" sourcepath="${test.src.dir}" srcdir="${test.src.dir}">
  1616. <customize>
  1617. <compilerarg line="${javac.test.compilerargs}"/>
  1618. </customize>
  1619. </j2seproject3:javac>
  1620. <copy todir="${build.test.classes.dir}">
  1621. <fileset dir="${test.src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
  1622. </copy>
  1623. </target>
  1624. <target name="-post-compile-test-single">
  1625. <!-- Empty placeholder for easier customization. -->
  1626. <!-- You can override this target in the ../build.xml file. -->
  1627. </target>
  1628. <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test-single,-do-compile-test-single,-post-compile-test-single" name="compile-test-single"/>
  1629. <!--
  1630. =======================
  1631. TEST EXECUTION SECTION
  1632. =======================
  1633. -->
  1634. <target depends="init" if="have.tests" name="-pre-test-run">
  1635. <mkdir dir="${build.test.results.dir}"/>
  1636. </target>
  1637. <target depends="init,compile-test,-init-test-run-module-properties,-pre-test-run" if="have.tests" name="-do-test-run">
  1638. <j2seproject3:test includes="${includes}" testincludes="**/*Test.java"/>
  1639. </target>
  1640. <target depends="init,compile-test,-pre-test-run,-do-test-run" if="have.tests" name="-post-test-run">
  1641. <fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail>
  1642. </target>
  1643. <target depends="init" if="have.tests" name="test-report"/>
  1644. <target depends="init" if="netbeans.home+have.tests" name="-test-browse"/>
  1645. <target depends="init,compile-test,-pre-test-run,-do-test-run,test-report,-post-test-run,-test-browse" description="Run unit tests." name="test"/>
  1646. <target depends="init" if="have.tests" name="-pre-test-run-single">
  1647. <mkdir dir="${build.test.results.dir}"/>
  1648. </target>
  1649. <target depends="init,compile-test-single,-init-test-run-module-properties,-pre-test-run-single" if="have.tests" name="-do-test-run-single">
  1650. <fail unless="test.includes">Must select some files in the IDE or set test.includes</fail>
  1651. <j2seproject3:test excludes="" includes="${test.includes}" testincludes="${test.includes}"/>
  1652. </target>
  1653. <target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single" if="have.tests" name="-post-test-run-single">
  1654. <fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail>
  1655. </target>
  1656. <target depends="init,compile-test-single,-init-test-run-module-properties,-pre-test-run-single,-do-test-run-single,-post-test-run-single" description="Run single unit test." name="test-single"/>
  1657. <target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-do-test-run-single-method">
  1658. <fail unless="test.class">Must select some files in the IDE or set test.class</fail>
  1659. <fail unless="test.method">Must select some method in the IDE or set test.method</fail>
  1660. <j2seproject3:test excludes="" includes="${javac.includes}" testincludes="${test.class}" testmethods="${test.method}"/>
  1661. </target>
  1662. <target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single-method" if="have.tests" name="-post-test-run-single-method">
  1663. <fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail>
  1664. </target>
  1665. <target depends="init,compile-test-single,-init-test-run-module-properties,-pre-test-run-single,-do-test-run-single-method,-post-test-run-single-method" description="Run single unit test." name="test-single-method"/>
  1666. <!--
  1667. =======================
  1668. TEST DEBUGGING SECTION
  1669. =======================
  1670. -->
  1671. <target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-debug-start-debuggee-test">
  1672. <fail unless="test.class">Must select one file in the IDE or set test.class</fail>
  1673. <j2seproject3:test-debug excludes="" includes="${javac.includes}" testClass="${test.class}" testincludes="${javac.includes}"/>
  1674. </target>
  1675. <target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-debug-start-debuggee-test-method">
  1676. <fail unless="test.class">Must select one file in the IDE or set test.class</fail>
  1677. <fail unless="test.method">Must select some method in the IDE or set test.method</fail>
  1678. <j2seproject3:test-debug excludes="" includes="${javac.includes}" testClass="${test.class}" testMethod="${test.method}" testincludes="${test.class}" testmethods="${test.method}"/>
  1679. </target>
  1680. <target depends="init,compile-test" if="netbeans.home+have.tests" name="-debug-start-debugger-test">
  1681. <j2seproject1:nbjpdastart classpath="${debug.test.classpath}" name="${test.class}"/>
  1682. </target>
  1683. <target depends="init,compile-test-single,-init-test-run-module-properties,-debug-start-debugger-test,-debug-start-debuggee-test" name="debug-test"/>
  1684. <target depends="init,compile-test-single,-init-test-run-module-properties,-debug-start-debugger-test,-debug-start-debuggee-test-method" name="debug-test-method"/>
  1685. <target depends="init,-pre-debug-fix,compile-test-single" if="netbeans.home" name="-do-debug-fix-test">
  1686. <j2seproject1:nbjpdareload dir="${build.test.classes.dir}"/>
  1687. </target>
  1688. <target depends="init,-pre-debug-fix,-do-debug-fix-test" if="netbeans.home" name="debug-fix-test"/>
  1689. <!--
  1690. =========================
  1691. APPLET EXECUTION SECTION
  1692. =========================
  1693. -->
  1694. <target depends="init,compile-single" name="run-applet">
  1695. <fail unless="applet.url">Must select one file in the IDE or set applet.url</fail>
  1696. <j2seproject1:java classname="sun.applet.AppletViewer">
  1697. <customize>
  1698. <arg value="${applet.url}"/>
  1699. </customize>
  1700. </j2seproject1:java>
  1701. </target>
  1702. <!--
  1703. =========================
  1704. APPLET DEBUGGING SECTION
  1705. =========================
  1706. -->
  1707. <target depends="init,compile-single" if="netbeans.home" name="-debug-start-debuggee-applet">
  1708. <fail unless="applet.url">Must select one file in the IDE or set applet.url</fail>
  1709. <j2seproject3:debug classname="sun.applet.AppletViewer">
  1710. <customizeDebuggee>
  1711. <arg value="${applet.url}"/>
  1712. </customizeDebuggee>
  1713. </j2seproject3:debug>
  1714. </target>
  1715. <target depends="init,compile-single,-debug-start-debugger,-debug-start-debuggee-applet" if="netbeans.home" name="debug-applet"/>
  1716. <!--
  1717. ===============
  1718. CLEANUP SECTION
  1719. ===============
  1720. -->
  1721. <target name="-deps-clean-init" unless="built-clean.properties">
  1722. <property location="${build.dir}/built-clean.properties" name="built-clean.properties"/>
  1723. <delete file="${built-clean.properties}" quiet="true"/>
  1724. </target>
  1725. <target if="already.built.clean.${basedir}" name="-warn-already-built-clean">
  1726. <echo level="warn" message="Cycle detected: MontecarloPi was already built"/>
  1727. </target>
  1728. <target depends="init,-deps-clean-init" name="deps-clean" unless="no.deps">
  1729. <mkdir dir="${build.dir}"/>
  1730. <touch file="${built-clean.properties}" verbose="false"/>
  1731. <property file="${built-clean.properties}" prefix="already.built.clean."/>
  1732. <antcall target="-warn-already-built-clean"/>
  1733. <propertyfile file="${built-clean.properties}">
  1734. <entry key="${basedir}" value=""/>
  1735. </propertyfile>
  1736. </target>
  1737. <target depends="init" name="-do-clean">
  1738. <delete dir="${build.dir}"/>
  1739. <delete dir="${dist.jlink.output}"/>
  1740. <delete dir="${dist.dir}" followsymlinks="false" includeemptydirs="true"/>
  1741. </target>
  1742. <target name="-post-clean">
  1743. <!-- Empty placeholder for easier customization. -->
  1744. <!-- You can override this target in the ../build.xml file. -->
  1745. </target>
  1746. <target depends="init,deps-clean,-do-clean,-post-clean" description="Clean build products." name="clean"/>
  1747. <target name="-check-call-dep">
  1748. <property file="${call.built.properties}" prefix="already.built."/>
  1749. <condition property="should.call.dep">
  1750. <and>
  1751. <not>
  1752. <isset property="already.built.${call.subproject}"/>
  1753. </not>
  1754. <available file="${call.script}"/>
  1755. </and>
  1756. </condition>
  1757. </target>
  1758. <target depends="-check-call-dep" if="should.call.dep" name="-maybe-call-dep">
  1759. <ant antfile="${call.script}" inheritall="false" target="${call.target}">
  1760. <propertyset>
  1761. <propertyref prefix="transfer."/>
  1762. <mapper from="transfer.*" to="*" type="glob"/>
  1763. </propertyset>
  1764. </ant>
  1765. </target>
  1766. </project>