build-impl.xml 77 KB

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