123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422
  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: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" basedir=".." default="default" name="CalculatorFX-impl">
  20. <import file="jfx-impl.xml"/>
  21. <fail message="Please build using Ant 1.8.0 or higher.">
  22. <condition>
  23. <not>
  24. <antversion atleast="1.8.0"/>
  25. </not>
  26. </condition>
  27. </fail>
  28. <target depends="test,jar,javadoc" description="Build and test whole project." name="default"/>
  29. <!--
  30. ======================
  31. INITIALIZATION SECTION
  32. ======================
  33. -->
  34. <target name="-pre-init">
  35. <!-- Empty placeholder for easier customization. -->
  36. <!-- You can override this target in the ../build.xml file. -->
  37. </target>
  38. <target depends="-pre-init" name="-init-private">
  39. <property file="nbproject/private/config.properties"/>
  40. <property file="nbproject/private/configs/${config}.properties"/>
  41. <property file="nbproject/private/private.properties"/>
  42. </target>
  43. <target depends="-pre-init,-init-private" name="-init-user">
  44. <property file="${user.properties.file}"/>
  45. <!-- The two properties below are usually overridden -->
  46. <!-- by the active platform. Just a fallback. -->
  47. <property name="default.javac.source" value="1.6"/>
  48. <property name="default.javac.target" value="1.6"/>
  49. </target>
  50. <target depends="-pre-init,-init-private,-init-user" name="-init-project">
  51. <property file="nbproject/configs/${config}.properties"/>
  52. <property file="nbproject/project.properties"/>
  53. </target>
  54. <target depends="-pre-init,-init-private,-init-user,-init-project,-init-macrodef-property" name="-do-init">
  55. <property name="platform.java" value="${java.home}/bin/java"/>
  56. <available file="${manifest.file}" property="manifest.available"/>
  57. <condition property="splashscreen.available">
  58. <and>
  59. <not>
  60. <equals arg1="${application.splash}" arg2="" trim="true"/>
  61. </not>
  62. <available file="${application.splash}"/>
  63. </and>
  64. </condition>
  65. <condition property="main.class.available">
  66. <and>
  67. <isset property="main.class"/>
  68. <not>
  69. <equals arg1="${main.class}" arg2="" trim="true"/>
  70. </not>
  71. </and>
  72. </condition>
  73. <condition property="profile.available">
  74. <and>
  75. <isset property="javac.profile"/>
  76. <length length="0" string="${javac.profile}" when="greater"/>
  77. <matches pattern="((1\.[89])|9)(\..*)?" string="${javac.source}"/>
  78. </and>
  79. </condition>
  80. <condition property="do.archive">
  81. <or>
  82. <not>
  83. <istrue value="${jar.archive.disabled}"/>
  84. </not>
  85. <istrue value="${not.archive.disabled}"/>
  86. </or>
  87. </condition>
  88. <condition property="do.mkdist">
  89. <and>
  90. <isset property="do.archive"/>
  91. <isset property="libs.CopyLibs.classpath"/>
  92. <not>
  93. <istrue value="${mkdist.disabled}"/>
  94. </not>
  95. </and>
  96. </condition>
  97. <condition property="do.archive+manifest.available">
  98. <and>
  99. <isset property="manifest.available"/>
  100. <istrue value="${do.archive}"/>
  101. </and>
  102. </condition>
  103. <condition property="do.archive+main.class.available">
  104. <and>
  105. <isset property="main.class.available"/>
  106. <istrue value="${do.archive}"/>
  107. </and>
  108. </condition>
  109. <condition property="do.archive+splashscreen.available">
  110. <and>
  111. <isset property="splashscreen.available"/>
  112. <istrue value="${do.archive}"/>
  113. </and>
  114. </condition>
  115. <condition property="do.archive+profile.available">
  116. <and>
  117. <isset property="profile.available"/>
  118. <istrue value="${do.archive}"/>
  119. </and>
  120. </condition>
  121. <condition property="have.tests">
  122. <or>
  123. <available file="${test.src.dir}"/>
  124. </or>
  125. </condition>
  126. <condition property="have.sources">
  127. <or>
  128. <available file="${src.dir}"/>
  129. </or>
  130. </condition>
  131. <condition property="netbeans.home+have.tests">
  132. <and>
  133. <isset property="netbeans.home"/>
  134. <isset property="have.tests"/>
  135. </and>
  136. </condition>
  137. <condition property="no.javadoc.preview">
  138. <and>
  139. <isset property="javadoc.preview"/>
  140. <isfalse value="${javadoc.preview}"/>
  141. </and>
  142. </condition>
  143. <property name="run.jvmargs" value=""/>
  144. <property name="run.jvmargs.ide" value=""/>
  145. <property name="javac.compilerargs" value=""/>
  146. <property name="work.dir" value="${basedir}"/>
  147. <condition property="no.deps">
  148. <and>
  149. <istrue value="${no.dependencies}"/>
  150. </and>
  151. </condition>
  152. <property name="javac.debug" value="true"/>
  153. <property name="javadoc.preview" value="true"/>
  154. <property name="application.args" value=""/>
  155. <property name="source.encoding" value="${file.encoding}"/>
  156. <property name="runtime.encoding" value="${source.encoding}"/>
  157. <property name="manifest.encoding" value="${source.encoding}"/>
  158. <condition property="javadoc.encoding.used" value="${javadoc.encoding}">
  159. <and>
  160. <isset property="javadoc.encoding"/>
  161. <not>
  162. <equals arg1="${javadoc.encoding}" arg2=""/>
  163. </not>
  164. </and>
  165. </condition>
  166. <property name="javadoc.encoding.used" value="${source.encoding}"/>
  167. <property name="includes" value="**"/>
  168. <property name="excludes" value=""/>
  169. <property name="do.depend" value="false"/>
  170. <condition property="do.depend.true">
  171. <istrue value="${do.depend}"/>
  172. </condition>
  173. <path id="endorsed.classpath.path" path="${endorsed.classpath}"/>
  174. <condition else="" property="endorsed.classpath.cmd.line.arg" value="-Xbootclasspath/p:'${toString:endorsed.classpath.path}'">
  175. <and>
  176. <isset property="endorsed.classpath"/>
  177. <not>
  178. <equals arg1="${endorsed.classpath}" arg2="" trim="true"/>
  179. </not>
  180. </and>
  181. </condition>
  182. <condition else="" property="javac.profile.cmd.line.arg" value="-profile ${javac.profile}">
  183. <isset property="profile.available"/>
  184. </condition>
  185. <condition else="false" property="jdkBug6558476">
  186. <and>
  187. <matches pattern="1\.[56]" string="${java.specification.version}"/>
  188. <not>
  189. <os family="unix"/>
  190. </not>
  191. </and>
  192. </condition>
  193. <condition else="false" property="javac.fork">
  194. <or>
  195. <istrue value="${jdkBug6558476}"/>
  196. <istrue value="${javac.external.vm}"/>
  197. </or>
  198. </condition>
  199. <property name="jar.index" value="false"/>
  200. <property name="jar.index.metainf" value="${jar.index}"/>
  201. <property name="copylibs.rebase" value="true"/>
  202. <available file="${meta.inf.dir}/persistence.xml" property="has.persistence.xml"/>
  203. <condition property="junit.available">
  204. <or>
  205. <available classname="org.junit.Test" classpath="${run.test.classpath}"/>
  206. <available classname="junit.framework.Test" classpath="${run.test.classpath}"/>
  207. </or>
  208. </condition>
  209. <condition property="testng.available">
  210. <available classname="org.testng.annotations.Test" classpath="${run.test.classpath}"/>
  211. </condition>
  212. <condition property="junit+testng.available">
  213. <and>
  214. <istrue value="${junit.available}"/>
  215. <istrue value="${testng.available}"/>
  216. </and>
  217. </condition>
  218. <condition else="testng" property="testng.mode" value="mixed">
  219. <istrue value="${junit+testng.available}"/>
  220. </condition>
  221. <condition else="" property="testng.debug.mode" value="-mixed">
  222. <istrue value="${junit+testng.available}"/>
  223. </condition>
  224. <property name="java.failonerror" value="true"/>
  225. </target>
  226. <target name="-post-init">
  227. <!-- Empty placeholder for easier customization. -->
  228. <!-- You can override this target in the ../build.xml file. -->
  229. </target>
  230. <target depends="-pre-init,-init-private,-init-user,-init-project,-do-init" name="-init-check">
  231. <fail unless="src.dir">Must set src.dir</fail>
  232. <fail unless="test.src.dir">Must set test.src.dir</fail>
  233. <fail unless="build.dir">Must set build.dir</fail>
  234. <fail unless="dist.dir">Must set dist.dir</fail>
  235. <fail unless="build.classes.dir">Must set build.classes.dir</fail>
  236. <fail unless="dist.javadoc.dir">Must set dist.javadoc.dir</fail>
  237. <fail unless="build.test.classes.dir">Must set build.test.classes.dir</fail>
  238. <fail unless="build.test.results.dir">Must set build.test.results.dir</fail>
  239. <fail unless="build.classes.excludes">Must set build.classes.excludes</fail>
  240. <fail unless="dist.jar">Must set dist.jar</fail>
  241. </target>
  242. <target name="-init-macrodef-property">
  243. <macrodef name="property" uri="http://www.netbeans.org/ns/j2se-project/1">
  244. <attribute name="name"/>
  245. <attribute name="value"/>
  246. <sequential>
  247. <property name="@{name}" value="${@{value}}"/>
  248. </sequential>
  249. </macrodef>
  250. </target>
  251. <target depends="-init-ap-cmdline-properties" if="ap.supported.internal" name="-init-macrodef-javac-with-processors">
  252. <macrodef name="javac" uri="http://www.netbeans.org/ns/j2se-project/3">
  253. <attribute default="${src.dir}" name="srcdir"/>
  254. <attribute default="${build.classes.dir}" name="destdir"/>
  255. <attribute default="${javac.classpath}" name="classpath"/>
  256. <attribute default="${javac.processorpath}" name="processorpath"/>
  257. <attribute default="${build.generated.sources.dir}/ap-source-output" name="apgeneratedsrcdir"/>
  258. <attribute default="${includes}" name="includes"/>
  259. <attribute default="${excludes}" name="excludes"/>
  260. <attribute default="${javac.debug}" name="debug"/>
  261. <attribute default="${empty.dir}" name="sourcepath"/>
  262. <attribute default="${empty.dir}" name="gensrcdir"/>
  263. <element name="customize" optional="true"/>
  264. <sequential>
  265. <property location="${build.dir}/empty" name="empty.dir"/>
  266. <mkdir dir="${empty.dir}"/>
  267. <mkdir dir="@{apgeneratedsrcdir}"/>
  268. <javac debug="@{debug}" deprecation="${javac.deprecation}" destdir="@{destdir}" encoding="${source.encoding}" excludes="@{excludes}" fork="${javac.fork}" includeantruntime="false" includes="@{includes}" source="${javac.source}" sourcepath="@{sourcepath}" srcdir="@{srcdir}" target="${javac.target}" tempdir="${java.io.tmpdir}">
  269. <src>
  270. <dirset dir="@{gensrcdir}" erroronmissingdir="false">
  271. <include name="*"/>
  272. </dirset>
  273. </src>
  274. <classpath>
  275. <path path="@{classpath}"/>
  276. </classpath>
  277. <compilerarg line="${endorsed.classpath.cmd.line.arg}"/>
  278. <compilerarg line="${javac.profile.cmd.line.arg}"/>
  279. <compilerarg line="${javac.compilerargs}"/>
  280. <compilerarg value="-processorpath"/>
  281. <compilerarg path="@{processorpath}:${empty.dir}"/>
  282. <compilerarg line="${ap.processors.internal}"/>
  283. <compilerarg line="${annotation.processing.processor.options}"/>
  284. <compilerarg value="-s"/>
  285. <compilerarg path="@{apgeneratedsrcdir}"/>
  286. <compilerarg line="${ap.proc.none.internal}"/>
  287. <customize/>
  288. </javac>
  289. </sequential>
  290. </macrodef>
  291. </target>
  292. <target depends="-init-ap-cmdline-properties" name="-init-macrodef-javac-without-processors" unless="ap.supported.internal">
  293. <macrodef name="javac" uri="http://www.netbeans.org/ns/j2se-project/3">
  294. <attribute default="${src.dir}" name="srcdir"/>
  295. <attribute default="${build.classes.dir}" name="destdir"/>
  296. <attribute default="${javac.classpath}" name="classpath"/>
  297. <attribute default="${javac.processorpath}" name="processorpath"/>
  298. <attribute default="${build.generated.sources.dir}/ap-source-output" name="apgeneratedsrcdir"/>
  299. <attribute default="${includes}" name="includes"/>
  300. <attribute default="${excludes}" name="excludes"/>
  301. <attribute default="${javac.debug}" name="debug"/>
  302. <attribute default="${empty.dir}" name="sourcepath"/>
  303. <attribute default="${empty.dir}" name="gensrcdir"/>
  304. <element name="customize" optional="true"/>
  305. <sequential>
  306. <property location="${build.dir}/empty" name="empty.dir"/>
  307. <mkdir dir="${empty.dir}"/>
  308. <javac debug="@{debug}" deprecation="${javac.deprecation}" destdir="@{destdir}" encoding="${source.encoding}" excludes="@{excludes}" fork="${javac.fork}" includeantruntime="false" includes="@{includes}" source="${javac.source}" sourcepath="@{sourcepath}" srcdir="@{srcdir}" target="${javac.target}" tempdir="${java.io.tmpdir}">
  309. <src>
  310. <dirset dir="@{gensrcdir}" erroronmissingdir="false">
  311. <include name="*"/>
  312. </dirset>
  313. </src>
  314. <classpath>
  315. <path path="@{classpath}"/>
  316. </classpath>
  317. <compilerarg line="${endorsed.classpath.cmd.line.arg}"/>
  318. <compilerarg line="${javac.profile.cmd.line.arg}"/>
  319. <compilerarg line="${javac.compilerargs}"/>
  320. <customize/>
  321. </javac>
  322. </sequential>
  323. </macrodef>
  324. </target>
  325. <target depends="-init-macrodef-javac-with-processors,-init-macrodef-javac-without-processors" name="-init-macrodef-javac">
  326. <macrodef name="depend" uri="http://www.netbeans.org/ns/j2se-project/3">
  327. <attribute default="${src.dir}" name="srcdir"/>
  328. <attribute default="${build.classes.dir}" name="destdir"/>
  329. <attribute default="${javac.classpath}" name="classpath"/>
  330. <sequential>
  331. <depend cache="${build.dir}/depcache" destdir="@{destdir}" excludes="${excludes}" includes="${includes}" srcdir="@{srcdir}">
  332. <classpath>
  333. <path path="@{classpath}"/>
  334. </classpath>
  335. </depend>
  336. </sequential>
  337. </macrodef>
  338. <macrodef name="force-recompile" uri="http://www.netbeans.org/ns/j2se-project/3">
  339. <attribute default="${build.classes.dir}" name="destdir"/>
  340. <sequential>
  341. <fail unless="javac.includes">Must set javac.includes</fail>
  342. <pathconvert pathsep="${line.separator}" property="javac.includes.binary">
  343. <path>
  344. <filelist dir="@{destdir}" files="${javac.includes}"/>
  345. </path>
  346. <globmapper from="*.java" to="*.class"/>
  347. </pathconvert>
  348. <tempfile deleteonexit="true" property="javac.includesfile.binary"/>
  349. <echo file="${javac.includesfile.binary}" message="${javac.includes.binary}"/>
  350. <delete>
  351. <files includesfile="${javac.includesfile.binary}"/>
  352. </delete>
  353. <delete>
  354. <fileset file="${javac.includesfile.binary}"/>
  355. </delete>
  356. </sequential>
  357. </macrodef>
  358. </target>
  359. <target if="${junit.available}" name="-init-macrodef-junit-init">
  360. <condition else="false" property="nb.junit.batch" value="true">
  361. <and>
  362. <istrue value="${junit.available}"/>
  363. <not>
  364. <isset property="test.method"/>
  365. </not>
  366. </and>
  367. </condition>
  368. <condition else="false" property="nb.junit.single" value="true">
  369. <and>
  370. <istrue value="${junit.available}"/>
  371. <isset property="test.method"/>
  372. </and>
  373. </condition>
  374. </target>
  375. <target name="-init-test-properties">
  376. <property name="test.binaryincludes" value="&lt;nothing&gt;"/>
  377. <property name="test.binarytestincludes" value=""/>
  378. <property name="test.binaryexcludes" value=""/>
  379. </target>
  380. <target if="${nb.junit.single}" name="-init-macrodef-junit-single" unless="${nb.junit.batch}">
  381. <macrodef name="junit" uri="http://www.netbeans.org/ns/j2se-project/3">
  382. <attribute default="${includes}" name="includes"/>
  383. <attribute default="${excludes}" name="excludes"/>
  384. <attribute default="**" name="testincludes"/>
  385. <attribute default="" name="testmethods"/>
  386. <element name="customize" optional="true"/>
  387. <sequential>
  388. <property name="junit.forkmode" value="perTest"/>
  389. <junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" forkmode="${junit.forkmode}" showoutput="true" tempdir="${build.dir}">
  390. <test methods="@{testmethods}" name="@{testincludes}" todir="${build.test.results.dir}"/>
  391. <syspropertyset>
  392. <propertyref prefix="test-sys-prop."/>
  393. <mapper from="test-sys-prop.*" to="*" type="glob"/>
  394. </syspropertyset>
  395. <formatter type="brief" usefile="false"/>
  396. <formatter type="xml"/>
  397. <jvmarg value="-ea"/>
  398. <customize/>
  399. </junit>
  400. </sequential>
  401. </macrodef>
  402. </target>
  403. <target depends="-init-test-properties" if="${nb.junit.batch}" name="-init-macrodef-junit-batch" unless="${nb.junit.single}">
  404. <macrodef name="junit" uri="http://www.netbeans.org/ns/j2se-project/3">
  405. <attribute default="${includes}" name="includes"/>
  406. <attribute default="${excludes}" name="excludes"/>
  407. <attribute default="**" name="testincludes"/>
  408. <attribute default="" name="testmethods"/>
  409. <element name="customize" optional="true"/>
  410. <sequential>
  411. <property name="junit.forkmode" value="perTest"/>
  412. <junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" forkmode="${junit.forkmode}" showoutput="true" tempdir="${build.dir}">
  413. <batchtest todir="${build.test.results.dir}">
  414. <fileset dir="${test.src.dir}" excludes="@{excludes},${excludes}" includes="@{includes}">
  415. <filename name="@{testincludes}"/>
  416. </fileset>
  417. <fileset dir="${build.test.classes.dir}" excludes="@{excludes},${excludes},${test.binaryexcludes}" includes="${test.binaryincludes}">
  418. <filename name="${test.binarytestincludes}"/>
  419. </fileset>
  420. </batchtest>
  421. <syspropertyset>
  422. <propertyref prefix="test-sys-prop."/>
  423. <mapper from="test-sys-prop.*" to="*" type="glob"/>
  424. </syspropertyset>
  425. <formatter type="brief" usefile="false"/>
  426. <formatter type="xml"/>
  427. <jvmarg value="-ea"/>
  428. <customize/>
  429. </junit>
  430. </sequential>
  431. </macrodef>
  432. </target>
  433. <target depends="-init-macrodef-junit-init,-init-macrodef-junit-single, -init-macrodef-junit-batch" if="${junit.available}" name="-init-macrodef-junit"/>
  434. <target if="${testng.available}" name="-init-macrodef-testng">
  435. <macrodef name="testng" uri="http://www.netbeans.org/ns/j2se-project/3">
  436. <attribute default="${includes}" name="includes"/>
  437. <attribute default="${excludes}" name="excludes"/>
  438. <attribute default="**" name="testincludes"/>
  439. <attribute default="" name="testmethods"/>
  440. <element name="customize" optional="true"/>
  441. <sequential>
  442. <condition else="" property="testng.methods.arg" value="@{testincludes}.@{testmethods}">
  443. <isset property="test.method"/>
  444. </condition>
  445. <union id="test.set">
  446. <fileset dir="${test.src.dir}" excludes="@{excludes},**/*.xml,${excludes}" includes="@{includes}">
  447. <filename name="@{testincludes}"/>
  448. </fileset>
  449. </union>
  450. <taskdef classname="org.testng.TestNGAntTask" classpath="${run.test.classpath}" name="testng"/>
  451. <testng classfilesetref="test.set" failureProperty="tests.failed" listeners="org.testng.reporters.VerboseReporter" methods="${testng.methods.arg}" mode="${testng.mode}" outputdir="${build.test.results.dir}" suitename="CalculatorFX" testname="TestNG tests" workingDir="${work.dir}">
  452. <xmlfileset dir="${build.test.classes.dir}" includes="@{testincludes}"/>
  453. <propertyset>
  454. <propertyref prefix="test-sys-prop."/>
  455. <mapper from="test-sys-prop.*" to="*" type="glob"/>
  456. </propertyset>
  457. <customize/>
  458. </testng>
  459. </sequential>
  460. </macrodef>
  461. </target>
  462. <target name="-init-macrodef-test-impl">
  463. <macrodef name="test-impl" uri="http://www.netbeans.org/ns/j2se-project/3">
  464. <attribute default="${includes}" name="includes"/>
  465. <attribute default="${excludes}" name="excludes"/>
  466. <attribute default="**" name="testincludes"/>
  467. <attribute default="" name="testmethods"/>
  468. <element implicit="true" name="customize" optional="true"/>
  469. <sequential>
  470. <echo>No tests executed.</echo>
  471. </sequential>
  472. </macrodef>
  473. </target>
  474. <target depends="-init-macrodef-junit" if="${junit.available}" name="-init-macrodef-junit-impl">
  475. <macrodef name="test-impl" uri="http://www.netbeans.org/ns/j2se-project/3">
  476. <attribute default="${includes}" name="includes"/>
  477. <attribute default="${excludes}" name="excludes"/>
  478. <attribute default="**" name="testincludes"/>
  479. <attribute default="" name="testmethods"/>
  480. <element implicit="true" name="customize" optional="true"/>
  481. <sequential>
  482. <j2seproject3:junit excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}">
  483. <customize/>
  484. </j2seproject3:junit>
  485. </sequential>
  486. </macrodef>
  487. </target>
  488. <target depends="-init-macrodef-testng" if="${testng.available}" name="-init-macrodef-testng-impl">
  489. <macrodef name="test-impl" uri="http://www.netbeans.org/ns/j2se-project/3">
  490. <attribute default="${includes}" name="includes"/>
  491. <attribute default="${excludes}" name="excludes"/>
  492. <attribute default="**" name="testincludes"/>
  493. <attribute default="" name="testmethods"/>
  494. <element implicit="true" name="customize" optional="true"/>
  495. <sequential>
  496. <j2seproject3:testng excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}">
  497. <customize/>
  498. </j2seproject3:testng>
  499. </sequential>
  500. </macrodef>
  501. </target>
  502. <target depends="-init-macrodef-test-impl,-init-macrodef-junit-impl,-init-macrodef-testng-impl" name="-init-macrodef-test">
  503. <macrodef name="test" uri="http://www.netbeans.org/ns/j2se-project/3">
  504. <attribute default="${includes}" name="includes"/>
  505. <attribute default="${excludes}" name="excludes"/>
  506. <attribute default="**" name="testincludes"/>
  507. <attribute default="" name="testmethods"/>
  508. <sequential>
  509. <j2seproject3:test-impl excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}">
  510. <customize>
  511. <classpath>
  512. <path path="${run.test.classpath}"/>
  513. </classpath>
  514. <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
  515. <jvmarg line="${run.jvmargs}"/>
  516. <jvmarg line="${run.jvmargs.ide}"/>
  517. </customize>
  518. </j2seproject3:test-impl>
  519. </sequential>
  520. </macrodef>
  521. </target>
  522. <target if="${junit.available}" name="-init-macrodef-junit-debug" unless="${nb.junit.batch}">
  523. <macrodef name="junit-debug" uri="http://www.netbeans.org/ns/j2se-project/3">
  524. <attribute default="${includes}" name="includes"/>
  525. <attribute default="${excludes}" name="excludes"/>
  526. <attribute default="**" name="testincludes"/>
  527. <attribute default="" name="testmethods"/>
  528. <element name="customize" optional="true"/>
  529. <sequential>
  530. <property name="junit.forkmode" value="perTest"/>
  531. <junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" forkmode="${junit.forkmode}" showoutput="true" tempdir="${build.dir}">
  532. <test methods="@{testmethods}" name="@{testincludes}" todir="${build.test.results.dir}"/>
  533. <syspropertyset>
  534. <propertyref prefix="test-sys-prop."/>
  535. <mapper from="test-sys-prop.*" to="*" type="glob"/>
  536. </syspropertyset>
  537. <formatter type="brief" usefile="false"/>
  538. <formatter type="xml"/>
  539. <jvmarg value="-ea"/>
  540. <jvmarg line="${debug-args-line}"/>
  541. <jvmarg value="-Xrunjdwp:transport=${debug-transport},address=${jpda.address}"/>
  542. <customize/>
  543. </junit>
  544. </sequential>
  545. </macrodef>
  546. </target>
  547. <target depends="-init-test-properties" if="${nb.junit.batch}" name="-init-macrodef-junit-debug-batch">
  548. <macrodef name="junit-debug" uri="http://www.netbeans.org/ns/j2se-project/3">
  549. <attribute default="${includes}" name="includes"/>
  550. <attribute default="${excludes}" name="excludes"/>
  551. <attribute default="**" name="testincludes"/>
  552. <attribute default="" name="testmethods"/>
  553. <element name="customize" optional="true"/>
  554. <sequential>
  555. <property name="junit.forkmode" value="perTest"/>
  556. <junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" forkmode="${junit.forkmode}" showoutput="true" tempdir="${build.dir}">
  557. <batchtest todir="${build.test.results.dir}">
  558. <fileset dir="${test.src.dir}" excludes="@{excludes},${excludes}" includes="@{includes}">
  559. <filename name="@{testincludes}"/>
  560. </fileset>
  561. <fileset dir="${build.test.classes.dir}" excludes="@{excludes},${excludes},${test.binaryexcludes}" includes="${test.binaryincludes}">
  562. <filename name="${test.binarytestincludes}"/>
  563. </fileset>
  564. </batchtest>
  565. <syspropertyset>
  566. <propertyref prefix="test-sys-prop."/>
  567. <mapper from="test-sys-prop.*" to="*" type="glob"/>
  568. </syspropertyset>
  569. <formatter type="brief" usefile="false"/>
  570. <formatter type="xml"/>
  571. <jvmarg value="-ea"/>
  572. <jvmarg line="${debug-args-line}"/>
  573. <jvmarg value="-Xrunjdwp:transport=${debug-transport},address=${jpda.address}"/>
  574. <customize/>
  575. </junit>
  576. </sequential>
  577. </macrodef>
  578. </target>
  579. <target depends="-init-macrodef-junit-debug,-init-macrodef-junit-debug-batch" if="${junit.available}" name="-init-macrodef-junit-debug-impl">
  580. <macrodef name="test-debug-impl" uri="http://www.netbeans.org/ns/j2se-project/3">
  581. <attribute default="${includes}" name="includes"/>
  582. <attribute default="${excludes}" name="excludes"/>
  583. <attribute default="**" name="testincludes"/>
  584. <attribute default="" name="testmethods"/>
  585. <element implicit="true" name="customize" optional="true"/>
  586. <sequential>
  587. <j2seproject3:junit-debug excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}">
  588. <customize/>
  589. </j2seproject3:junit-debug>
  590. </sequential>
  591. </macrodef>
  592. </target>
  593. <target if="${testng.available}" name="-init-macrodef-testng-debug">
  594. <macrodef name="testng-debug" uri="http://www.netbeans.org/ns/j2se-project/3">
  595. <attribute default="${main.class}" name="testClass"/>
  596. <attribute default="" name="testMethod"/>
  597. <element name="customize2" optional="true"/>
  598. <sequential>
  599. <condition else="-testclass @{testClass}" property="test.class.or.method" value="-methods @{testClass}.@{testMethod}">
  600. <isset property="test.method"/>
  601. </condition>
  602. <condition else="-suitename CalculatorFX -testname @{testClass} ${test.class.or.method}" property="testng.cmd.args" value="@{testClass}">
  603. <matches pattern=".*\.xml" string="@{testClass}"/>
  604. </condition>
  605. <delete dir="${build.test.results.dir}" quiet="true"/>
  606. <mkdir dir="${build.test.results.dir}"/>
  607. <j2seproject3:debug classname="org.testng.TestNG" classpath="${debug.test.classpath}">
  608. <customize>
  609. <customize2/>
  610. <jvmarg value="-ea"/>
  611. <arg line="${testng.debug.mode}"/>
  612. <arg line="-d ${build.test.results.dir}"/>
  613. <arg line="-listener org.testng.reporters.VerboseReporter"/>
  614. <arg line="${testng.cmd.args}"/>
  615. </customize>
  616. </j2seproject3:debug>
  617. </sequential>
  618. </macrodef>
  619. </target>
  620. <target depends="-init-macrodef-testng-debug" if="${testng.available}" name="-init-macrodef-testng-debug-impl">
  621. <macrodef name="testng-debug-impl" uri="http://www.netbeans.org/ns/j2se-project/3">
  622. <attribute default="${main.class}" name="testClass"/>
  623. <attribute default="" name="testMethod"/>
  624. <element implicit="true" name="customize2" optional="true"/>
  625. <sequential>
  626. <j2seproject3:testng-debug testClass="@{testClass}" testMethod="@{testMethod}">
  627. <customize2/>
  628. </j2seproject3:testng-debug>
  629. </sequential>
  630. </macrodef>
  631. </target>
  632. <target depends="-init-macrodef-junit-debug-impl" if="${junit.available}" name="-init-macrodef-test-debug-junit">
  633. <macrodef name="test-debug" uri="http://www.netbeans.org/ns/j2se-project/3">
  634. <attribute default="${includes}" name="includes"/>
  635. <attribute default="${excludes}" name="excludes"/>
  636. <attribute default="**" name="testincludes"/>
  637. <attribute default="" name="testmethods"/>
  638. <attribute default="${main.class}" name="testClass"/>
  639. <attribute default="" name="testMethod"/>
  640. <sequential>
  641. <j2seproject3:test-debug-impl excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}">
  642. <customize>
  643. <classpath>
  644. <path path="${run.test.classpath}"/>
  645. </classpath>
  646. <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
  647. <jvmarg line="${run.jvmargs}"/>
  648. <jvmarg line="${run.jvmargs.ide}"/>
  649. </customize>
  650. </j2seproject3:test-debug-impl>
  651. </sequential>
  652. </macrodef>
  653. </target>
  654. <target depends="-init-macrodef-testng-debug-impl" if="${testng.available}" name="-init-macrodef-test-debug-testng">
  655. <macrodef name="test-debug" uri="http://www.netbeans.org/ns/j2se-project/3">
  656. <attribute default="${includes}" name="includes"/>
  657. <attribute default="${excludes}" name="excludes"/>
  658. <attribute default="**" name="testincludes"/>
  659. <attribute default="" name="testmethods"/>
  660. <attribute default="${main.class}" name="testClass"/>
  661. <attribute default="" name="testMethod"/>
  662. <sequential>
  663. <j2seproject3:testng-debug-impl testClass="@{testClass}" testMethod="@{testMethod}">
  664. <customize2>
  665. <syspropertyset>
  666. <propertyref prefix="test-sys-prop."/>
  667. <mapper from="test-sys-prop.*" to="*" type="glob"/>
  668. </syspropertyset>
  669. </customize2>
  670. </j2seproject3:testng-debug-impl>
  671. </sequential>
  672. </macrodef>
  673. </target>
  674. <target depends="-init-macrodef-test-debug-junit,-init-macrodef-test-debug-testng" name="-init-macrodef-test-debug"/>
  675. <!--
  676. pre NB7.2 profiling section; consider it deprecated
  677. -->
  678. <target depends="-profile-pre-init, init, -profile-post-init, -profile-init-macrodef-profile, -profile-init-check" if="profiler.info.jvmargs.agent" name="profile-init"/>
  679. <target if="profiler.info.jvmargs.agent" name="-profile-pre-init">
  680. <!-- Empty placeholder for easier customization. -->
  681. <!-- You can override this target in the ../build.xml file. -->
  682. </target>
  683. <target if="profiler.info.jvmargs.agent" name="-profile-post-init">
  684. <!-- Empty placeholder for easier customization. -->
  685. <!-- You can override this target in the ../build.xml file. -->
  686. </target>
  687. <target if="profiler.info.jvmargs.agent" name="-profile-init-macrodef-profile">
  688. <macrodef name="resolve">
  689. <attribute name="name"/>
  690. <attribute name="value"/>
  691. <sequential>
  692. <property name="@{name}" value="${env.@{value}}"/>
  693. </sequential>
  694. </macrodef>
  695. <macrodef name="profile">
  696. <attribute default="${main.class}" name="classname"/>
  697. <element name="customize" optional="true"/>
  698. <sequential>
  699. <property environment="env"/>
  700. <resolve name="profiler.current.path" value="${profiler.info.pathvar}"/>
  701. <java classname="@{classname}" dir="${profiler.info.dir}" failonerror="${java.failonerror}" fork="true" jvm="${profiler.info.jvm}">
  702. <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
  703. <jvmarg value="${profiler.info.jvmargs.agent}"/>
  704. <jvmarg line="${profiler.info.jvmargs}"/>
  705. <env key="${profiler.info.pathvar}" path="${profiler.info.agentpath}:${profiler.current.path}"/>
  706. <arg line="${application.args}"/>
  707. <classpath>
  708. <path path="${run.classpath}"/>
  709. </classpath>
  710. <syspropertyset>
  711. <propertyref prefix="run-sys-prop."/>
  712. <mapper from="run-sys-prop.*" to="*" type="glob"/>
  713. </syspropertyset>
  714. <customize/>
  715. </java>
  716. </sequential>
  717. </macrodef>
  718. </target>
  719. <target depends="-profile-pre-init, init, -profile-post-init, -profile-init-macrodef-profile" if="profiler.info.jvmargs.agent" name="-profile-init-check">
  720. <fail unless="profiler.info.jvm">Must set JVM to use for profiling in profiler.info.jvm</fail>
  721. <fail unless="profiler.info.jvmargs.agent">Must set profiler agent JVM arguments in profiler.info.jvmargs.agent</fail>
  722. </target>
  723. <!--
  724. end of pre NB7.2 profiling section
  725. -->
  726. <target depends="-init-debug-args" name="-init-macrodef-nbjpda">
  727. <macrodef name="nbjpdastart" uri="http://www.netbeans.org/ns/j2se-project/1">
  728. <attribute default="${main.class}" name="name"/>
  729. <attribute default="${debug.classpath}" name="classpath"/>
  730. <attribute default="" name="stopclassname"/>
  731. <sequential>
  732. <nbjpdastart addressproperty="jpda.address" name="@{name}" stopclassname="@{stopclassname}" transport="${debug-transport}">
  733. <classpath>
  734. <path path="@{classpath}"/>
  735. </classpath>
  736. </nbjpdastart>
  737. </sequential>
  738. </macrodef>
  739. <macrodef name="nbjpdareload" uri="http://www.netbeans.org/ns/j2se-project/1">
  740. <attribute default="${build.classes.dir}" name="dir"/>
  741. <sequential>
  742. <nbjpdareload>
  743. <fileset dir="@{dir}" includes="${fix.classes}">
  744. <include name="${fix.includes}*.class"/>
  745. </fileset>
  746. </nbjpdareload>
  747. </sequential>
  748. </macrodef>
  749. </target>
  750. <target name="-init-debug-args">
  751. <property name="version-output" value="java version &quot;${ant.java.version}"/>
  752. <condition property="have-jdk-older-than-1.4">
  753. <or>
  754. <contains string="${version-output}" substring="java version &quot;1.0"/>
  755. <contains string="${version-output}" substring="java version &quot;1.1"/>
  756. <contains string="${version-output}" substring="java version &quot;1.2"/>
  757. <contains string="${version-output}" substring="java version &quot;1.3"/>
  758. </or>
  759. </condition>
  760. <condition else="-Xdebug" property="debug-args-line" value="-Xdebug -Xnoagent -Djava.compiler=none">
  761. <istrue value="${have-jdk-older-than-1.4}"/>
  762. </condition>
  763. <condition else="dt_socket" property="debug-transport-by-os" value="dt_shmem">
  764. <os family="windows"/>
  765. </condition>
  766. <condition else="${debug-transport-by-os}" property="debug-transport" value="${debug.transport}">
  767. <isset property="debug.transport"/>
  768. </condition>
  769. </target>
  770. <target depends="-init-debug-args" name="-init-macrodef-debug">
  771. <macrodef name="debug" uri="http://www.netbeans.org/ns/j2se-project/3">
  772. <attribute default="${main.class}" name="classname"/>
  773. <attribute default="${debug.classpath}" name="classpath"/>
  774. <element name="customize" optional="true"/>
  775. <sequential>
  776. <java classname="@{classname}" dir="${work.dir}" failonerror="${java.failonerror}" fork="true">
  777. <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
  778. <jvmarg line="${debug-args-line}"/>
  779. <jvmarg value="-Xrunjdwp:transport=${debug-transport},address=${jpda.address}"/>
  780. <jvmarg value="-Dfile.encoding=${runtime.encoding}"/>
  781. <redirector errorencoding="${runtime.encoding}" inputencoding="${runtime.encoding}" outputencoding="${runtime.encoding}"/>
  782. <jvmarg line="${run.jvmargs}"/>
  783. <jvmarg line="${run.jvmargs.ide}"/>
  784. <classpath>
  785. <path path="@{classpath}"/>
  786. </classpath>
  787. <syspropertyset>
  788. <propertyref prefix="run-sys-prop."/>
  789. <mapper from="run-sys-prop.*" to="*" type="glob"/>
  790. </syspropertyset>
  791. <customize/>
  792. </java>
  793. </sequential>
  794. </macrodef>
  795. </target>
  796. <target name="-init-macrodef-java">
  797. <macrodef name="java" uri="http://www.netbeans.org/ns/j2se-project/1">
  798. <attribute default="${main.class}" name="classname"/>
  799. <attribute default="${run.classpath}" name="classpath"/>
  800. <attribute default="jvm" name="jvm"/>
  801. <element name="customize" optional="true"/>
  802. <sequential>
  803. <java classname="@{classname}" dir="${work.dir}" failonerror="${java.failonerror}" fork="true">
  804. <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
  805. <jvmarg value="-Dfile.encoding=${runtime.encoding}"/>
  806. <redirector errorencoding="${runtime.encoding}" inputencoding="${runtime.encoding}" outputencoding="${runtime.encoding}"/>
  807. <jvmarg line="${run.jvmargs}"/>
  808. <jvmarg line="${run.jvmargs.ide}"/>
  809. <classpath>
  810. <path path="@{classpath}"/>
  811. </classpath>
  812. <syspropertyset>
  813. <propertyref prefix="run-sys-prop."/>
  814. <mapper from="run-sys-prop.*" to="*" type="glob"/>
  815. </syspropertyset>
  816. <customize/>
  817. </java>
  818. </sequential>
  819. </macrodef>
  820. </target>
  821. <target name="-init-macrodef-copylibs">
  822. <macrodef name="copylibs" uri="http://www.netbeans.org/ns/j2se-project/3">
  823. <attribute default="${manifest.file}" name="manifest"/>
  824. <element name="customize" optional="true"/>
  825. <sequential>
  826. <property location="${build.classes.dir}" name="build.classes.dir.resolved"/>
  827. <pathconvert property="run.classpath.without.build.classes.dir">
  828. <path path="${run.classpath}"/>
  829. <map from="${build.classes.dir.resolved}" to=""/>
  830. </pathconvert>
  831. <pathconvert pathsep=" " property="jar.classpath">
  832. <path path="${run.classpath.without.build.classes.dir}"/>
  833. <chainedmapper>
  834. <flattenmapper/>
  835. <filtermapper>
  836. <replacestring from=" " to="%20"/>
  837. </filtermapper>
  838. <globmapper from="*" to="lib/*"/>
  839. </chainedmapper>
  840. </pathconvert>
  841. <taskdef classname="org.netbeans.modules.java.j2seproject.copylibstask.CopyLibs" classpath="${libs.CopyLibs.classpath}" name="copylibs"/>
  842. <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}">
  843. <fileset dir="${build.classes.dir}" excludes="${dist.archive.excludes}"/>
  844. <manifest>
  845. <attribute name="Class-Path" value="${jar.classpath}"/>
  846. <customize/>
  847. </manifest>
  848. </copylibs>
  849. </sequential>
  850. </macrodef>
  851. </target>
  852. <target name="-init-presetdef-jar">
  853. <presetdef name="jar" uri="http://www.netbeans.org/ns/j2se-project/1">
  854. <jar compress="${jar.compress}" index="${jar.index}" jarfile="${dist.jar}" manifestencoding="UTF-8">
  855. <j2seproject1:fileset dir="${build.classes.dir}" excludes="${dist.archive.excludes}"/>
  856. </jar>
  857. </presetdef>
  858. </target>
  859. <target name="-init-ap-cmdline-properties">
  860. <property name="annotation.processing.enabled" value="true"/>
  861. <property name="annotation.processing.processors.list" value=""/>
  862. <property name="annotation.processing.processor.options" value=""/>
  863. <property name="annotation.processing.run.all.processors" value="true"/>
  864. <property name="javac.processorpath" value="${javac.classpath}"/>
  865. <property name="javac.test.processorpath" value="${javac.test.classpath}"/>
  866. <condition property="ap.supported.internal" value="true">
  867. <not>
  868. <matches pattern="1\.[0-5](\..*)?" string="${javac.source}"/>
  869. </not>
  870. </condition>
  871. </target>
  872. <target depends="-init-ap-cmdline-properties" if="ap.supported.internal" name="-init-ap-cmdline-supported">
  873. <condition else="" property="ap.processors.internal" value="-processor ${annotation.processing.processors.list}">
  874. <isfalse value="${annotation.processing.run.all.processors}"/>
  875. </condition>
  876. <condition else="" property="ap.proc.none.internal" value="-proc:none">
  877. <isfalse value="${annotation.processing.enabled}"/>
  878. </condition>
  879. </target>
  880. <target depends="-init-ap-cmdline-properties,-init-ap-cmdline-supported" name="-init-ap-cmdline">
  881. <property name="ap.cmd.line.internal" value=""/>
  882. </target>
  883. <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"/>
  884. <!--
  885. ===================
  886. COMPILATION SECTION
  887. ===================
  888. -->
  889. <target name="-deps-jar-init" unless="built-jar.properties">
  890. <property location="${build.dir}/built-jar.properties" name="built-jar.properties"/>
  891. <delete file="${built-jar.properties}" quiet="true"/>
  892. </target>
  893. <target if="already.built.jar.${basedir}" name="-warn-already-built-jar">
  894. <echo level="warn" message="Cycle detected: CalculatorFX was already built"/>
  895. </target>
  896. <target depends="init,-deps-jar-init" name="deps-jar" unless="no.deps">
  897. <mkdir dir="${build.dir}"/>
  898. <touch file="${built-jar.properties}" verbose="false"/>
  899. <property file="${built-jar.properties}" prefix="already.built.jar."/>
  900. <antcall target="-warn-already-built-jar"/>
  901. <propertyfile file="${built-jar.properties}">
  902. <entry key="${basedir}" value=""/>
  903. </propertyfile>
  904. </target>
  905. <target depends="init,-check-automatic-build,-clean-after-automatic-build" name="-verify-automatic-build"/>
  906. <target depends="init" name="-check-automatic-build">
  907. <available file="${build.classes.dir}/.netbeans_automatic_build" property="netbeans.automatic.build"/>
  908. </target>
  909. <target depends="init" if="netbeans.automatic.build" name="-clean-after-automatic-build">
  910. <antcall target="clean"/>
  911. </target>
  912. <target depends="init,deps-jar" name="-pre-pre-compile">
  913. <mkdir dir="${build.classes.dir}"/>
  914. </target>
  915. <target name="-pre-compile">
  916. <!-- Empty placeholder for easier customization. -->
  917. <!-- You can override this target in the ../build.xml file. -->
  918. </target>
  919. <target if="do.depend.true" name="-compile-depend">
  920. <pathconvert property="build.generated.subdirs">
  921. <dirset dir="${build.generated.sources.dir}" erroronmissingdir="false">
  922. <include name="*"/>
  923. </dirset>
  924. </pathconvert>
  925. <j2seproject3:depend srcdir="${src.dir}:${build.generated.subdirs}"/>
  926. </target>
  927. <target depends="init,deps-jar,-pre-pre-compile,-pre-compile, -copy-persistence-xml,-compile-depend" if="have.sources" name="-do-compile">
  928. <j2seproject3:javac gensrcdir="${build.generated.sources.dir}"/>
  929. <copy todir="${build.classes.dir}">
  930. <fileset dir="${src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
  931. </copy>
  932. </target>
  933. <target if="has.persistence.xml" name="-copy-persistence-xml">
  934. <mkdir dir="${build.classes.dir}/META-INF"/>
  935. <copy todir="${build.classes.dir}/META-INF">
  936. <fileset dir="${meta.inf.dir}" includes="persistence.xml orm.xml"/>
  937. </copy>
  938. </target>
  939. <target name="-post-compile">
  940. <!-- Empty placeholder for easier customization. -->
  941. <!-- You can override this target in the ../build.xml file. -->
  942. </target>
  943. <target depends="init,deps-jar,-verify-automatic-build,-pre-pre-compile,-pre-compile,-do-compile,-post-compile" description="Compile project." name="compile"/>
  944. <target name="-pre-compile-single">
  945. <!-- Empty placeholder for easier customization. -->
  946. <!-- You can override this target in the ../build.xml file. -->
  947. </target>
  948. <target depends="init,deps-jar,-pre-pre-compile" name="-do-compile-single">
  949. <fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail>
  950. <j2seproject3:force-recompile/>
  951. <j2seproject3:javac excludes="" gensrcdir="${build.generated.sources.dir}" includes="${javac.includes}" sourcepath="${src.dir}"/>
  952. </target>
  953. <target name="-post-compile-single">
  954. <!-- Empty placeholder for easier customization. -->
  955. <!-- You can override this target in the ../build.xml file. -->
  956. </target>
  957. <target depends="init,deps-jar,-verify-automatic-build,-pre-pre-compile,-pre-compile-single,-do-compile-single,-post-compile-single" name="compile-single"/>
  958. <!--
  959. ====================
  960. JAR BUILDING SECTION
  961. ====================
  962. -->
  963. <target depends="init" name="-pre-pre-jar">
  964. <dirname file="${dist.jar}" property="dist.jar.dir"/>
  965. <mkdir dir="${dist.jar.dir}"/>
  966. </target>
  967. <target name="-pre-jar">
  968. <!-- Empty placeholder for easier customization. -->
  969. <!-- You can override this target in the ../build.xml file. -->
  970. </target>
  971. <target depends="init" if="do.archive" name="-do-jar-create-manifest" unless="manifest.available">
  972. <tempfile deleteonexit="true" destdir="${build.dir}" property="tmp.manifest.file"/>
  973. <touch file="${tmp.manifest.file}" verbose="false"/>
  974. </target>
  975. <target depends="init" if="do.archive+manifest.available" name="-do-jar-copy-manifest">
  976. <tempfile deleteonexit="true" destdir="${build.dir}" property="tmp.manifest.file"/>
  977. <copy encoding="${manifest.encoding}" file="${manifest.file}" outputencoding="UTF-8" tofile="${tmp.manifest.file}"/>
  978. </target>
  979. <target depends="init,-do-jar-create-manifest,-do-jar-copy-manifest" if="do.archive+main.class.available" name="-do-jar-set-mainclass">
  980. <manifest encoding="UTF-8" file="${tmp.manifest.file}" mode="update">
  981. <attribute name="Main-Class" value="${main.class}"/>
  982. </manifest>
  983. </target>
  984. <target depends="init,-do-jar-create-manifest,-do-jar-copy-manifest" if="do.archive+profile.available" name="-do-jar-set-profile">
  985. <manifest encoding="UTF-8" file="${tmp.manifest.file}" mode="update">
  986. <attribute name="Profile" value="${javac.profile}"/>
  987. </manifest>
  988. </target>
  989. <target depends="init,-do-jar-create-manifest,-do-jar-copy-manifest" if="do.archive+splashscreen.available" name="-do-jar-set-splashscreen">
  990. <basename file="${application.splash}" property="splashscreen.basename"/>
  991. <mkdir dir="${build.classes.dir}/META-INF"/>
  992. <copy failonerror="false" file="${application.splash}" todir="${build.classes.dir}/META-INF"/>
  993. <manifest encoding="UTF-8" file="${tmp.manifest.file}" mode="update">
  994. <attribute name="SplashScreen-Image" value="META-INF/${splashscreen.basename}"/>
  995. </manifest>
  996. </target>
  997. <target depends="init,-init-macrodef-copylibs,compile,-pre-pre-jar,-pre-jar,-do-jar-create-manifest,-do-jar-copy-manifest,-do-jar-set-mainclass,-do-jar-set-profile,-do-jar-set-splashscreen" if="do.mkdist" name="-do-jar-copylibs">
  998. <j2seproject3:copylibs manifest="${tmp.manifest.file}"/>
  999. <echo level="info">To run this application from the command line without Ant, try:</echo>
  1000. <property location="${dist.jar}" name="dist.jar.resolved"/>
  1001. <echo level="info">java -jar "${dist.jar.resolved}"</echo>
  1002. </target>
  1003. <target depends="init,compile,-pre-pre-jar,-pre-jar,-do-jar-create-manifest,-do-jar-copy-manifest,-do-jar-set-mainclass,-do-jar-set-profile,-do-jar-set-splashscreen" if="do.archive" name="-do-jar-jar" unless="do.mkdist">
  1004. <j2seproject1:jar manifest="${tmp.manifest.file}"/>
  1005. <property location="${build.classes.dir}" name="build.classes.dir.resolved"/>
  1006. <property location="${dist.jar}" name="dist.jar.resolved"/>
  1007. <pathconvert property="run.classpath.with.dist.jar">
  1008. <path path="${run.classpath}"/>
  1009. <map from="${build.classes.dir.resolved}" to="${dist.jar.resolved}"/>
  1010. </pathconvert>
  1011. <condition else="" property="jar.usage.message" value="To run this application from the command line without Ant, try:${line.separator}${platform.java} -cp ${run.classpath.with.dist.jar} ${main.class}">
  1012. <isset property="main.class.available"/>
  1013. </condition>
  1014. <condition else="debug" property="jar.usage.level" value="info">
  1015. <isset property="main.class.available"/>
  1016. </condition>
  1017. <echo level="${jar.usage.level}" message="${jar.usage.message}"/>
  1018. </target>
  1019. <target depends="-do-jar-copylibs" if="do.archive" name="-do-jar-delete-manifest">
  1020. <delete>
  1021. <fileset file="${tmp.manifest.file}"/>
  1022. </delete>
  1023. </target>
  1024. <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"/>
  1025. <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"/>
  1026. <target depends="-jfx-copylibs,-rebase-libs,jfx-deployment" name="-post-jar">
  1027. <!-- Empty placeholder for easier customization. -->
  1028. <!-- You can override this target in the ../build.xml file. -->
  1029. </target>
  1030. <target depends="init,compile,-pre-jar,-do-jar-without-libraries,-do-jar-with-libraries,-post-jar" name="-do-jar"/>
  1031. <target depends="init,compile,-pre-jar,-do-jar,-post-jar" description="Build JAR." name="jar"/>
  1032. <!--
  1033. =================
  1034. EXECUTION SECTION
  1035. =================
  1036. -->
  1037. <target depends="init,compile,jar" description="Run a main class." name="run">
  1038. <j2seproject1:java>
  1039. <customize>
  1040. <arg line="${application.args}"/>
  1041. </customize>
  1042. </j2seproject1:java>
  1043. </target>
  1044. <target name="-do-not-recompile">
  1045. <property name="javac.includes.binary" value=""/>
  1046. </target>
  1047. <target depends="init,compile-single" name="run-single">
  1048. <fail unless="run.class">Must select one file in the IDE or set run.class</fail>
  1049. <j2seproject1:java classname="${run.class}"/>
  1050. </target>
  1051. <target depends="init,compile-test-single" name="run-test-with-main">
  1052. <fail unless="run.class">Must select one file in the IDE or set run.class</fail>
  1053. <j2seproject1:java classname="${run.class}" classpath="${run.test.classpath}"/>
  1054. </target>
  1055. <!--
  1056. =================
  1057. DEBUGGING SECTION
  1058. =================
  1059. -->
  1060. <target depends="init" if="netbeans.home" name="-debug-start-debugger">
  1061. <j2seproject1:nbjpdastart name="${debug.class}"/>
  1062. </target>
  1063. <target depends="init" if="netbeans.home" name="-debug-start-debugger-main-test">
  1064. <j2seproject1:nbjpdastart classpath="${debug.test.classpath}" name="${debug.class}"/>
  1065. </target>
  1066. <target depends="init,compile" name="-debug-start-debuggee">
  1067. <j2seproject3:debug>
  1068. <customize>
  1069. <arg line="${application.args}"/>
  1070. </customize>
  1071. </j2seproject3:debug>
  1072. </target>
  1073. <target depends="init,compile,-debug-start-debugger,-debug-start-debuggee,jar" description="Debug project in IDE." if="netbeans.home" name="debug"/>
  1074. <target depends="init" if="netbeans.home" name="-debug-start-debugger-stepinto">
  1075. <j2seproject1:nbjpdastart stopclassname="${main.class}"/>
  1076. </target>
  1077. <target depends="init,compile,-debug-start-debugger-stepinto,-debug-start-debuggee" if="netbeans.home" name="debug-stepinto"/>
  1078. <target depends="init,compile-single" if="netbeans.home" name="-debug-start-debuggee-single">
  1079. <fail unless="debug.class">Must select one file in the IDE or set debug.class</fail>
  1080. <j2seproject3:debug classname="${debug.class}"/>
  1081. </target>
  1082. <target depends="init,compile-single,-debug-start-debugger,-debug-start-debuggee-single" if="netbeans.home" name="debug-single"/>
  1083. <target depends="init,compile-test-single" if="netbeans.home" name="-debug-start-debuggee-main-test">
  1084. <fail unless="debug.class">Must select one file in the IDE or set debug.class</fail>
  1085. <j2seproject3:debug classname="${debug.class}" classpath="${debug.test.classpath}"/>
  1086. </target>
  1087. <target depends="init,compile-test-single,-debug-start-debugger-main-test,-debug-start-debuggee-main-test" if="netbeans.home" name="debug-test-with-main"/>
  1088. <target depends="init" name="-pre-debug-fix">
  1089. <fail unless="fix.includes">Must set fix.includes</fail>
  1090. <property name="javac.includes" value="${fix.includes}.java"/>
  1091. </target>
  1092. <target depends="init,-pre-debug-fix,compile-single" if="netbeans.home" name="-do-debug-fix">
  1093. <j2seproject1:nbjpdareload/>
  1094. </target>
  1095. <target depends="init,-pre-debug-fix,-do-debug-fix" if="netbeans.home" name="debug-fix"/>
  1096. <!--
  1097. =================
  1098. PROFILING SECTION
  1099. =================
  1100. -->
  1101. <!--
  1102. pre NB7.2 profiler integration
  1103. -->
  1104. <target depends="profile-init,compile" description="Profile a project in the IDE." if="profiler.info.jvmargs.agent" name="-profile-pre72">
  1105. <fail unless="netbeans.home">This target only works when run from inside the NetBeans IDE.</fail>
  1106. <nbprofiledirect>
  1107. <classpath>
  1108. <path path="${run.classpath}"/>
  1109. </classpath>
  1110. </nbprofiledirect>
  1111. <profile/>
  1112. </target>
  1113. <target depends="profile-init,compile-single" description="Profile a selected class in the IDE." if="profiler.info.jvmargs.agent" name="-profile-single-pre72">
  1114. <fail unless="profile.class">Must select one file in the IDE or set profile.class</fail>
  1115. <fail unless="netbeans.home">This target only works when run from inside the NetBeans IDE.</fail>
  1116. <nbprofiledirect>
  1117. <classpath>
  1118. <path path="${run.classpath}"/>
  1119. </classpath>
  1120. </nbprofiledirect>
  1121. <profile classname="${profile.class}"/>
  1122. </target>
  1123. <target depends="profile-init,compile-single" if="profiler.info.jvmargs.agent" name="-profile-applet-pre72">
  1124. <fail unless="netbeans.home">This target only works when run from inside the NetBeans IDE.</fail>
  1125. <nbprofiledirect>
  1126. <classpath>
  1127. <path path="${run.classpath}"/>
  1128. </classpath>
  1129. </nbprofiledirect>
  1130. <profile classname="sun.applet.AppletViewer">
  1131. <customize>
  1132. <arg value="${applet.url}"/>
  1133. </customize>
  1134. </profile>
  1135. </target>
  1136. <target depends="profile-init,compile-test-single" if="profiler.info.jvmargs.agent" name="-profile-test-single-pre72">
  1137. <fail unless="netbeans.home">This target only works when run from inside the NetBeans IDE.</fail>
  1138. <nbprofiledirect>
  1139. <classpath>
  1140. <path path="${run.test.classpath}"/>
  1141. </classpath>
  1142. </nbprofiledirect>
  1143. <junit dir="${profiler.info.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" jvm="${profiler.info.jvm}" showoutput="true">
  1144. <env key="${profiler.info.pathvar}" path="${profiler.info.agentpath}:${profiler.current.path}"/>
  1145. <jvmarg value="${profiler.info.jvmargs.agent}"/>
  1146. <jvmarg line="${profiler.info.jvmargs}"/>
  1147. <test name="${profile.class}"/>
  1148. <classpath>
  1149. <path path="${run.test.classpath}"/>
  1150. </classpath>
  1151. <syspropertyset>
  1152. <propertyref prefix="test-sys-prop."/>
  1153. <mapper from="test-sys-prop.*" to="*" type="glob"/>
  1154. </syspropertyset>
  1155. <formatter type="brief" usefile="false"/>
  1156. <formatter type="xml"/>
  1157. </junit>
  1158. </target>
  1159. <!--
  1160. end of pre NB72 profiling section
  1161. -->
  1162. <target if="netbeans.home" name="-profile-check">
  1163. <condition property="profiler.configured">
  1164. <or>
  1165. <contains casesensitive="true" string="${run.jvmargs.ide}" substring="-agentpath:"/>
  1166. <contains casesensitive="true" string="${run.jvmargs.ide}" substring="-javaagent:"/>
  1167. </or>
  1168. </condition>
  1169. </target>
  1170. <target depends="-profile-check,-profile-pre72,jar" description="Profile a project in the IDE." if="profiler.configured" name="profile" unless="profiler.info.jvmargs.agent">
  1171. <startprofiler/>
  1172. <antcall target="run"/>
  1173. </target>
  1174. <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">
  1175. <fail unless="run.class">Must select one file in the IDE or set run.class</fail>
  1176. <startprofiler/>
  1177. <antcall target="run-single"/>
  1178. </target>
  1179. <target depends="-profile-test-single-pre72" description="Profile a selected test in the IDE." name="profile-test-single"/>
  1180. <target depends="-profile-check" description="Profile a selected test in the IDE." if="profiler.configured" name="profile-test" unless="profiler.info.jvmargs">
  1181. <fail unless="test.includes">Must select some files in the IDE or set test.includes</fail>
  1182. <startprofiler/>
  1183. <antcall target="test-single"/>
  1184. </target>
  1185. <target depends="-profile-check" description="Profile a selected class in the IDE." if="profiler.configured" name="profile-test-with-main">
  1186. <fail unless="run.class">Must select one file in the IDE or set run.class</fail>
  1187. <startprofiler/>
  1188. <antcall target="run-test-with-main"/>
  1189. </target>
  1190. <target depends="-profile-check,-profile-applet-pre72" if="profiler.configured" name="profile-applet" unless="profiler.info.jvmargs.agent">
  1191. <fail unless="applet.url">Must select one file in the IDE or set applet.url</fail>
  1192. <startprofiler/>
  1193. <antcall target="run-applet"/>
  1194. </target>
  1195. <!--
  1196. ===============
  1197. JAVADOC SECTION
  1198. ===============
  1199. -->
  1200. <target depends="init" if="have.sources" name="-javadoc-build">
  1201. <mkdir dir="${dist.javadoc.dir}"/>
  1202. <condition else="" property="javadoc.endorsed.classpath.cmd.line.arg" value="-J${endorsed.classpath.cmd.line.arg}">
  1203. <and>
  1204. <isset property="endorsed.classpath.cmd.line.arg"/>
  1205. <not>
  1206. <equals arg1="${endorsed.classpath.cmd.line.arg}" arg2=""/>
  1207. </not>
  1208. </and>
  1209. </condition>
  1210. <condition else="" property="bug5101868workaround" value="*.java">
  1211. <matches pattern="1\.[56](\..*)?" string="${java.version}"/>
  1212. </condition>
  1213. <javadoc additionalparam="-J-Dfile.encoding=${file.encoding} ${javadoc.additionalparam}" author="${javadoc.author}" charset="UTF-8" destdir="${dist.javadoc.dir}" docencoding="UTF-8" encoding="${javadoc.encoding.used}" failonerror="true" noindex="${javadoc.noindex}" nonavbar="${javadoc.nonavbar}" notree="${javadoc.notree}" private="${javadoc.private}" source="${javac.source}" splitindex="${javadoc.splitindex}" use="${javadoc.use}" useexternalfile="true" version="${javadoc.version}" windowtitle="${javadoc.windowtitle}">
  1214. <classpath>
  1215. <path path="${javac.classpath}"/>
  1216. </classpath>
  1217. <fileset dir="${src.dir}" excludes="${bug5101868workaround},${excludes}" includes="${includes}">
  1218. <filename name="**/*.java"/>
  1219. </fileset>
  1220. <fileset dir="${build.generated.sources.dir}" erroronmissingdir="false">
  1221. <include name="**/*.java"/>
  1222. <exclude name="*.java"/>
  1223. </fileset>
  1224. <arg line="${javadoc.endorsed.classpath.cmd.line.arg}"/>
  1225. </javadoc>
  1226. <copy todir="${dist.javadoc.dir}">
  1227. <fileset dir="${src.dir}" excludes="${excludes}" includes="${includes}">
  1228. <filename name="**/doc-files/**"/>
  1229. </fileset>
  1230. <fileset dir="${build.generated.sources.dir}" erroronmissingdir="false">
  1231. <include name="**/doc-files/**"/>
  1232. </fileset>
  1233. </copy>
  1234. </target>
  1235. <target depends="init,-javadoc-build" if="netbeans.home" name="-javadoc-browse" unless="no.javadoc.preview">
  1236. <nbbrowse file="${dist.javadoc.dir}/index.html"/>
  1237. </target>
  1238. <target depends="init,-javadoc-build,-javadoc-browse" description="Build Javadoc." name="javadoc"/>
  1239. <!--
  1240. =========================
  1241. TEST COMPILATION SECTION
  1242. =========================
  1243. -->
  1244. <target depends="init,compile" if="have.tests" name="-pre-pre-compile-test">
  1245. <mkdir dir="${build.test.classes.dir}"/>
  1246. </target>
  1247. <target name="-pre-compile-test">
  1248. <!-- Empty placeholder for easier customization. -->
  1249. <!-- You can override this target in the ../build.xml file. -->
  1250. </target>
  1251. <target if="do.depend.true" name="-compile-test-depend">
  1252. <j2seproject3:depend classpath="${javac.test.classpath}" destdir="${build.test.classes.dir}" srcdir="${test.src.dir}"/>
  1253. </target>
  1254. <target depends="init,deps-jar,compile,-pre-pre-compile-test,-pre-compile-test,-compile-test-depend" if="have.tests" name="-do-compile-test">
  1255. <j2seproject3:javac apgeneratedsrcdir="${build.test.classes.dir}" classpath="${javac.test.classpath}" debug="true" destdir="${build.test.classes.dir}" processorpath="${javac.test.processorpath}" srcdir="${test.src.dir}"/>
  1256. <copy todir="${build.test.classes.dir}">
  1257. <fileset dir="${test.src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
  1258. </copy>
  1259. </target>
  1260. <target name="-post-compile-test">
  1261. <!-- Empty placeholder for easier customization. -->
  1262. <!-- You can override this target in the ../build.xml file. -->
  1263. </target>
  1264. <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test,-do-compile-test,-post-compile-test" name="compile-test"/>
  1265. <target name="-pre-compile-test-single">
  1266. <!-- Empty placeholder for easier customization. -->
  1267. <!-- You can override this target in the ../build.xml file. -->
  1268. </target>
  1269. <target depends="init,deps-jar,compile,-pre-pre-compile-test,-pre-compile-test-single" if="have.tests" name="-do-compile-test-single">
  1270. <fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail>
  1271. <j2seproject3:force-recompile destdir="${build.test.classes.dir}"/>
  1272. <j2seproject3:javac apgeneratedsrcdir="${build.test.classes.dir}" classpath="${javac.test.classpath}" debug="true" destdir="${build.test.classes.dir}" excludes="" includes="${javac.includes}" processorpath="${javac.test.processorpath}" sourcepath="${test.src.dir}" srcdir="${test.src.dir}"/>
  1273. <copy todir="${build.test.classes.dir}">
  1274. <fileset dir="${test.src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
  1275. </copy>
  1276. </target>
  1277. <target name="-post-compile-test-single">
  1278. <!-- Empty placeholder for easier customization. -->
  1279. <!-- You can override this target in the ../build.xml file. -->
  1280. </target>
  1281. <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test-single,-do-compile-test-single,-post-compile-test-single" name="compile-test-single"/>
  1282. <!--
  1283. =======================
  1284. TEST EXECUTION SECTION
  1285. =======================
  1286. -->
  1287. <target depends="init" if="have.tests" name="-pre-test-run">
  1288. <mkdir dir="${build.test.results.dir}"/>
  1289. </target>
  1290. <target depends="init,compile-test,-pre-test-run" if="have.tests" name="-do-test-run">
  1291. <j2seproject3:test includes="${includes}" testincludes="**/*Test.java"/>
  1292. </target>
  1293. <target depends="init,compile-test,-pre-test-run,-do-test-run" if="have.tests" name="-post-test-run">
  1294. <fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail>
  1295. </target>
  1296. <target depends="init" if="have.tests" name="test-report"/>
  1297. <target depends="init" if="netbeans.home+have.tests" name="-test-browse"/>
  1298. <target depends="init,compile-test,-pre-test-run,-do-test-run,test-report,-post-test-run,-test-browse" description="Run unit tests." name="test"/>
  1299. <target depends="init" if="have.tests" name="-pre-test-run-single">
  1300. <mkdir dir="${build.test.results.dir}"/>
  1301. </target>
  1302. <target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-do-test-run-single">
  1303. <fail unless="test.includes">Must select some files in the IDE or set test.includes</fail>
  1304. <j2seproject3:test excludes="" includes="${test.includes}" testincludes="${test.includes}"/>
  1305. </target>
  1306. <target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single" if="have.tests" name="-post-test-run-single">
  1307. <fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail>
  1308. </target>
  1309. <target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single,-post-test-run-single" description="Run single unit test." name="test-single"/>
  1310. <target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-do-test-run-single-method">
  1311. <fail unless="test.class">Must select some files in the IDE or set test.class</fail>
  1312. <fail unless="test.method">Must select some method in the IDE or set test.method</fail>
  1313. <j2seproject3:test excludes="" includes="${javac.includes}" testincludes="${test.class}" testmethods="${test.method}"/>
  1314. </target>
  1315. <target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single-method" if="have.tests" name="-post-test-run-single-method">
  1316. <fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail>
  1317. </target>
  1318. <target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single-method,-post-test-run-single-method" description="Run single unit test." name="test-single-method"/>
  1319. <!--
  1320. =======================
  1321. TEST DEBUGGING SECTION
  1322. =======================
  1323. -->
  1324. <target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-debug-start-debuggee-test">
  1325. <fail unless="test.class">Must select one file in the IDE or set test.class</fail>
  1326. <j2seproject3:test-debug excludes="" includes="${javac.includes}" testClass="${test.class}" testincludes="${javac.includes}"/>
  1327. </target>
  1328. <target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-debug-start-debuggee-test-method">
  1329. <fail unless="test.class">Must select one file in the IDE or set test.class</fail>
  1330. <fail unless="test.method">Must select some method in the IDE or set test.method</fail>
  1331. <j2seproject3:test-debug excludes="" includes="${javac.includes}" testClass="${test.class}" testMethod="${test.method}" testincludes="${test.class}" testmethods="${test.method}"/>
  1332. </target>
  1333. <target depends="init,compile-test" if="netbeans.home+have.tests" name="-debug-start-debugger-test">
  1334. <j2seproject1:nbjpdastart classpath="${debug.test.classpath}" name="${test.class}"/>
  1335. </target>
  1336. <target depends="init,compile-test-single,-debug-start-debugger-test,-debug-start-debuggee-test" name="debug-test"/>
  1337. <target depends="init,compile-test-single,-debug-start-debugger-test,-debug-start-debuggee-test-method" name="debug-test-method"/>
  1338. <target depends="init,-pre-debug-fix,compile-test-single" if="netbeans.home" name="-do-debug-fix-test">
  1339. <j2seproject1:nbjpdareload dir="${build.test.classes.dir}"/>
  1340. </target>
  1341. <target depends="init,-pre-debug-fix,-do-debug-fix-test" if="netbeans.home" name="debug-fix-test"/>
  1342. <!--
  1343. =========================
  1344. APPLET EXECUTION SECTION
  1345. =========================
  1346. -->
  1347. <target depends="init,compile-single" name="run-applet">
  1348. <fail unless="applet.url">Must select one file in the IDE or set applet.url</fail>
  1349. <j2seproject1:java classname="sun.applet.AppletViewer">
  1350. <customize>
  1351. <arg value="${applet.url}"/>
  1352. </customize>
  1353. </j2seproject1:java>
  1354. </target>
  1355. <!--
  1356. =========================
  1357. APPLET DEBUGGING SECTION
  1358. =========================
  1359. -->
  1360. <target depends="init,compile-single" if="netbeans.home" name="-debug-start-debuggee-applet">
  1361. <fail unless="applet.url">Must select one file in the IDE or set applet.url</fail>
  1362. <j2seproject3:debug classname="sun.applet.AppletViewer">
  1363. <customize>
  1364. <arg value="${applet.url}"/>
  1365. </customize>
  1366. </j2seproject3:debug>
  1367. </target>
  1368. <target depends="init,compile-single,-debug-start-debugger,-debug-start-debuggee-applet" if="netbeans.home" name="debug-applet"/>
  1369. <!--
  1370. ===============
  1371. CLEANUP SECTION
  1372. ===============
  1373. -->
  1374. <target name="-deps-clean-init" unless="built-clean.properties">
  1375. <property location="${build.dir}/built-clean.properties" name="built-clean.properties"/>
  1376. <delete file="${built-clean.properties}" quiet="true"/>
  1377. </target>
  1378. <target if="already.built.clean.${basedir}" name="-warn-already-built-clean">
  1379. <echo level="warn" message="Cycle detected: CalculatorFX was already built"/>
  1380. </target>
  1381. <target depends="init,-deps-clean-init" name="deps-clean" unless="no.deps">
  1382. <mkdir dir="${build.dir}"/>
  1383. <touch file="${built-clean.properties}" verbose="false"/>
  1384. <property file="${built-clean.properties}" prefix="already.built.clean."/>
  1385. <antcall target="-warn-already-built-clean"/>
  1386. <propertyfile file="${built-clean.properties}">
  1387. <entry key="${basedir}" value=""/>
  1388. </propertyfile>
  1389. </target>
  1390. <target depends="init" name="-do-clean">
  1391. <delete dir="${build.dir}"/>
  1392. <delete dir="${dist.dir}" followsymlinks="false" includeemptydirs="true"/>
  1393. </target>
  1394. <target name="-post-clean">
  1395. <!-- Empty placeholder for easier customization. -->
  1396. <!-- You can override this target in the ../build.xml file. -->
  1397. </target>
  1398. <target depends="init,deps-clean,-do-clean,-post-clean" description="Clean build products." name="clean"/>
  1399. <target name="-check-call-dep">
  1400. <property file="${call.built.properties}" prefix="already.built."/>
  1401. <condition property="should.call.dep">
  1402. <and>
  1403. <not>
  1404. <isset property="already.built.${call.subproject}"/>
  1405. </not>
  1406. <available file="${call.script}"/>
  1407. </and>
  1408. </condition>
  1409. </target>
  1410. <target depends="-check-call-dep" if="should.call.dep" name="-maybe-call-dep">
  1411. <ant antfile="${call.script}" inheritall="false" target="${call.target}">
  1412. <propertyset>
  1413. <propertyref prefix="transfer."/>
  1414. <mapper from="transfer.*" to="*" type="glob"/>
  1415. </propertyset>
  1416. </ant>
  1417. </target>
  1418. </project>