You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

build-impl.xml 98KB

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