build-impl.xml 89 KB

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