build-impl.xml 97 KB

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