build-impl.xml 69 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239
  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. - junit compilation
  14. - junit execution
  15. - junit 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.7.1 or higher.">
  22. <condition>
  23. <not>
  24. <antversion atleast="1.7.1"/>
  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-plugins.dir}"/>
  169. <available file="${src.terrain.dir}"/>
  170. <available file="${src.networking.dir}"/>
  171. <available file="${src.desktop.dir}"/>
  172. <available file="${src.desktop-fx.dir}"/>
  173. <available file="${src.games.dir}"/>
  174. <available file="${src.jbullet.dir}"/>
  175. <available file="${src.niftygui.dir}"/>
  176. <available file="${src.jogg.dir}"/>
  177. <available file="${src.lwjgl-oal.dir}"/>
  178. <available file="${src.lwjgl-ogl.dir}"/>
  179. <available file="${src.ogre.dir}"/>
  180. <available file="${src.blender.dir}"/>
  181. <available file="${src.pack.dir}"/>
  182. <available file="${src.jheora.dir}"/>
  183. <available file="${src.test.dir}"/>
  184. <available file="${src.tools.dir}"/>
  185. <available file="${src.xml.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="javac.compilerargs" value=""/>
  202. <property name="work.dir" value="${basedir}"/>
  203. <condition property="no.deps">
  204. <and>
  205. <istrue value="${no.dependencies}"/>
  206. </and>
  207. </condition>
  208. <property name="javac.debug" value="true"/>
  209. <property name="javadoc.preview" value="true"/>
  210. <property name="application.args" value=""/>
  211. <property name="source.encoding" value="${file.encoding}"/>
  212. <property name="runtime.encoding" value="${source.encoding}"/>
  213. <condition property="javadoc.encoding.used" value="${javadoc.encoding}">
  214. <and>
  215. <isset property="javadoc.encoding"/>
  216. <not>
  217. <equals arg1="${javadoc.encoding}" arg2=""/>
  218. </not>
  219. </and>
  220. </condition>
  221. <property name="javadoc.encoding.used" value="${source.encoding}"/>
  222. <property name="includes" value="**"/>
  223. <property name="excludes" value=""/>
  224. <property name="do.depend" value="false"/>
  225. <condition property="do.depend.true">
  226. <istrue value="${do.depend}"/>
  227. </condition>
  228. <path id="endorsed.classpath.path" path="${endorsed.classpath}"/>
  229. <condition else="" property="endorsed.classpath.cmd.line.arg" value="-Xbootclasspath/p:'${toString:endorsed.classpath.path}'">
  230. <length length="0" string="${endorsed.classpath}" when="greater"/>
  231. </condition>
  232. <condition else="false" property="jdkBug6558476">
  233. <and>
  234. <matches pattern="1\.[56]" string="${java.specification.version}"/>
  235. <not>
  236. <os family="unix"/>
  237. </not>
  238. </and>
  239. </condition>
  240. <property name="javac.fork" value="${jdkBug6558476}"/>
  241. <property name="jar.index" value="false"/>
  242. <property name="jar.index.metainf" value="${jar.index}"/>
  243. <available file="${meta.inf.dir}/persistence.xml" property="has.persistence.xml"/>
  244. </target>
  245. <target name="-post-init">
  246. <!-- Empty placeholder for easier customization. -->
  247. <!-- You can override this target in the ../build.xml file. -->
  248. </target>
  249. <target depends="-pre-init,-init-private,-init-libraries,-init-user,-init-project,-do-init" name="-init-check">
  250. <fail unless="src.core.dir">Must set src.core.dir</fail>
  251. <fail unless="src.core-data.dir">Must set src.core-data.dir</fail>
  252. <fail unless="src.core-plugins.dir">Must set src.core-plugins.dir</fail>
  253. <fail unless="src.terrain.dir">Must set src.terrain.dir</fail>
  254. <fail unless="src.networking.dir">Must set src.networking.dir</fail>
  255. <fail unless="src.desktop.dir">Must set src.desktop.dir</fail>
  256. <fail unless="src.desktop-fx.dir">Must set src.desktop-fx.dir</fail>
  257. <fail unless="src.games.dir">Must set src.games.dir</fail>
  258. <fail unless="src.jbullet.dir">Must set src.jbullet.dir</fail>
  259. <fail unless="src.niftygui.dir">Must set src.niftygui.dir</fail>
  260. <fail unless="src.jogg.dir">Must set src.jogg.dir</fail>
  261. <fail unless="src.lwjgl-oal.dir">Must set src.lwjgl-oal.dir</fail>
  262. <fail unless="src.lwjgl-ogl.dir">Must set src.lwjgl-ogl.dir</fail>
  263. <fail unless="src.ogre.dir">Must set src.ogre.dir</fail>
  264. <fail unless="src.blender.dir">Must set src.blender.dir</fail>
  265. <fail unless="src.pack.dir">Must set src.pack.dir</fail>
  266. <fail unless="src.jheora.dir">Must set src.jheora.dir</fail>
  267. <fail unless="src.test.dir">Must set src.test.dir</fail>
  268. <fail unless="src.tools.dir">Must set src.tools.dir</fail>
  269. <fail unless="src.xml.dir">Must set src.xml.dir</fail>
  270. <fail unless="test.test.dir">Must set test.test.dir</fail>
  271. <fail unless="build.dir">Must set build.dir</fail>
  272. <fail unless="dist.dir">Must set dist.dir</fail>
  273. <fail unless="build.classes.dir">Must set build.classes.dir</fail>
  274. <fail unless="dist.javadoc.dir">Must set dist.javadoc.dir</fail>
  275. <fail unless="build.test.classes.dir">Must set build.test.classes.dir</fail>
  276. <fail unless="build.test.results.dir">Must set build.test.results.dir</fail>
  277. <fail unless="build.classes.excludes">Must set build.classes.excludes</fail>
  278. <fail unless="dist.jar">Must set dist.jar</fail>
  279. </target>
  280. <target name="-init-macrodef-property">
  281. <macrodef name="property" uri="http://www.netbeans.org/ns/j2se-project/1">
  282. <attribute name="name"/>
  283. <attribute name="value"/>
  284. <sequential>
  285. <property name="@{name}" value="${@{value}}"/>
  286. </sequential>
  287. </macrodef>
  288. </target>
  289. <target depends="-init-ap-cmdline-properties" if="ap.supported.internal" name="-init-macrodef-javac-with-processors">
  290. <macrodef name="javac" uri="http://www.netbeans.org/ns/j2se-project/3">
  291. <attribute default="${src.core.dir}:${src.core-data.dir}:${src.core-plugins.dir}:${src.terrain.dir}:${src.networking.dir}:${src.desktop.dir}:${src.desktop-fx.dir}:${src.games.dir}:${src.jbullet.dir}:${src.niftygui.dir}:${src.jogg.dir}:${src.lwjgl-oal.dir}:${src.lwjgl-ogl.dir}:${src.ogre.dir}:${src.blender.dir}:${src.pack.dir}:${src.jheora.dir}:${src.test.dir}:${src.tools.dir}:${src.xml.dir}" name="srcdir"/>
  292. <attribute default="${build.classes.dir}" name="destdir"/>
  293. <attribute default="${javac.classpath}" name="classpath"/>
  294. <attribute default="${javac.processorpath}" name="processorpath"/>
  295. <attribute default="${build.generated.sources.dir}/ap-source-output" name="apgeneratedsrcdir"/>
  296. <attribute default="${includes}" name="includes"/>
  297. <attribute default="${excludes}" name="excludes"/>
  298. <attribute default="${javac.debug}" name="debug"/>
  299. <attribute default="${empty.dir}" name="sourcepath"/>
  300. <attribute default="${empty.dir}" name="gensrcdir"/>
  301. <element name="customize" optional="true"/>
  302. <sequential>
  303. <property location="${build.dir}/empty" name="empty.dir"/>
  304. <mkdir dir="${empty.dir}"/>
  305. <mkdir dir="@{apgeneratedsrcdir}"/>
  306. <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}">
  307. <src>
  308. <dirset dir="@{gensrcdir}" erroronmissingdir="false">
  309. <include name="*"/>
  310. </dirset>
  311. </src>
  312. <classpath>
  313. <path path="@{classpath}"/>
  314. </classpath>
  315. <compilerarg line="${endorsed.classpath.cmd.line.arg}"/>
  316. <compilerarg line="${javac.compilerargs}"/>
  317. <compilerarg value="-processorpath"/>
  318. <compilerarg path="@{processorpath}:${empty.dir}"/>
  319. <compilerarg line="${ap.processors.internal}"/>
  320. <compilerarg line="${annotation.processing.processor.options}"/>
  321. <compilerarg value="-s"/>
  322. <compilerarg path="@{apgeneratedsrcdir}"/>
  323. <compilerarg line="${ap.proc.none.internal}"/>
  324. <customize/>
  325. </javac>
  326. </sequential>
  327. </macrodef>
  328. </target>
  329. <target depends="-init-ap-cmdline-properties" name="-init-macrodef-javac-without-processors" unless="ap.supported.internal">
  330. <macrodef name="javac" uri="http://www.netbeans.org/ns/j2se-project/3">
  331. <attribute default="${src.core.dir}:${src.core-data.dir}:${src.core-plugins.dir}:${src.terrain.dir}:${src.networking.dir}:${src.desktop.dir}:${src.desktop-fx.dir}:${src.games.dir}:${src.jbullet.dir}:${src.niftygui.dir}:${src.jogg.dir}:${src.lwjgl-oal.dir}:${src.lwjgl-ogl.dir}:${src.ogre.dir}:${src.blender.dir}:${src.pack.dir}:${src.jheora.dir}:${src.test.dir}:${src.tools.dir}:${src.xml.dir}" name="srcdir"/>
  332. <attribute default="${build.classes.dir}" name="destdir"/>
  333. <attribute default="${javac.classpath}" name="classpath"/>
  334. <attribute default="${javac.processorpath}" name="processorpath"/>
  335. <attribute default="${build.generated.sources.dir}/ap-source-output" name="apgeneratedsrcdir"/>
  336. <attribute default="${includes}" name="includes"/>
  337. <attribute default="${excludes}" name="excludes"/>
  338. <attribute default="${javac.debug}" name="debug"/>
  339. <attribute default="${empty.dir}" name="sourcepath"/>
  340. <attribute default="${empty.dir}" name="gensrcdir"/>
  341. <element name="customize" optional="true"/>
  342. <sequential>
  343. <property location="${build.dir}/empty" name="empty.dir"/>
  344. <mkdir dir="${empty.dir}"/>
  345. <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}">
  346. <src>
  347. <dirset dir="@{gensrcdir}" erroronmissingdir="false">
  348. <include name="*"/>
  349. </dirset>
  350. </src>
  351. <classpath>
  352. <path path="@{classpath}"/>
  353. </classpath>
  354. <compilerarg line="${endorsed.classpath.cmd.line.arg}"/>
  355. <compilerarg line="${javac.compilerargs}"/>
  356. <customize/>
  357. </javac>
  358. </sequential>
  359. </macrodef>
  360. </target>
  361. <target depends="-init-macrodef-javac-with-processors,-init-macrodef-javac-without-processors" name="-init-macrodef-javac">
  362. <macrodef name="depend" uri="http://www.netbeans.org/ns/j2se-project/3">
  363. <attribute default="${src.core.dir}:${src.core-data.dir}:${src.core-plugins.dir}:${src.terrain.dir}:${src.networking.dir}:${src.desktop.dir}:${src.desktop-fx.dir}:${src.games.dir}:${src.jbullet.dir}:${src.niftygui.dir}:${src.jogg.dir}:${src.lwjgl-oal.dir}:${src.lwjgl-ogl.dir}:${src.ogre.dir}:${src.blender.dir}:${src.pack.dir}:${src.jheora.dir}:${src.test.dir}:${src.tools.dir}:${src.xml.dir}" name="srcdir"/>
  364. <attribute default="${build.classes.dir}" name="destdir"/>
  365. <attribute default="${javac.classpath}" name="classpath"/>
  366. <sequential>
  367. <depend cache="${build.dir}/depcache" destdir="@{destdir}" excludes="${excludes}" includes="${includes}" srcdir="@{srcdir}">
  368. <classpath>
  369. <path path="@{classpath}"/>
  370. </classpath>
  371. </depend>
  372. </sequential>
  373. </macrodef>
  374. <macrodef name="force-recompile" uri="http://www.netbeans.org/ns/j2se-project/3">
  375. <attribute default="${build.classes.dir}" name="destdir"/>
  376. <sequential>
  377. <fail unless="javac.includes">Must set javac.includes</fail>
  378. <pathconvert pathsep="${line.separator}" property="javac.includes.binary">
  379. <path>
  380. <filelist dir="@{destdir}" files="${javac.includes}"/>
  381. </path>
  382. <globmapper from="*.java" to="*.class"/>
  383. </pathconvert>
  384. <tempfile deleteonexit="true" property="javac.includesfile.binary"/>
  385. <echo file="${javac.includesfile.binary}" message="${javac.includes.binary}"/>
  386. <delete>
  387. <files includesfile="${javac.includesfile.binary}"/>
  388. </delete>
  389. <delete>
  390. <fileset file="${javac.includesfile.binary}"/>
  391. </delete>
  392. </sequential>
  393. </macrodef>
  394. </target>
  395. <target name="-init-macrodef-junit">
  396. <macrodef name="junit" uri="http://www.netbeans.org/ns/j2se-project/3">
  397. <attribute default="${includes}" name="includes"/>
  398. <attribute default="${excludes}" name="excludes"/>
  399. <attribute default="**" name="testincludes"/>
  400. <sequential>
  401. <property name="junit.forkmode" value="perTest"/>
  402. <junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" forkmode="${junit.forkmode}" showoutput="true" tempdir="${build.dir}">
  403. <batchtest todir="${build.test.results.dir}">
  404. <fileset dir="${test.test.dir}" excludes="@{excludes},${excludes}" includes="@{includes}">
  405. <filename name="@{testincludes}"/>
  406. </fileset>
  407. </batchtest>
  408. <classpath>
  409. <path path="${run.test.classpath}"/>
  410. </classpath>
  411. <syspropertyset>
  412. <propertyref prefix="test-sys-prop."/>
  413. <mapper from="test-sys-prop.*" to="*" type="glob"/>
  414. </syspropertyset>
  415. <formatter type="brief" usefile="false"/>
  416. <formatter type="xml"/>
  417. <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
  418. <jvmarg value="-ea"/>
  419. <jvmarg line="${run.jvmargs}"/>
  420. </junit>
  421. </sequential>
  422. </macrodef>
  423. </target>
  424. <target depends="-profile-pre-init, init, -profile-post-init, -profile-init-macrodef-profile, -profile-init-check" name="profile-init"/>
  425. <target name="-profile-pre-init">
  426. <!-- Empty placeholder for easier customization. -->
  427. <!-- You can override this target in the ../build.xml file. -->
  428. </target>
  429. <target name="-profile-post-init">
  430. <!-- Empty placeholder for easier customization. -->
  431. <!-- You can override this target in the ../build.xml file. -->
  432. </target>
  433. <target name="-profile-init-macrodef-profile">
  434. <macrodef name="resolve">
  435. <attribute name="name"/>
  436. <attribute name="value"/>
  437. <sequential>
  438. <property name="@{name}" value="${env.@{value}}"/>
  439. </sequential>
  440. </macrodef>
  441. <macrodef name="profile">
  442. <attribute default="${main.class}" name="classname"/>
  443. <element name="customize" optional="true"/>
  444. <sequential>
  445. <property environment="env"/>
  446. <resolve name="profiler.current.path" value="${profiler.info.pathvar}"/>
  447. <java classname="@{classname}" dir="${profiler.info.dir}" fork="true" jvm="${profiler.info.jvm}">
  448. <jvmarg value="${profiler.info.jvmargs.agent}"/>
  449. <jvmarg line="${profiler.info.jvmargs}"/>
  450. <env key="${profiler.info.pathvar}" path="${profiler.info.agentpath}:${profiler.current.path}"/>
  451. <arg line="${application.args}"/>
  452. <classpath>
  453. <path path="${run.classpath}"/>
  454. </classpath>
  455. <syspropertyset>
  456. <propertyref prefix="run-sys-prop."/>
  457. <mapper from="run-sys-prop.*" to="*" type="glob"/>
  458. </syspropertyset>
  459. <customize/>
  460. </java>
  461. </sequential>
  462. </macrodef>
  463. </target>
  464. <target depends="-profile-pre-init, init, -profile-post-init, -profile-init-macrodef-profile" name="-profile-init-check">
  465. <fail unless="profiler.info.jvm">Must set JVM to use for profiling in profiler.info.jvm</fail>
  466. <fail unless="profiler.info.jvmargs.agent">Must set profiler agent JVM arguments in profiler.info.jvmargs.agent</fail>
  467. </target>
  468. <target depends="-init-debug-args" name="-init-macrodef-nbjpda">
  469. <macrodef name="nbjpdastart" uri="http://www.netbeans.org/ns/j2se-project/1">
  470. <attribute default="${main.class}" name="name"/>
  471. <attribute default="${debug.classpath}" name="classpath"/>
  472. <attribute default="" name="stopclassname"/>
  473. <sequential>
  474. <nbjpdastart addressproperty="jpda.address" name="@{name}" stopclassname="@{stopclassname}" transport="${debug-transport}">
  475. <classpath>
  476. <path path="@{classpath}"/>
  477. </classpath>
  478. </nbjpdastart>
  479. </sequential>
  480. </macrodef>
  481. <macrodef name="nbjpdareload" uri="http://www.netbeans.org/ns/j2se-project/1">
  482. <attribute default="${build.classes.dir}" name="dir"/>
  483. <sequential>
  484. <nbjpdareload>
  485. <fileset dir="@{dir}" includes="${fix.classes}">
  486. <include name="${fix.includes}*.class"/>
  487. </fileset>
  488. </nbjpdareload>
  489. </sequential>
  490. </macrodef>
  491. </target>
  492. <target name="-init-debug-args">
  493. <property name="version-output" value="java version &quot;${ant.java.version}"/>
  494. <condition property="have-jdk-older-than-1.4">
  495. <or>
  496. <contains string="${version-output}" substring="java version &quot;1.0"/>
  497. <contains string="${version-output}" substring="java version &quot;1.1"/>
  498. <contains string="${version-output}" substring="java version &quot;1.2"/>
  499. <contains string="${version-output}" substring="java version &quot;1.3"/>
  500. </or>
  501. </condition>
  502. <condition else="-Xdebug" property="debug-args-line" value="-Xdebug -Xnoagent -Djava.compiler=none">
  503. <istrue value="${have-jdk-older-than-1.4}"/>
  504. </condition>
  505. <condition else="dt_socket" property="debug-transport-by-os" value="dt_shmem">
  506. <os family="windows"/>
  507. </condition>
  508. <condition else="${debug-transport-by-os}" property="debug-transport" value="${debug.transport}">
  509. <isset property="debug.transport"/>
  510. </condition>
  511. </target>
  512. <target depends="-init-debug-args" name="-init-macrodef-debug">
  513. <macrodef name="debug" uri="http://www.netbeans.org/ns/j2se-project/3">
  514. <attribute default="${main.class}" name="classname"/>
  515. <attribute default="${debug.classpath}" name="classpath"/>
  516. <element name="customize" optional="true"/>
  517. <sequential>
  518. <java classname="@{classname}" dir="${work.dir}" fork="true">
  519. <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
  520. <jvmarg line="${debug-args-line}"/>
  521. <jvmarg value="-Xrunjdwp:transport=${debug-transport},address=${jpda.address}"/>
  522. <jvmarg value="-Dfile.encoding=${runtime.encoding}"/>
  523. <redirector errorencoding="${runtime.encoding}" inputencoding="${runtime.encoding}" outputencoding="${runtime.encoding}"/>
  524. <jvmarg line="${run.jvmargs}"/>
  525. <classpath>
  526. <path path="@{classpath}"/>
  527. </classpath>
  528. <syspropertyset>
  529. <propertyref prefix="run-sys-prop."/>
  530. <mapper from="run-sys-prop.*" to="*" type="glob"/>
  531. </syspropertyset>
  532. <customize/>
  533. </java>
  534. </sequential>
  535. </macrodef>
  536. </target>
  537. <target name="-init-macrodef-java">
  538. <macrodef name="java" uri="http://www.netbeans.org/ns/j2se-project/1">
  539. <attribute default="${main.class}" name="classname"/>
  540. <attribute default="${run.classpath}" name="classpath"/>
  541. <element name="customize" optional="true"/>
  542. <sequential>
  543. <java classname="@{classname}" dir="${work.dir}" fork="true">
  544. <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
  545. <jvmarg value="-Dfile.encoding=${runtime.encoding}"/>
  546. <redirector errorencoding="${runtime.encoding}" inputencoding="${runtime.encoding}" outputencoding="${runtime.encoding}"/>
  547. <jvmarg line="${run.jvmargs}"/>
  548. <classpath>
  549. <path path="@{classpath}"/>
  550. </classpath>
  551. <syspropertyset>
  552. <propertyref prefix="run-sys-prop."/>
  553. <mapper from="run-sys-prop.*" to="*" type="glob"/>
  554. </syspropertyset>
  555. <customize/>
  556. </java>
  557. </sequential>
  558. </macrodef>
  559. </target>
  560. <target name="-init-macrodef-copylibs">
  561. <macrodef name="copylibs" uri="http://www.netbeans.org/ns/j2se-project/3">
  562. <attribute default="${manifest.file}" name="manifest"/>
  563. <element name="customize" optional="true"/>
  564. <sequential>
  565. <property location="${build.classes.dir}" name="build.classes.dir.resolved"/>
  566. <pathconvert property="run.classpath.without.build.classes.dir">
  567. <path path="${run.classpath}"/>
  568. <map from="${build.classes.dir.resolved}" to=""/>
  569. </pathconvert>
  570. <pathconvert pathsep=" " property="jar.classpath">
  571. <path path="${run.classpath.without.build.classes.dir}"/>
  572. <chainedmapper>
  573. <flattenmapper/>
  574. <globmapper from="*" to="lib/*"/>
  575. </chainedmapper>
  576. </pathconvert>
  577. <taskdef classname="org.netbeans.modules.java.j2seproject.copylibstask.CopyLibs" classpath="${libs.CopyLibs.classpath}" name="copylibs"/>
  578. <copylibs compress="${jar.compress}" index="${jar.index}" indexMetaInf="${jar.index.metainf}" jarfile="${dist.jar}" manifest="@{manifest}" runtimeclasspath="${run.classpath.without.build.classes.dir}">
  579. <fileset dir="${build.classes.dir}"/>
  580. <manifest>
  581. <attribute name="Class-Path" value="${jar.classpath}"/>
  582. <customize/>
  583. </manifest>
  584. </copylibs>
  585. </sequential>
  586. </macrodef>
  587. </target>
  588. <target name="-init-presetdef-jar">
  589. <presetdef name="jar" uri="http://www.netbeans.org/ns/j2se-project/1">
  590. <jar compress="${jar.compress}" index="${jar.index}" jarfile="${dist.jar}">
  591. <j2seproject1:fileset dir="${build.classes.dir}"/>
  592. </jar>
  593. </presetdef>
  594. </target>
  595. <target name="-init-ap-cmdline-properties">
  596. <property name="annotation.processing.enabled" value="true"/>
  597. <property name="annotation.processing.processors.list" value=""/>
  598. <property name="annotation.processing.processor.options" value=""/>
  599. <property name="annotation.processing.run.all.processors" value="true"/>
  600. <property name="javac.processorpath" value="${javac.classpath}"/>
  601. <property name="javac.test.processorpath" value="${javac.test.classpath}"/>
  602. <condition property="ap.supported.internal" value="true">
  603. <not>
  604. <matches pattern="1\.[0-5](\..*)?" string="${javac.source}"/>
  605. </not>
  606. </condition>
  607. </target>
  608. <target depends="-init-ap-cmdline-properties" if="ap.supported.internal" name="-init-ap-cmdline-supported">
  609. <condition else="" property="ap.processors.internal" value="-processor ${annotation.processing.processors.list}">
  610. <isfalse value="${annotation.processing.run.all.processors}"/>
  611. </condition>
  612. <condition else="" property="ap.proc.none.internal" value="-proc:none">
  613. <isfalse value="${annotation.processing.enabled}"/>
  614. </condition>
  615. </target>
  616. <target depends="-init-ap-cmdline-properties,-init-ap-cmdline-supported" name="-init-ap-cmdline">
  617. <property name="ap.cmd.line.internal" value=""/>
  618. </target>
  619. <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-junit,-init-macrodef-nbjpda,-init-macrodef-debug,-init-macrodef-java,-init-presetdef-jar,-init-ap-cmdline" name="init"/>
  620. <!--
  621. ===================
  622. COMPILATION SECTION
  623. ===================
  624. -->
  625. <target name="-deps-jar-init" unless="built-jar.properties">
  626. <property location="${build.dir}/built-jar.properties" name="built-jar.properties"/>
  627. <delete file="${built-jar.properties}" quiet="true"/>
  628. </target>
  629. <target if="already.built.jar.${basedir}" name="-warn-already-built-jar">
  630. <echo level="warn" message="Cycle detected: jMonkeyEngine3 was already built"/>
  631. </target>
  632. <target depends="init,-deps-jar-init" name="deps-jar" unless="no.deps">
  633. <mkdir dir="${build.dir}"/>
  634. <touch file="${built-jar.properties}" verbose="false"/>
  635. <property file="${built-jar.properties}" prefix="already.built.jar."/>
  636. <antcall target="-warn-already-built-jar"/>
  637. <propertyfile file="${built-jar.properties}">
  638. <entry key="${basedir}" value=""/>
  639. </propertyfile>
  640. </target>
  641. <target depends="init,-check-automatic-build,-clean-after-automatic-build" name="-verify-automatic-build"/>
  642. <target depends="init" name="-check-automatic-build">
  643. <available file="${build.classes.dir}/.netbeans_automatic_build" property="netbeans.automatic.build"/>
  644. </target>
  645. <target depends="init" if="netbeans.automatic.build" name="-clean-after-automatic-build">
  646. <antcall target="clean"/>
  647. </target>
  648. <target depends="init,deps-jar" name="-pre-pre-compile">
  649. <mkdir dir="${build.classes.dir}"/>
  650. </target>
  651. <target name="-pre-compile">
  652. <!-- Empty placeholder for easier customization. -->
  653. <!-- You can override this target in the ../build.xml file. -->
  654. </target>
  655. <target if="do.depend.true" name="-compile-depend">
  656. <pathconvert property="build.generated.subdirs">
  657. <dirset dir="${build.generated.sources.dir}" erroronmissingdir="false">
  658. <include name="*"/>
  659. </dirset>
  660. </pathconvert>
  661. <j2seproject3:depend srcdir="${src.core.dir}:${src.core-data.dir}:${src.core-plugins.dir}:${src.terrain.dir}:${src.networking.dir}:${src.desktop.dir}:${src.desktop-fx.dir}:${src.games.dir}:${src.jbullet.dir}:${src.niftygui.dir}:${src.jogg.dir}:${src.lwjgl-oal.dir}:${src.lwjgl-ogl.dir}:${src.ogre.dir}:${src.blender.dir}:${src.pack.dir}:${src.jheora.dir}:${src.test.dir}:${src.tools.dir}:${src.xml.dir}:${build.generated.subdirs}"/>
  662. </target>
  663. <target depends="init,deps-jar,-pre-pre-compile,-pre-compile, -copy-persistence-xml,-compile-depend" if="have.sources" name="-do-compile">
  664. <j2seproject3:javac gensrcdir="${build.generated.sources.dir}"/>
  665. <copy todir="${build.classes.dir}">
  666. <fileset dir="${src.core.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
  667. <fileset dir="${src.core-data.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
  668. <fileset dir="${src.core-plugins.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
  669. <fileset dir="${src.terrain.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
  670. <fileset dir="${src.networking.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
  671. <fileset dir="${src.desktop.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
  672. <fileset dir="${src.desktop-fx.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
  673. <fileset dir="${src.games.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
  674. <fileset dir="${src.jbullet.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
  675. <fileset dir="${src.niftygui.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
  676. <fileset dir="${src.jogg.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
  677. <fileset dir="${src.lwjgl-oal.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
  678. <fileset dir="${src.lwjgl-ogl.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
  679. <fileset dir="${src.ogre.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
  680. <fileset dir="${src.blender.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
  681. <fileset dir="${src.pack.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
  682. <fileset dir="${src.jheora.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
  683. <fileset dir="${src.test.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
  684. <fileset dir="${src.tools.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
  685. <fileset dir="${src.xml.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
  686. </copy>
  687. </target>
  688. <target if="has.persistence.xml" name="-copy-persistence-xml">
  689. <mkdir dir="${build.classes.dir}/META-INF"/>
  690. <copy todir="${build.classes.dir}/META-INF">
  691. <fileset dir="${meta.inf.dir}" includes="persistence.xml"/>
  692. </copy>
  693. </target>
  694. <target name="-post-compile">
  695. <!-- Empty placeholder for easier customization. -->
  696. <!-- You can override this target in the ../build.xml file. -->
  697. </target>
  698. <target depends="init,deps-jar,-verify-automatic-build,-pre-pre-compile,-pre-compile,-do-compile,-post-compile" description="Compile project." name="compile"/>
  699. <target name="-pre-compile-single">
  700. <!-- Empty placeholder for easier customization. -->
  701. <!-- You can override this target in the ../build.xml file. -->
  702. </target>
  703. <target depends="init,deps-jar,-pre-pre-compile" name="-do-compile-single">
  704. <fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail>
  705. <j2seproject3:force-recompile/>
  706. <j2seproject3:javac excludes="" gensrcdir="${build.generated.sources.dir}" includes="${javac.includes}" sourcepath="${src.core.dir}:${src.core-data.dir}:${src.core-plugins.dir}:${src.terrain.dir}:${src.networking.dir}:${src.desktop.dir}:${src.desktop-fx.dir}:${src.games.dir}:${src.jbullet.dir}:${src.niftygui.dir}:${src.jogg.dir}:${src.lwjgl-oal.dir}:${src.lwjgl-ogl.dir}:${src.ogre.dir}:${src.blender.dir}:${src.pack.dir}:${src.jheora.dir}:${src.test.dir}:${src.tools.dir}:${src.xml.dir}"/>
  707. </target>
  708. <target name="-post-compile-single">
  709. <!-- Empty placeholder for easier customization. -->
  710. <!-- You can override this target in the ../build.xml file. -->
  711. </target>
  712. <target depends="init,deps-jar,-verify-automatic-build,-pre-pre-compile,-pre-compile-single,-do-compile-single,-post-compile-single" name="compile-single"/>
  713. <!--
  714. ====================
  715. JAR BUILDING SECTION
  716. ====================
  717. -->
  718. <target depends="init" name="-pre-pre-jar">
  719. <dirname file="${dist.jar}" property="dist.jar.dir"/>
  720. <mkdir dir="${dist.jar.dir}"/>
  721. </target>
  722. <target name="-pre-jar">
  723. <!-- Empty placeholder for easier customization. -->
  724. <!-- You can override this target in the ../build.xml file. -->
  725. </target>
  726. <target depends="init,compile,-pre-pre-jar,-pre-jar" if="do.archive" name="-do-jar-without-manifest" unless="manifest.available-mkdist.available">
  727. <j2seproject1:jar/>
  728. </target>
  729. <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">
  730. <j2seproject1:jar manifest="${manifest.file}"/>
  731. </target>
  732. <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">
  733. <j2seproject1:jar manifest="${manifest.file}">
  734. <j2seproject1:manifest>
  735. <j2seproject1:attribute name="Main-Class" value="${main.class}"/>
  736. </j2seproject1:manifest>
  737. </j2seproject1:jar>
  738. <echo level="info">To run this application from the command line without Ant, try:</echo>
  739. <property location="${build.classes.dir}" name="build.classes.dir.resolved"/>
  740. <property location="${dist.jar}" name="dist.jar.resolved"/>
  741. <pathconvert property="run.classpath.with.dist.jar">
  742. <path path="${run.classpath}"/>
  743. <map from="${build.classes.dir.resolved}" to="${dist.jar.resolved}"/>
  744. </pathconvert>
  745. <echo level="info">java -cp "${run.classpath.with.dist.jar}" ${main.class}</echo>
  746. </target>
  747. <target depends="init" if="do.archive" name="-do-jar-with-libraries-create-manifest" unless="manifest.available">
  748. <tempfile deleteonexit="true" destdir="${build.dir}" property="tmp.manifest.file"/>
  749. <touch file="${tmp.manifest.file}" verbose="false"/>
  750. </target>
  751. <target depends="init" if="do.archive+manifest.available" name="-do-jar-with-libraries-copy-manifest">
  752. <tempfile deleteonexit="true" destdir="${build.dir}" property="tmp.manifest.file"/>
  753. <copy file="${manifest.file}" tofile="${tmp.manifest.file}"/>
  754. </target>
  755. <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">
  756. <manifest file="${tmp.manifest.file}" mode="update">
  757. <attribute name="Main-Class" value="${main.class}"/>
  758. </manifest>
  759. </target>
  760. <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">
  761. <basename file="${application.splash}" property="splashscreen.basename"/>
  762. <mkdir dir="${build.classes.dir}/META-INF"/>
  763. <copy failonerror="false" file="${application.splash}" todir="${build.classes.dir}/META-INF"/>
  764. <manifest file="${tmp.manifest.file}" mode="update">
  765. <attribute name="SplashScreen-Image" value="META-INF/${splashscreen.basename}"/>
  766. </manifest>
  767. </target>
  768. <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">
  769. <j2seproject3:copylibs manifest="${tmp.manifest.file}"/>
  770. <echo level="info">To run this application from the command line without Ant, try:</echo>
  771. <property location="${dist.jar}" name="dist.jar.resolved"/>
  772. <echo level="info">java -jar "${dist.jar.resolved}"</echo>
  773. </target>
  774. <target depends="-do-jar-with-libraries-pack" if="do.archive" name="-do-jar-with-libraries-delete-manifest">
  775. <delete>
  776. <fileset file="${tmp.manifest.file}"/>
  777. </delete>
  778. </target>
  779. <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"/>
  780. <target name="-post-jar">
  781. <!-- Empty placeholder for easier customization. -->
  782. <!-- You can override this target in the ../build.xml file. -->
  783. </target>
  784. <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"/>
  785. <!--
  786. =================
  787. EXECUTION SECTION
  788. =================
  789. -->
  790. <target depends="init,compile" description="Run a main class." name="run">
  791. <j2seproject1:java>
  792. <customize>
  793. <arg line="${application.args}"/>
  794. </customize>
  795. </j2seproject1:java>
  796. </target>
  797. <target name="-do-not-recompile">
  798. <property name="javac.includes.binary" value=""/>
  799. </target>
  800. <target depends="init,compile-single" name="run-single">
  801. <fail unless="run.class">Must select one file in the IDE or set run.class</fail>
  802. <j2seproject1:java classname="${run.class}"/>
  803. </target>
  804. <target depends="init,compile-test-single" name="run-test-with-main">
  805. <fail unless="run.class">Must select one file in the IDE or set run.class</fail>
  806. <j2seproject1:java classname="${run.class}" classpath="${run.test.classpath}"/>
  807. </target>
  808. <!--
  809. =================
  810. DEBUGGING SECTION
  811. =================
  812. -->
  813. <target depends="init" if="netbeans.home" name="-debug-start-debugger">
  814. <j2seproject1:nbjpdastart name="${debug.class}"/>
  815. </target>
  816. <target depends="init" if="netbeans.home" name="-debug-start-debugger-main-test">
  817. <j2seproject1:nbjpdastart classpath="${debug.test.classpath}" name="${debug.class}"/>
  818. </target>
  819. <target depends="init,compile" name="-debug-start-debuggee">
  820. <j2seproject3:debug>
  821. <customize>
  822. <arg line="${application.args}"/>
  823. </customize>
  824. </j2seproject3:debug>
  825. </target>
  826. <target depends="init,compile,-debug-start-debugger,-debug-start-debuggee" description="Debug project in IDE." if="netbeans.home" name="debug"/>
  827. <target depends="init" if="netbeans.home" name="-debug-start-debugger-stepinto">
  828. <j2seproject1:nbjpdastart stopclassname="${main.class}"/>
  829. </target>
  830. <target depends="init,compile,-debug-start-debugger-stepinto,-debug-start-debuggee" if="netbeans.home" name="debug-stepinto"/>
  831. <target depends="init,compile-single" if="netbeans.home" name="-debug-start-debuggee-single">
  832. <fail unless="debug.class">Must select one file in the IDE or set debug.class</fail>
  833. <j2seproject3:debug classname="${debug.class}"/>
  834. </target>
  835. <target depends="init,compile-single,-debug-start-debugger,-debug-start-debuggee-single" if="netbeans.home" name="debug-single"/>
  836. <target depends="init,compile-test-single" if="netbeans.home" name="-debug-start-debuggee-main-test">
  837. <fail unless="debug.class">Must select one file in the IDE or set debug.class</fail>
  838. <j2seproject3:debug classname="${debug.class}" classpath="${debug.test.classpath}"/>
  839. </target>
  840. <target depends="init,compile-test-single,-debug-start-debugger-main-test,-debug-start-debuggee-main-test" if="netbeans.home" name="debug-test-with-main"/>
  841. <target depends="init" name="-pre-debug-fix">
  842. <fail unless="fix.includes">Must set fix.includes</fail>
  843. <property name="javac.includes" value="${fix.includes}.java"/>
  844. </target>
  845. <target depends="init,-pre-debug-fix,compile-single" if="netbeans.home" name="-do-debug-fix">
  846. <j2seproject1:nbjpdareload/>
  847. </target>
  848. <target depends="init,-pre-debug-fix,-do-debug-fix" if="netbeans.home" name="debug-fix"/>
  849. <!--
  850. =================
  851. PROFILING SECTION
  852. =================
  853. -->
  854. <target depends="profile-init,compile" description="Profile a project in the IDE." if="netbeans.home" name="profile">
  855. <nbprofiledirect>
  856. <classpath>
  857. <path path="${run.classpath}"/>
  858. </classpath>
  859. </nbprofiledirect>
  860. <profile/>
  861. </target>
  862. <target depends="profile-init,compile-single" description="Profile a selected class in the IDE." if="netbeans.home" name="profile-single">
  863. <fail unless="profile.class">Must select one file in the IDE or set profile.class</fail>
  864. <nbprofiledirect>
  865. <classpath>
  866. <path path="${run.classpath}"/>
  867. </classpath>
  868. </nbprofiledirect>
  869. <profile classname="${profile.class}"/>
  870. </target>
  871. <!--
  872. =========================
  873. APPLET PROFILING SECTION
  874. =========================
  875. -->
  876. <target depends="profile-init,compile-single" if="netbeans.home" name="profile-applet">
  877. <nbprofiledirect>
  878. <classpath>
  879. <path path="${run.classpath}"/>
  880. </classpath>
  881. </nbprofiledirect>
  882. <profile classname="sun.applet.AppletViewer">
  883. <customize>
  884. <arg value="${applet.url}"/>
  885. </customize>
  886. </profile>
  887. </target>
  888. <!--
  889. =========================
  890. TESTS PROFILING SECTION
  891. =========================
  892. -->
  893. <target depends="profile-init,compile-test-single" if="netbeans.home" name="profile-test-single">
  894. <nbprofiledirect>
  895. <classpath>
  896. <path path="${run.test.classpath}"/>
  897. </classpath>
  898. </nbprofiledirect>
  899. <junit dir="${profiler.info.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" jvm="${profiler.info.jvm}" showoutput="true">
  900. <env key="${profiler.info.pathvar}" path="${profiler.info.agentpath}:${profiler.current.path}"/>
  901. <jvmarg value="${profiler.info.jvmargs.agent}"/>
  902. <jvmarg line="${profiler.info.jvmargs}"/>
  903. <test name="${profile.class}"/>
  904. <classpath>
  905. <path path="${run.test.classpath}"/>
  906. </classpath>
  907. <syspropertyset>
  908. <propertyref prefix="test-sys-prop."/>
  909. <mapper from="test-sys-prop.*" to="*" type="glob"/>
  910. </syspropertyset>
  911. <formatter type="brief" usefile="false"/>
  912. <formatter type="xml"/>
  913. </junit>
  914. </target>
  915. <!--
  916. ===============
  917. JAVADOC SECTION
  918. ===============
  919. -->
  920. <target depends="init" if="have.sources" name="-javadoc-build">
  921. <mkdir dir="${dist.javadoc.dir}"/>
  922. <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}">
  923. <classpath>
  924. <path path="${javac.classpath}"/>
  925. </classpath>
  926. <fileset dir="${src.core.dir}" excludes="*.java,${excludes}" includes="${includes}">
  927. <filename name="**/*.java"/>
  928. </fileset>
  929. <fileset dir="${src.core-data.dir}" excludes="*.java,${excludes}" includes="${includes}">
  930. <filename name="**/*.java"/>
  931. </fileset>
  932. <fileset dir="${src.core-plugins.dir}" excludes="*.java,${excludes}" includes="${includes}">
  933. <filename name="**/*.java"/>
  934. </fileset>
  935. <fileset dir="${src.terrain.dir}" excludes="*.java,${excludes}" includes="${includes}">
  936. <filename name="**/*.java"/>
  937. </fileset>
  938. <fileset dir="${src.networking.dir}" excludes="*.java,${excludes}" includes="${includes}">
  939. <filename name="**/*.java"/>
  940. </fileset>
  941. <fileset dir="${src.desktop.dir}" excludes="*.java,${excludes}" includes="${includes}">
  942. <filename name="**/*.java"/>
  943. </fileset>
  944. <fileset dir="${src.desktop-fx.dir}" excludes="*.java,${excludes}" includes="${includes}">
  945. <filename name="**/*.java"/>
  946. </fileset>
  947. <fileset dir="${src.games.dir}" excludes="*.java,${excludes}" includes="${includes}">
  948. <filename name="**/*.java"/>
  949. </fileset>
  950. <fileset dir="${src.jbullet.dir}" excludes="*.java,${excludes}" includes="${includes}">
  951. <filename name="**/*.java"/>
  952. </fileset>
  953. <fileset dir="${src.niftygui.dir}" excludes="*.java,${excludes}" includes="${includes}">
  954. <filename name="**/*.java"/>
  955. </fileset>
  956. <fileset dir="${src.jogg.dir}" excludes="*.java,${excludes}" includes="${includes}">
  957. <filename name="**/*.java"/>
  958. </fileset>
  959. <fileset dir="${src.lwjgl-oal.dir}" excludes="*.java,${excludes}" includes="${includes}">
  960. <filename name="**/*.java"/>
  961. </fileset>
  962. <fileset dir="${src.lwjgl-ogl.dir}" excludes="*.java,${excludes}" includes="${includes}">
  963. <filename name="**/*.java"/>
  964. </fileset>
  965. <fileset dir="${src.ogre.dir}" excludes="*.java,${excludes}" includes="${includes}">
  966. <filename name="**/*.java"/>
  967. </fileset>
  968. <fileset dir="${src.blender.dir}" excludes="*.java,${excludes}" includes="${includes}">
  969. <filename name="**/*.java"/>
  970. </fileset>
  971. <fileset dir="${src.pack.dir}" excludes="*.java,${excludes}" includes="${includes}">
  972. <filename name="**/*.java"/>
  973. </fileset>
  974. <fileset dir="${src.jheora.dir}" excludes="*.java,${excludes}" includes="${includes}">
  975. <filename name="**/*.java"/>
  976. </fileset>
  977. <fileset dir="${src.test.dir}" excludes="*.java,${excludes}" includes="${includes}">
  978. <filename name="**/*.java"/>
  979. </fileset>
  980. <fileset dir="${src.tools.dir}" excludes="*.java,${excludes}" includes="${includes}">
  981. <filename name="**/*.java"/>
  982. </fileset>
  983. <fileset dir="${src.xml.dir}" excludes="*.java,${excludes}" includes="${includes}">
  984. <filename name="**/*.java"/>
  985. </fileset>
  986. <fileset dir="${build.generated.sources.dir}" erroronmissingdir="false">
  987. <include name="**/*.java"/>
  988. <exclude name="*.java"/>
  989. </fileset>
  990. </javadoc>
  991. <copy todir="${dist.javadoc.dir}">
  992. <fileset dir="${src.core.dir}" excludes="${excludes}" includes="${includes}">
  993. <filename name="**/doc-files/**"/>
  994. </fileset>
  995. <fileset dir="${src.core-data.dir}" excludes="${excludes}" includes="${includes}">
  996. <filename name="**/doc-files/**"/>
  997. </fileset>
  998. <fileset dir="${src.core-plugins.dir}" excludes="${excludes}" includes="${includes}">
  999. <filename name="**/doc-files/**"/>
  1000. </fileset>
  1001. <fileset dir="${src.terrain.dir}" excludes="${excludes}" includes="${includes}">
  1002. <filename name="**/doc-files/**"/>
  1003. </fileset>
  1004. <fileset dir="${src.networking.dir}" excludes="${excludes}" includes="${includes}">
  1005. <filename name="**/doc-files/**"/>
  1006. </fileset>
  1007. <fileset dir="${src.desktop.dir}" excludes="${excludes}" includes="${includes}">
  1008. <filename name="**/doc-files/**"/>
  1009. </fileset>
  1010. <fileset dir="${src.desktop-fx.dir}" excludes="${excludes}" includes="${includes}">
  1011. <filename name="**/doc-files/**"/>
  1012. </fileset>
  1013. <fileset dir="${src.games.dir}" excludes="${excludes}" includes="${includes}">
  1014. <filename name="**/doc-files/**"/>
  1015. </fileset>
  1016. <fileset dir="${src.jbullet.dir}" excludes="${excludes}" includes="${includes}">
  1017. <filename name="**/doc-files/**"/>
  1018. </fileset>
  1019. <fileset dir="${src.niftygui.dir}" excludes="${excludes}" includes="${includes}">
  1020. <filename name="**/doc-files/**"/>
  1021. </fileset>
  1022. <fileset dir="${src.jogg.dir}" excludes="${excludes}" includes="${includes}">
  1023. <filename name="**/doc-files/**"/>
  1024. </fileset>
  1025. <fileset dir="${src.lwjgl-oal.dir}" excludes="${excludes}" includes="${includes}">
  1026. <filename name="**/doc-files/**"/>
  1027. </fileset>
  1028. <fileset dir="${src.lwjgl-ogl.dir}" excludes="${excludes}" includes="${includes}">
  1029. <filename name="**/doc-files/**"/>
  1030. </fileset>
  1031. <fileset dir="${src.ogre.dir}" excludes="${excludes}" includes="${includes}">
  1032. <filename name="**/doc-files/**"/>
  1033. </fileset>
  1034. <fileset dir="${src.blender.dir}" excludes="${excludes}" includes="${includes}">
  1035. <filename name="**/doc-files/**"/>
  1036. </fileset>
  1037. <fileset dir="${src.pack.dir}" excludes="${excludes}" includes="${includes}">
  1038. <filename name="**/doc-files/**"/>
  1039. </fileset>
  1040. <fileset dir="${src.jheora.dir}" excludes="${excludes}" includes="${includes}">
  1041. <filename name="**/doc-files/**"/>
  1042. </fileset>
  1043. <fileset dir="${src.test.dir}" excludes="${excludes}" includes="${includes}">
  1044. <filename name="**/doc-files/**"/>
  1045. </fileset>
  1046. <fileset dir="${src.tools.dir}" excludes="${excludes}" includes="${includes}">
  1047. <filename name="**/doc-files/**"/>
  1048. </fileset>
  1049. <fileset dir="${src.xml.dir}" excludes="${excludes}" includes="${includes}">
  1050. <filename name="**/doc-files/**"/>
  1051. </fileset>
  1052. <fileset dir="${build.generated.sources.dir}" erroronmissingdir="false">
  1053. <include name="**/doc-files/**"/>
  1054. </fileset>
  1055. </copy>
  1056. </target>
  1057. <target depends="init,-javadoc-build" if="netbeans.home" name="-javadoc-browse" unless="no.javadoc.preview">
  1058. <nbbrowse file="${dist.javadoc.dir}/index.html"/>
  1059. </target>
  1060. <target depends="init,-javadoc-build,-javadoc-browse" description="Build Javadoc." name="javadoc"/>
  1061. <!--
  1062. =========================
  1063. JUNIT COMPILATION SECTION
  1064. =========================
  1065. -->
  1066. <target depends="init,compile" if="have.tests" name="-pre-pre-compile-test">
  1067. <mkdir dir="${build.test.classes.dir}"/>
  1068. </target>
  1069. <target name="-pre-compile-test">
  1070. <!-- Empty placeholder for easier customization. -->
  1071. <!-- You can override this target in the ../build.xml file. -->
  1072. </target>
  1073. <target if="do.depend.true" name="-compile-test-depend">
  1074. <j2seproject3:depend classpath="${javac.test.classpath}" destdir="${build.test.classes.dir}" srcdir="${test.test.dir}"/>
  1075. </target>
  1076. <target depends="init,deps-jar,compile,-pre-pre-compile-test,-pre-compile-test,-compile-test-depend" if="have.tests" name="-do-compile-test">
  1077. <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}"/>
  1078. <copy todir="${build.test.classes.dir}">
  1079. <fileset dir="${test.test.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
  1080. </copy>
  1081. </target>
  1082. <target name="-post-compile-test">
  1083. <!-- Empty placeholder for easier customization. -->
  1084. <!-- You can override this target in the ../build.xml file. -->
  1085. </target>
  1086. <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test,-do-compile-test,-post-compile-test" name="compile-test"/>
  1087. <target name="-pre-compile-test-single">
  1088. <!-- Empty placeholder for easier customization. -->
  1089. <!-- You can override this target in the ../build.xml file. -->
  1090. </target>
  1091. <target depends="init,deps-jar,compile,-pre-pre-compile-test,-pre-compile-test-single" if="have.tests" name="-do-compile-test-single">
  1092. <fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail>
  1093. <j2seproject3:force-recompile destdir="${build.test.classes.dir}"/>
  1094. <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}"/>
  1095. <copy todir="${build.test.classes.dir}">
  1096. <fileset dir="${test.test.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
  1097. </copy>
  1098. </target>
  1099. <target name="-post-compile-test-single">
  1100. <!-- Empty placeholder for easier customization. -->
  1101. <!-- You can override this target in the ../build.xml file. -->
  1102. </target>
  1103. <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test-single,-do-compile-test-single,-post-compile-test-single" name="compile-test-single"/>
  1104. <!--
  1105. =======================
  1106. JUNIT EXECUTION SECTION
  1107. =======================
  1108. -->
  1109. <target depends="init" if="have.tests" name="-pre-test-run">
  1110. <mkdir dir="${build.test.results.dir}"/>
  1111. </target>
  1112. <target depends="init,compile-test,-pre-test-run" if="have.tests" name="-do-test-run">
  1113. <j2seproject3:junit testincludes="**/*Test.java"/>
  1114. </target>
  1115. <target depends="init,compile-test,-pre-test-run,-do-test-run" if="have.tests" name="-post-test-run">
  1116. <fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail>
  1117. </target>
  1118. <target depends="init" if="have.tests" name="test-report"/>
  1119. <target depends="init" if="netbeans.home+have.tests" name="-test-browse"/>
  1120. <target depends="init,compile-test,-pre-test-run,-do-test-run,test-report,-post-test-run,-test-browse" description="Run unit tests." name="test"/>
  1121. <target depends="init" if="have.tests" name="-pre-test-run-single">
  1122. <mkdir dir="${build.test.results.dir}"/>
  1123. </target>
  1124. <target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-do-test-run-single">
  1125. <fail unless="test.includes">Must select some files in the IDE or set test.includes</fail>
  1126. <j2seproject3:junit excludes="" includes="${test.includes}"/>
  1127. </target>
  1128. <target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single" if="have.tests" name="-post-test-run-single">
  1129. <fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail>
  1130. </target>
  1131. <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"/>
  1132. <!--
  1133. =======================
  1134. JUNIT DEBUGGING SECTION
  1135. =======================
  1136. -->
  1137. <target depends="init,compile-test" if="have.tests" name="-debug-start-debuggee-test">
  1138. <fail unless="test.class">Must select one file in the IDE or set test.class</fail>
  1139. <property location="${build.test.results.dir}/TEST-${test.class}.xml" name="test.report.file"/>
  1140. <delete file="${test.report.file}"/>
  1141. <mkdir dir="${build.test.results.dir}"/>
  1142. <j2seproject3:debug classname="org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner" classpath="${ant.home}/lib/ant.jar:${ant.home}/lib/ant-junit.jar:${debug.test.classpath}">
  1143. <customize>
  1144. <syspropertyset>
  1145. <propertyref prefix="test-sys-prop."/>
  1146. <mapper from="test-sys-prop.*" to="*" type="glob"/>
  1147. </syspropertyset>
  1148. <arg value="${test.class}"/>
  1149. <arg value="showoutput=true"/>
  1150. <arg value="formatter=org.apache.tools.ant.taskdefs.optional.junit.BriefJUnitResultFormatter"/>
  1151. <arg value="formatter=org.apache.tools.ant.taskdefs.optional.junit.XMLJUnitResultFormatter,${test.report.file}"/>
  1152. </customize>
  1153. </j2seproject3:debug>
  1154. </target>
  1155. <target depends="init,compile-test" if="netbeans.home+have.tests" name="-debug-start-debugger-test">
  1156. <j2seproject1:nbjpdastart classpath="${debug.test.classpath}" name="${test.class}"/>
  1157. </target>
  1158. <target depends="init,compile-test-single,-debug-start-debugger-test,-debug-start-debuggee-test" name="debug-test"/>
  1159. <target depends="init,-pre-debug-fix,compile-test-single" if="netbeans.home" name="-do-debug-fix-test">
  1160. <j2seproject1:nbjpdareload dir="${build.test.classes.dir}"/>
  1161. </target>
  1162. <target depends="init,-pre-debug-fix,-do-debug-fix-test" if="netbeans.home" name="debug-fix-test"/>
  1163. <!--
  1164. =========================
  1165. APPLET EXECUTION SECTION
  1166. =========================
  1167. -->
  1168. <target depends="init,compile-single" name="run-applet">
  1169. <fail unless="applet.url">Must select one file in the IDE or set applet.url</fail>
  1170. <j2seproject1:java classname="sun.applet.AppletViewer">
  1171. <customize>
  1172. <arg value="${applet.url}"/>
  1173. </customize>
  1174. </j2seproject1:java>
  1175. </target>
  1176. <!--
  1177. =========================
  1178. APPLET DEBUGGING SECTION
  1179. =========================
  1180. -->
  1181. <target depends="init,compile-single" if="netbeans.home" name="-debug-start-debuggee-applet">
  1182. <fail unless="applet.url">Must select one file in the IDE or set applet.url</fail>
  1183. <j2seproject3:debug classname="sun.applet.AppletViewer">
  1184. <customize>
  1185. <arg value="${applet.url}"/>
  1186. </customize>
  1187. </j2seproject3:debug>
  1188. </target>
  1189. <target depends="init,compile-single,-debug-start-debugger,-debug-start-debuggee-applet" if="netbeans.home" name="debug-applet"/>
  1190. <!--
  1191. ===============
  1192. CLEANUP SECTION
  1193. ===============
  1194. -->
  1195. <target name="-deps-clean-init" unless="built-clean.properties">
  1196. <property location="${build.dir}/built-clean.properties" name="built-clean.properties"/>
  1197. <delete file="${built-clean.properties}" quiet="true"/>
  1198. </target>
  1199. <target if="already.built.clean.${basedir}" name="-warn-already-built-clean">
  1200. <echo level="warn" message="Cycle detected: jMonkeyEngine3 was already built"/>
  1201. </target>
  1202. <target depends="init,-deps-clean-init" name="deps-clean" unless="no.deps">
  1203. <mkdir dir="${build.dir}"/>
  1204. <touch file="${built-clean.properties}" verbose="false"/>
  1205. <property file="${built-clean.properties}" prefix="already.built.clean."/>
  1206. <antcall target="-warn-already-built-clean"/>
  1207. <propertyfile file="${built-clean.properties}">
  1208. <entry key="${basedir}" value=""/>
  1209. </propertyfile>
  1210. </target>
  1211. <target depends="init" name="-do-clean">
  1212. <delete dir="${build.dir}"/>
  1213. <delete dir="${dist.dir}" followsymlinks="false" includeemptydirs="true"/>
  1214. </target>
  1215. <target name="-post-clean">
  1216. <!-- Empty placeholder for easier customization. -->
  1217. <!-- You can override this target in the ../build.xml file. -->
  1218. </target>
  1219. <target depends="init,deps-clean,-do-clean,-post-clean" description="Clean build products." name="clean"/>
  1220. <target name="-check-call-dep">
  1221. <property file="${call.built.properties}" prefix="already.built."/>
  1222. <condition property="should.call.dep">
  1223. <not>
  1224. <isset property="already.built.${call.subproject}"/>
  1225. </not>
  1226. </condition>
  1227. </target>
  1228. <target depends="-check-call-dep" if="should.call.dep" name="-maybe-call-dep">
  1229. <ant antfile="${call.script}" inheritall="false" target="${call.target}">
  1230. <propertyset>
  1231. <propertyref prefix="transfer."/>
  1232. <mapper from="transfer.*" to="*" type="glob"/>
  1233. </propertyset>
  1234. </ant>
  1235. </target>
  1236. </project>