build-impl.xml 75 KB

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