build-impl.xml 99KB

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