build-impl.xml 90 KB

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