build-impl.xml 76 KB

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