build-impl.xml 93 KB

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