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

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