build-impl.xml 90 KB

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