build-impl.xml 76 KB

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