build-impl.xml 77 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411
  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="GBP-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 name="-init-test-properties">
  371. <property name="test.binaryincludes" value="&lt;nothing&gt;"/>
  372. <property name="test.binarytestincludes" value=""/>
  373. <property name="test.binaryexcludes" value=""/>
  374. </target>
  375. <target if="${nb.junit.single}" name="-init-macrodef-junit-single" unless="${nb.junit.batch}">
  376. <macrodef name="junit" uri="http://www.netbeans.org/ns/j2se-project/3">
  377. <attribute default="${includes}" name="includes"/>
  378. <attribute default="${excludes}" name="excludes"/>
  379. <attribute default="**" name="testincludes"/>
  380. <attribute default="" name="testmethods"/>
  381. <element name="customize" optional="true"/>
  382. <sequential>
  383. <property name="junit.forkmode" value="perTest"/>
  384. <junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" forkmode="${junit.forkmode}" showoutput="true" tempdir="${build.dir}">
  385. <test methods="@{testmethods}" name="@{testincludes}" todir="${build.test.results.dir}"/>
  386. <syspropertyset>
  387. <propertyref prefix="test-sys-prop."/>
  388. <mapper from="test-sys-prop.*" to="*" type="glob"/>
  389. </syspropertyset>
  390. <formatter type="brief" usefile="false"/>
  391. <formatter type="xml"/>
  392. <jvmarg value="-ea"/>
  393. <customize/>
  394. </junit>
  395. </sequential>
  396. </macrodef>
  397. </target>
  398. <target depends="-init-test-properties" if="${nb.junit.batch}" name="-init-macrodef-junit-batch" unless="${nb.junit.single}">
  399. <macrodef name="junit" uri="http://www.netbeans.org/ns/j2se-project/3">
  400. <attribute default="${includes}" name="includes"/>
  401. <attribute default="${excludes}" name="excludes"/>
  402. <attribute default="**" name="testincludes"/>
  403. <attribute default="" name="testmethods"/>
  404. <element name="customize" optional="true"/>
  405. <sequential>
  406. <property name="junit.forkmode" value="perTest"/>
  407. <junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" forkmode="${junit.forkmode}" showoutput="true" tempdir="${build.dir}">
  408. <batchtest todir="${build.test.results.dir}">
  409. <fileset dir="${test.src.dir}" excludes="@{excludes},${excludes}" includes="@{includes}">
  410. <filename name="@{testincludes}"/>
  411. </fileset>
  412. <fileset dir="${build.test.classes.dir}" excludes="@{excludes},${excludes},${test.binaryexcludes}" includes="${test.binaryincludes}">
  413. <filename name="${test.binarytestincludes}"/>
  414. </fileset>
  415. </batchtest>
  416. <syspropertyset>
  417. <propertyref prefix="test-sys-prop."/>
  418. <mapper from="test-sys-prop.*" to="*" type="glob"/>
  419. </syspropertyset>
  420. <formatter type="brief" usefile="false"/>
  421. <formatter type="xml"/>
  422. <jvmarg value="-ea"/>
  423. <customize/>
  424. </junit>
  425. </sequential>
  426. </macrodef>
  427. </target>
  428. <target depends="-init-macrodef-junit-init,-init-macrodef-junit-single, -init-macrodef-junit-batch" if="${junit.available}" name="-init-macrodef-junit"/>
  429. <target if="${testng.available}" name="-init-macrodef-testng">
  430. <macrodef name="testng" uri="http://www.netbeans.org/ns/j2se-project/3">
  431. <attribute default="${includes}" name="includes"/>
  432. <attribute default="${excludes}" name="excludes"/>
  433. <attribute default="**" name="testincludes"/>
  434. <attribute default="" name="testmethods"/>
  435. <element name="customize" optional="true"/>
  436. <sequential>
  437. <condition else="" property="testng.methods.arg" value="@{testincludes}.@{testmethods}">
  438. <isset property="test.method"/>
  439. </condition>
  440. <union id="test.set">
  441. <fileset dir="${test.src.dir}" excludes="@{excludes},**/*.xml,${excludes}" includes="@{includes}">
  442. <filename name="@{testincludes}"/>
  443. </fileset>
  444. </union>
  445. <taskdef classname="org.testng.TestNGAntTask" classpath="${run.test.classpath}" name="testng"/>
  446. <testng classfilesetref="test.set" failureProperty="tests.failed" methods="${testng.methods.arg}" mode="${testng.mode}" outputdir="${build.test.results.dir}" suitename="GBP" testname="TestNG tests" workingDir="${work.dir}">
  447. <xmlfileset dir="${build.test.classes.dir}" includes="@{testincludes}"/>
  448. <propertyset>
  449. <propertyref prefix="test-sys-prop."/>
  450. <mapper from="test-sys-prop.*" to="*" type="glob"/>
  451. </propertyset>
  452. <customize/>
  453. </testng>
  454. </sequential>
  455. </macrodef>
  456. </target>
  457. <target name="-init-macrodef-test-impl">
  458. <macrodef name="test-impl" uri="http://www.netbeans.org/ns/j2se-project/3">
  459. <attribute default="${includes}" name="includes"/>
  460. <attribute default="${excludes}" name="excludes"/>
  461. <attribute default="**" name="testincludes"/>
  462. <attribute default="" name="testmethods"/>
  463. <element implicit="true" name="customize" optional="true"/>
  464. <sequential>
  465. <echo>No tests executed.</echo>
  466. </sequential>
  467. </macrodef>
  468. </target>
  469. <target depends="-init-macrodef-junit" if="${junit.available}" name="-init-macrodef-junit-impl">
  470. <macrodef name="test-impl" uri="http://www.netbeans.org/ns/j2se-project/3">
  471. <attribute default="${includes}" name="includes"/>
  472. <attribute default="${excludes}" name="excludes"/>
  473. <attribute default="**" name="testincludes"/>
  474. <attribute default="" name="testmethods"/>
  475. <element implicit="true" name="customize" optional="true"/>
  476. <sequential>
  477. <j2seproject3:junit excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}">
  478. <customize/>
  479. </j2seproject3:junit>
  480. </sequential>
  481. </macrodef>
  482. </target>
  483. <target depends="-init-macrodef-testng" if="${testng.available}" name="-init-macrodef-testng-impl">
  484. <macrodef name="test-impl" uri="http://www.netbeans.org/ns/j2se-project/3">
  485. <attribute default="${includes}" name="includes"/>
  486. <attribute default="${excludes}" name="excludes"/>
  487. <attribute default="**" name="testincludes"/>
  488. <attribute default="" name="testmethods"/>
  489. <element implicit="true" name="customize" optional="true"/>
  490. <sequential>
  491. <j2seproject3:testng excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}">
  492. <customize/>
  493. </j2seproject3:testng>
  494. </sequential>
  495. </macrodef>
  496. </target>
  497. <target depends="-init-macrodef-test-impl,-init-macrodef-junit-impl,-init-macrodef-testng-impl" name="-init-macrodef-test">
  498. <macrodef name="test" uri="http://www.netbeans.org/ns/j2se-project/3">
  499. <attribute default="${includes}" name="includes"/>
  500. <attribute default="${excludes}" name="excludes"/>
  501. <attribute default="**" name="testincludes"/>
  502. <attribute default="" name="testmethods"/>
  503. <sequential>
  504. <j2seproject3:test-impl excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}">
  505. <customize>
  506. <classpath>
  507. <path path="${run.test.classpath}"/>
  508. </classpath>
  509. <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
  510. <jvmarg line="${run.jvmargs}"/>
  511. <jvmarg line="${run.jvmargs.ide}"/>
  512. </customize>
  513. </j2seproject3:test-impl>
  514. </sequential>
  515. </macrodef>
  516. </target>
  517. <target if="${junit.available}" name="-init-macrodef-junit-debug" unless="${nb.junit.batch}">
  518. <macrodef name="junit-debug" uri="http://www.netbeans.org/ns/j2se-project/3">
  519. <attribute default="${includes}" name="includes"/>
  520. <attribute default="${excludes}" name="excludes"/>
  521. <attribute default="**" name="testincludes"/>
  522. <attribute default="" name="testmethods"/>
  523. <element name="customize" optional="true"/>
  524. <sequential>
  525. <property name="junit.forkmode" value="perTest"/>
  526. <junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" forkmode="${junit.forkmode}" showoutput="true" tempdir="${build.dir}">
  527. <test methods="@{testmethods}" name="@{testincludes}" todir="${build.test.results.dir}"/>
  528. <syspropertyset>
  529. <propertyref prefix="test-sys-prop."/>
  530. <mapper from="test-sys-prop.*" to="*" type="glob"/>
  531. </syspropertyset>
  532. <formatter type="brief" usefile="false"/>
  533. <formatter type="xml"/>
  534. <jvmarg value="-ea"/>
  535. <jvmarg line="${debug-args-line}"/>
  536. <jvmarg value="-Xrunjdwp:transport=${debug-transport},address=${jpda.address}"/>
  537. <customize/>
  538. </junit>
  539. </sequential>
  540. </macrodef>
  541. </target>
  542. <target depends="-init-test-properties" if="${nb.junit.batch}" name="-init-macrodef-junit-debug-batch">
  543. <macrodef name="junit-debug" uri="http://www.netbeans.org/ns/j2se-project/3">
  544. <attribute default="${includes}" name="includes"/>
  545. <attribute default="${excludes}" name="excludes"/>
  546. <attribute default="**" name="testincludes"/>
  547. <attribute default="" name="testmethods"/>
  548. <element name="customize" optional="true"/>
  549. <sequential>
  550. <property name="junit.forkmode" value="perTest"/>
  551. <junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" forkmode="${junit.forkmode}" showoutput="true" tempdir="${build.dir}">
  552. <batchtest todir="${build.test.results.dir}">
  553. <fileset dir="${test.src.dir}" excludes="@{excludes},${excludes}" includes="@{includes}">
  554. <filename name="@{testincludes}"/>
  555. </fileset>
  556. <fileset dir="${build.test.classes.dir}" excludes="@{excludes},${excludes},${test.binaryexcludes}" includes="${test.binaryincludes}">
  557. <filename name="${test.binarytestincludes}"/>
  558. </fileset>
  559. </batchtest>
  560. <syspropertyset>
  561. <propertyref prefix="test-sys-prop."/>
  562. <mapper from="test-sys-prop.*" to="*" type="glob"/>
  563. </syspropertyset>
  564. <formatter type="brief" usefile="false"/>
  565. <formatter type="xml"/>
  566. <jvmarg value="-ea"/>
  567. <jvmarg line="${debug-args-line}"/>
  568. <jvmarg value="-Xrunjdwp:transport=${debug-transport},address=${jpda.address}"/>
  569. <customize/>
  570. </junit>
  571. </sequential>
  572. </macrodef>
  573. </target>
  574. <target depends="-init-macrodef-junit-debug,-init-macrodef-junit-debug-batch" if="${junit.available}" name="-init-macrodef-junit-debug-impl">
  575. <macrodef name="test-debug-impl" uri="http://www.netbeans.org/ns/j2se-project/3">
  576. <attribute default="${includes}" name="includes"/>
  577. <attribute default="${excludes}" name="excludes"/>
  578. <attribute default="**" name="testincludes"/>
  579. <attribute default="" name="testmethods"/>
  580. <element implicit="true" name="customize" optional="true"/>
  581. <sequential>
  582. <j2seproject3:junit-debug excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}">
  583. <customize/>
  584. </j2seproject3:junit-debug>
  585. </sequential>
  586. </macrodef>
  587. </target>
  588. <target if="${testng.available}" name="-init-macrodef-testng-debug">
  589. <macrodef name="testng-debug" uri="http://www.netbeans.org/ns/j2se-project/3">
  590. <attribute default="${main.class}" name="testClass"/>
  591. <attribute default="" name="testMethod"/>
  592. <element name="customize2" optional="true"/>
  593. <sequential>
  594. <condition else="-testclass @{testClass}" property="test.class.or.method" value="-methods @{testClass}.@{testMethod}">
  595. <isset property="test.method"/>
  596. </condition>
  597. <condition else="-suitename GBP -testname @{testClass} ${test.class.or.method}" property="testng.cmd.args" value="@{testClass}">
  598. <matches pattern=".*\.xml" string="@{testClass}"/>
  599. </condition>
  600. <delete dir="${build.test.results.dir}" quiet="true"/>
  601. <mkdir dir="${build.test.results.dir}"/>
  602. <j2seproject3:debug classname="org.testng.TestNG" classpath="${debug.test.classpath}">
  603. <customize>
  604. <customize2/>
  605. <jvmarg value="-ea"/>
  606. <arg line="${testng.debug.mode}"/>
  607. <arg line="-d ${build.test.results.dir}"/>
  608. <arg line="-listener org.testng.reporters.VerboseReporter"/>
  609. <arg line="${testng.cmd.args}"/>
  610. </customize>
  611. </j2seproject3:debug>
  612. </sequential>
  613. </macrodef>
  614. </target>
  615. <target depends="-init-macrodef-testng-debug" if="${testng.available}" name="-init-macrodef-testng-debug-impl">
  616. <macrodef name="testng-debug-impl" uri="http://www.netbeans.org/ns/j2se-project/3">
  617. <attribute default="${main.class}" name="testClass"/>
  618. <attribute default="" name="testMethod"/>
  619. <element implicit="true" name="customize2" optional="true"/>
  620. <sequential>
  621. <j2seproject3:testng-debug testClass="@{testClass}" testMethod="@{testMethod}">
  622. <customize2/>
  623. </j2seproject3:testng-debug>
  624. </sequential>
  625. </macrodef>
  626. </target>
  627. <target depends="-init-macrodef-junit-debug-impl" if="${junit.available}" name="-init-macrodef-test-debug-junit">
  628. <macrodef name="test-debug" uri="http://www.netbeans.org/ns/j2se-project/3">
  629. <attribute default="${includes}" name="includes"/>
  630. <attribute default="${excludes}" name="excludes"/>
  631. <attribute default="**" name="testincludes"/>
  632. <attribute default="" name="testmethods"/>
  633. <attribute default="${main.class}" name="testClass"/>
  634. <attribute default="" name="testMethod"/>
  635. <sequential>
  636. <j2seproject3:test-debug-impl excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}">
  637. <customize>
  638. <classpath>
  639. <path path="${run.test.classpath}"/>
  640. </classpath>
  641. <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
  642. <jvmarg line="${run.jvmargs}"/>
  643. <jvmarg line="${run.jvmargs.ide}"/>
  644. </customize>
  645. </j2seproject3:test-debug-impl>
  646. </sequential>
  647. </macrodef>
  648. </target>
  649. <target depends="-init-macrodef-testng-debug-impl" if="${testng.available}" name="-init-macrodef-test-debug-testng">
  650. <macrodef name="test-debug" uri="http://www.netbeans.org/ns/j2se-project/3">
  651. <attribute default="${includes}" name="includes"/>
  652. <attribute default="${excludes}" name="excludes"/>
  653. <attribute default="**" name="testincludes"/>
  654. <attribute default="" name="testmethods"/>
  655. <attribute default="${main.class}" name="testClass"/>
  656. <attribute default="" name="testMethod"/>
  657. <sequential>
  658. <j2seproject3:testng-debug-impl testClass="@{testClass}" testMethod="@{testMethod}">
  659. <customize2>
  660. <syspropertyset>
  661. <propertyref prefix="test-sys-prop."/>
  662. <mapper from="test-sys-prop.*" to="*" type="glob"/>
  663. </syspropertyset>
  664. </customize2>
  665. </j2seproject3:testng-debug-impl>
  666. </sequential>
  667. </macrodef>
  668. </target>
  669. <target depends="-init-macrodef-test-debug-junit,-init-macrodef-test-debug-testng" name="-init-macrodef-test-debug"/>
  670. <!--
  671. pre NB7.2 profiling section; consider it deprecated
  672. -->
  673. <target depends="-profile-pre-init, init, -profile-post-init, -profile-init-macrodef-profile, -profile-init-check" if="profiler.info.jvmargs.agent" name="profile-init"/>
  674. <target if="profiler.info.jvmargs.agent" name="-profile-pre-init">
  675. <!-- Empty placeholder for easier customization. -->
  676. <!-- You can override this target in the ../build.xml file. -->
  677. </target>
  678. <target if="profiler.info.jvmargs.agent" name="-profile-post-init">
  679. <!-- Empty placeholder for easier customization. -->
  680. <!-- You can override this target in the ../build.xml file. -->
  681. </target>
  682. <target if="profiler.info.jvmargs.agent" name="-profile-init-macrodef-profile">
  683. <macrodef name="resolve">
  684. <attribute name="name"/>
  685. <attribute name="value"/>
  686. <sequential>
  687. <property name="@{name}" value="${env.@{value}}"/>
  688. </sequential>
  689. </macrodef>
  690. <macrodef name="profile">
  691. <attribute default="${main.class}" name="classname"/>
  692. <element name="customize" optional="true"/>
  693. <sequential>
  694. <property environment="env"/>
  695. <resolve name="profiler.current.path" value="${profiler.info.pathvar}"/>
  696. <java classname="@{classname}" dir="${profiler.info.dir}" fork="true" jvm="${profiler.info.jvm}">
  697. <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
  698. <jvmarg value="${profiler.info.jvmargs.agent}"/>
  699. <jvmarg line="${profiler.info.jvmargs}"/>
  700. <env key="${profiler.info.pathvar}" path="${profiler.info.agentpath}:${profiler.current.path}"/>
  701. <arg line="${application.args}"/>
  702. <classpath>
  703. <path path="${run.classpath}"/>
  704. </classpath>
  705. <syspropertyset>
  706. <propertyref prefix="run-sys-prop."/>
  707. <mapper from="run-sys-prop.*" to="*" type="glob"/>
  708. </syspropertyset>
  709. <customize/>
  710. </java>
  711. </sequential>
  712. </macrodef>
  713. </target>
  714. <target depends="-profile-pre-init, init, -profile-post-init, -profile-init-macrodef-profile" if="profiler.info.jvmargs.agent" name="-profile-init-check">
  715. <fail unless="profiler.info.jvm">Must set JVM to use for profiling in profiler.info.jvm</fail>
  716. <fail unless="profiler.info.jvmargs.agent">Must set profiler agent JVM arguments in profiler.info.jvmargs.agent</fail>
  717. </target>
  718. <!--
  719. end of pre NB7.2 profiling section
  720. -->
  721. <target depends="-init-debug-args" name="-init-macrodef-nbjpda">
  722. <macrodef name="nbjpdastart" uri="http://www.netbeans.org/ns/j2se-project/1">
  723. <attribute default="${main.class}" name="name"/>
  724. <attribute default="${debug.classpath}" name="classpath"/>
  725. <attribute default="" name="stopclassname"/>
  726. <sequential>
  727. <nbjpdastart addressproperty="jpda.address" name="@{name}" stopclassname="@{stopclassname}" transport="${debug-transport}">
  728. <classpath>
  729. <path path="@{classpath}"/>
  730. </classpath>
  731. </nbjpdastart>
  732. </sequential>
  733. </macrodef>
  734. <macrodef name="nbjpdareload" uri="http://www.netbeans.org/ns/j2se-project/1">
  735. <attribute default="${build.classes.dir}" name="dir"/>
  736. <sequential>
  737. <nbjpdareload>
  738. <fileset dir="@{dir}" includes="${fix.classes}">
  739. <include name="${fix.includes}*.class"/>
  740. </fileset>
  741. </nbjpdareload>
  742. </sequential>
  743. </macrodef>
  744. </target>
  745. <target name="-init-debug-args">
  746. <property name="version-output" value="java version &quot;${ant.java.version}"/>
  747. <condition property="have-jdk-older-than-1.4">
  748. <or>
  749. <contains string="${version-output}" substring="java version &quot;1.0"/>
  750. <contains string="${version-output}" substring="java version &quot;1.1"/>
  751. <contains string="${version-output}" substring="java version &quot;1.2"/>
  752. <contains string="${version-output}" substring="java version &quot;1.3"/>
  753. </or>
  754. </condition>
  755. <condition else="-Xdebug" property="debug-args-line" value="-Xdebug -Xnoagent -Djava.compiler=none">
  756. <istrue value="${have-jdk-older-than-1.4}"/>
  757. </condition>
  758. <condition else="dt_socket" property="debug-transport-by-os" value="dt_shmem">
  759. <os family="windows"/>
  760. </condition>
  761. <condition else="${debug-transport-by-os}" property="debug-transport" value="${debug.transport}">
  762. <isset property="debug.transport"/>
  763. </condition>
  764. </target>
  765. <target depends="-init-debug-args" name="-init-macrodef-debug">
  766. <macrodef name="debug" uri="http://www.netbeans.org/ns/j2se-project/3">
  767. <attribute default="${main.class}" name="classname"/>
  768. <attribute default="${debug.classpath}" name="classpath"/>
  769. <element name="customize" optional="true"/>
  770. <sequential>
  771. <java classname="@{classname}" dir="${work.dir}" fork="true">
  772. <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
  773. <jvmarg line="${debug-args-line}"/>
  774. <jvmarg value="-Xrunjdwp:transport=${debug-transport},address=${jpda.address}"/>
  775. <jvmarg value="-Dfile.encoding=${runtime.encoding}"/>
  776. <redirector errorencoding="${runtime.encoding}" inputencoding="${runtime.encoding}" outputencoding="${runtime.encoding}"/>
  777. <jvmarg line="${run.jvmargs}"/>
  778. <jvmarg line="${run.jvmargs.ide}"/>
  779. <classpath>
  780. <path path="@{classpath}"/>
  781. </classpath>
  782. <syspropertyset>
  783. <propertyref prefix="run-sys-prop."/>
  784. <mapper from="run-sys-prop.*" to="*" type="glob"/>
  785. </syspropertyset>
  786. <customize/>
  787. </java>
  788. </sequential>
  789. </macrodef>
  790. </target>
  791. <target name="-init-macrodef-java">
  792. <macrodef name="java" uri="http://www.netbeans.org/ns/j2se-project/1">
  793. <attribute default="${main.class}" name="classname"/>
  794. <attribute default="${run.classpath}" name="classpath"/>
  795. <attribute default="jvm" name="jvm"/>
  796. <element name="customize" optional="true"/>
  797. <sequential>
  798. <java classname="@{classname}" dir="${work.dir}" fork="true">
  799. <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
  800. <jvmarg value="-Dfile.encoding=${runtime.encoding}"/>
  801. <redirector errorencoding="${runtime.encoding}" inputencoding="${runtime.encoding}" outputencoding="${runtime.encoding}"/>
  802. <jvmarg line="${run.jvmargs}"/>
  803. <jvmarg line="${run.jvmargs.ide}"/>
  804. <classpath>
  805. <path path="@{classpath}"/>
  806. </classpath>
  807. <syspropertyset>
  808. <propertyref prefix="run-sys-prop."/>
  809. <mapper from="run-sys-prop.*" to="*" type="glob"/>
  810. </syspropertyset>
  811. <customize/>
  812. </java>
  813. </sequential>
  814. </macrodef>
  815. </target>
  816. <target name="-init-macrodef-copylibs">
  817. <macrodef name="copylibs" uri="http://www.netbeans.org/ns/j2se-project/3">
  818. <attribute default="${manifest.file}" name="manifest"/>
  819. <element name="customize" optional="true"/>
  820. <sequential>
  821. <property location="${build.classes.dir}" name="build.classes.dir.resolved"/>
  822. <pathconvert property="run.classpath.without.build.classes.dir">
  823. <path path="${run.classpath}"/>
  824. <map from="${build.classes.dir.resolved}" to=""/>
  825. </pathconvert>
  826. <pathconvert pathsep=" " property="jar.classpath">
  827. <path path="${run.classpath.without.build.classes.dir}"/>
  828. <chainedmapper>
  829. <flattenmapper/>
  830. <filtermapper>
  831. <replacestring from=" " to="%20"/>
  832. </filtermapper>
  833. <globmapper from="*" to="lib/*"/>
  834. </chainedmapper>
  835. </pathconvert>
  836. <taskdef classname="org.netbeans.modules.java.j2seproject.copylibstask.CopyLibs" classpath="${libs.CopyLibs.classpath}" name="copylibs"/>
  837. <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}">
  838. <fileset dir="${build.classes.dir}"/>
  839. <manifest>
  840. <attribute name="Class-Path" value="${jar.classpath}"/>
  841. <customize/>
  842. </manifest>
  843. </copylibs>
  844. </sequential>
  845. </macrodef>
  846. </target>
  847. <target name="-init-presetdef-jar">
  848. <presetdef name="jar" uri="http://www.netbeans.org/ns/j2se-project/1">
  849. <jar compress="${jar.compress}" index="${jar.index}" jarfile="${dist.jar}">
  850. <j2seproject1:fileset dir="${build.classes.dir}"/>
  851. </jar>
  852. </presetdef>
  853. </target>
  854. <target name="-init-ap-cmdline-properties">
  855. <property name="annotation.processing.enabled" value="true"/>
  856. <property name="annotation.processing.processors.list" value=""/>
  857. <property name="annotation.processing.processor.options" value=""/>
  858. <property name="annotation.processing.run.all.processors" value="true"/>
  859. <property name="javac.processorpath" value="${javac.classpath}"/>
  860. <property name="javac.test.processorpath" value="${javac.test.classpath}"/>
  861. <condition property="ap.supported.internal" value="true">
  862. <not>
  863. <matches pattern="1\.[0-5](\..*)?" string="${javac.source}"/>
  864. </not>
  865. </condition>
  866. </target>
  867. <target depends="-init-ap-cmdline-properties" if="ap.supported.internal" name="-init-ap-cmdline-supported">
  868. <condition else="" property="ap.processors.internal" value="-processor ${annotation.processing.processors.list}">
  869. <isfalse value="${annotation.processing.run.all.processors}"/>
  870. </condition>
  871. <condition else="" property="ap.proc.none.internal" value="-proc:none">
  872. <isfalse value="${annotation.processing.enabled}"/>
  873. </condition>
  874. </target>
  875. <target depends="-init-ap-cmdline-properties,-init-ap-cmdline-supported" name="-init-ap-cmdline">
  876. <property name="ap.cmd.line.internal" value=""/>
  877. </target>
  878. <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"/>
  879. <!--
  880. ===================
  881. COMPILATION SECTION
  882. ===================
  883. -->
  884. <target name="-deps-jar-init" unless="built-jar.properties">
  885. <property location="${build.dir}/built-jar.properties" name="built-jar.properties"/>
  886. <delete file="${built-jar.properties}" quiet="true"/>
  887. </target>
  888. <target if="already.built.jar.${basedir}" name="-warn-already-built-jar">
  889. <echo level="warn" message="Cycle detected: GBP was already built"/>
  890. </target>
  891. <target depends="init,-deps-jar-init" name="deps-jar" unless="no.deps">
  892. <mkdir dir="${build.dir}"/>
  893. <touch file="${built-jar.properties}" verbose="false"/>
  894. <property file="${built-jar.properties}" prefix="already.built.jar."/>
  895. <antcall target="-warn-already-built-jar"/>
  896. <propertyfile file="${built-jar.properties}">
  897. <entry key="${basedir}" value=""/>
  898. </propertyfile>
  899. </target>
  900. <target depends="init,-check-automatic-build,-clean-after-automatic-build" name="-verify-automatic-build"/>
  901. <target depends="init" name="-check-automatic-build">
  902. <available file="${build.classes.dir}/.netbeans_automatic_build" property="netbeans.automatic.build"/>
  903. </target>
  904. <target depends="init" if="netbeans.automatic.build" name="-clean-after-automatic-build">
  905. <antcall target="clean"/>
  906. </target>
  907. <target depends="init,deps-jar" name="-pre-pre-compile">
  908. <mkdir dir="${build.classes.dir}"/>
  909. </target>
  910. <target name="-pre-compile">
  911. <!-- Empty placeholder for easier customization. -->
  912. <!-- You can override this target in the ../build.xml file. -->
  913. </target>
  914. <target if="do.depend.true" name="-compile-depend">
  915. <pathconvert property="build.generated.subdirs">
  916. <dirset dir="${build.generated.sources.dir}" erroronmissingdir="false">
  917. <include name="*"/>
  918. </dirset>
  919. </pathconvert>
  920. <j2seproject3:depend srcdir="${src.dir}:${build.generated.subdirs}"/>
  921. </target>
  922. <target depends="init,deps-jar,-pre-pre-compile,-pre-compile, -copy-persistence-xml,-compile-depend" if="have.sources" name="-do-compile">
  923. <j2seproject3:javac gensrcdir="${build.generated.sources.dir}"/>
  924. <copy todir="${build.classes.dir}">
  925. <fileset dir="${src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
  926. </copy>
  927. </target>
  928. <target if="has.persistence.xml" name="-copy-persistence-xml">
  929. <mkdir dir="${build.classes.dir}/META-INF"/>
  930. <copy todir="${build.classes.dir}/META-INF">
  931. <fileset dir="${meta.inf.dir}" includes="persistence.xml orm.xml"/>
  932. </copy>
  933. </target>
  934. <target name="-post-compile">
  935. <!-- Empty placeholder for easier customization. -->
  936. <!-- You can override this target in the ../build.xml file. -->
  937. </target>
  938. <target depends="init,deps-jar,-verify-automatic-build,-pre-pre-compile,-pre-compile,-do-compile,-post-compile" description="Compile project." name="compile"/>
  939. <target name="-pre-compile-single">
  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,-pre-pre-compile" name="-do-compile-single">
  944. <fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail>
  945. <j2seproject3:force-recompile/>
  946. <j2seproject3:javac excludes="" gensrcdir="${build.generated.sources.dir}" includes="${javac.includes}" sourcepath="${src.dir}"/>
  947. </target>
  948. <target name="-post-compile-single">
  949. <!-- Empty placeholder for easier customization. -->
  950. <!-- You can override this target in the ../build.xml file. -->
  951. </target>
  952. <target depends="init,deps-jar,-verify-automatic-build,-pre-pre-compile,-pre-compile-single,-do-compile-single,-post-compile-single" name="compile-single"/>
  953. <!--
  954. ====================
  955. JAR BUILDING SECTION
  956. ====================
  957. -->
  958. <target depends="init" name="-pre-pre-jar">
  959. <dirname file="${dist.jar}" property="dist.jar.dir"/>
  960. <mkdir dir="${dist.jar.dir}"/>
  961. </target>
  962. <target name="-pre-jar">
  963. <!-- Empty placeholder for easier customization. -->
  964. <!-- You can override this target in the ../build.xml file. -->
  965. </target>
  966. <target depends="init,compile,-pre-pre-jar,-pre-jar" if="do.archive" name="-do-jar-without-manifest" unless="manifest.available-mkdist.available">
  967. <j2seproject1:jar/>
  968. </target>
  969. <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">
  970. <j2seproject1:jar manifest="${manifest.file}"/>
  971. </target>
  972. <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">
  973. <j2seproject1:jar manifest="${manifest.file}">
  974. <j2seproject1:manifest>
  975. <j2seproject1:attribute name="Main-Class" value="${main.class}"/>
  976. </j2seproject1:manifest>
  977. </j2seproject1:jar>
  978. <echo level="info">To run this application from the command line without Ant, try:</echo>
  979. <property location="${build.classes.dir}" name="build.classes.dir.resolved"/>
  980. <property location="${dist.jar}" name="dist.jar.resolved"/>
  981. <pathconvert property="run.classpath.with.dist.jar">
  982. <path path="${run.classpath}"/>
  983. <map from="${build.classes.dir.resolved}" to="${dist.jar.resolved}"/>
  984. </pathconvert>
  985. <echo level="info">java -cp "${run.classpath.with.dist.jar}" ${main.class}</echo>
  986. </target>
  987. <target depends="init" if="do.archive" name="-do-jar-with-libraries-create-manifest" unless="manifest.available">
  988. <tempfile deleteonexit="true" destdir="${build.dir}" property="tmp.manifest.file"/>
  989. <touch file="${tmp.manifest.file}" verbose="false"/>
  990. </target>
  991. <target depends="init" if="do.archive+manifest.available" name="-do-jar-with-libraries-copy-manifest">
  992. <tempfile deleteonexit="true" destdir="${build.dir}" property="tmp.manifest.file"/>
  993. <copy file="${manifest.file}" tofile="${tmp.manifest.file}"/>
  994. </target>
  995. <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">
  996. <manifest file="${tmp.manifest.file}" mode="update">
  997. <attribute name="Main-Class" value="${main.class}"/>
  998. </manifest>
  999. </target>
  1000. <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">
  1001. <basename file="${application.splash}" property="splashscreen.basename"/>
  1002. <mkdir dir="${build.classes.dir}/META-INF"/>
  1003. <copy failonerror="false" file="${application.splash}" todir="${build.classes.dir}/META-INF"/>
  1004. <manifest file="${tmp.manifest.file}" mode="update">
  1005. <attribute name="SplashScreen-Image" value="META-INF/${splashscreen.basename}"/>
  1006. </manifest>
  1007. </target>
  1008. <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">
  1009. <j2seproject3:copylibs manifest="${tmp.manifest.file}"/>
  1010. <echo level="info">To run this application from the command line without Ant, try:</echo>
  1011. <property location="${dist.jar}" name="dist.jar.resolved"/>
  1012. <echo level="info">java -jar "${dist.jar.resolved}"</echo>
  1013. </target>
  1014. <target depends="-do-jar-with-libraries-pack" if="do.archive" name="-do-jar-with-libraries-delete-manifest">
  1015. <delete>
  1016. <fileset file="${tmp.manifest.file}"/>
  1017. </delete>
  1018. </target>
  1019. <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"/>
  1020. <target name="-post-jar">
  1021. <!-- Empty placeholder for easier customization. -->
  1022. <!-- You can override this target in the ../build.xml file. -->
  1023. </target>
  1024. <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"/>
  1025. <!--
  1026. =================
  1027. EXECUTION SECTION
  1028. =================
  1029. -->
  1030. <target depends="init,compile" description="Run a main class." name="run">
  1031. <j2seproject1:java>
  1032. <customize>
  1033. <arg line="${application.args}"/>
  1034. </customize>
  1035. </j2seproject1:java>
  1036. </target>
  1037. <target name="-do-not-recompile">
  1038. <property name="javac.includes.binary" value=""/>
  1039. </target>
  1040. <target depends="init,compile-single" name="run-single">
  1041. <fail unless="run.class">Must select one file in the IDE or set run.class</fail>
  1042. <j2seproject1:java classname="${run.class}"/>
  1043. </target>
  1044. <target depends="init,compile-test-single" name="run-test-with-main">
  1045. <fail unless="run.class">Must select one file in the IDE or set run.class</fail>
  1046. <j2seproject1:java classname="${run.class}" classpath="${run.test.classpath}"/>
  1047. </target>
  1048. <!--
  1049. =================
  1050. DEBUGGING SECTION
  1051. =================
  1052. -->
  1053. <target depends="init" if="netbeans.home" name="-debug-start-debugger">
  1054. <j2seproject1:nbjpdastart name="${debug.class}"/>
  1055. </target>
  1056. <target depends="init" if="netbeans.home" name="-debug-start-debugger-main-test">
  1057. <j2seproject1:nbjpdastart classpath="${debug.test.classpath}" name="${debug.class}"/>
  1058. </target>
  1059. <target depends="init,compile" name="-debug-start-debuggee">
  1060. <j2seproject3:debug>
  1061. <customize>
  1062. <arg line="${application.args}"/>
  1063. </customize>
  1064. </j2seproject3:debug>
  1065. </target>
  1066. <target depends="init,compile,-debug-start-debugger,-debug-start-debuggee" description="Debug project in IDE." if="netbeans.home" name="debug"/>
  1067. <target depends="init" if="netbeans.home" name="-debug-start-debugger-stepinto">
  1068. <j2seproject1:nbjpdastart stopclassname="${main.class}"/>
  1069. </target>
  1070. <target depends="init,compile,-debug-start-debugger-stepinto,-debug-start-debuggee" if="netbeans.home" name="debug-stepinto"/>
  1071. <target depends="init,compile-single" if="netbeans.home" name="-debug-start-debuggee-single">
  1072. <fail unless="debug.class">Must select one file in the IDE or set debug.class</fail>
  1073. <j2seproject3:debug classname="${debug.class}"/>
  1074. </target>
  1075. <target depends="init,compile-single,-debug-start-debugger,-debug-start-debuggee-single" if="netbeans.home" name="debug-single"/>
  1076. <target depends="init,compile-test-single" if="netbeans.home" name="-debug-start-debuggee-main-test">
  1077. <fail unless="debug.class">Must select one file in the IDE or set debug.class</fail>
  1078. <j2seproject3:debug classname="${debug.class}" classpath="${debug.test.classpath}"/>
  1079. </target>
  1080. <target depends="init,compile-test-single,-debug-start-debugger-main-test,-debug-start-debuggee-main-test" if="netbeans.home" name="debug-test-with-main"/>
  1081. <target depends="init" name="-pre-debug-fix">
  1082. <fail unless="fix.includes">Must set fix.includes</fail>
  1083. <property name="javac.includes" value="${fix.includes}.java"/>
  1084. </target>
  1085. <target depends="init,-pre-debug-fix,compile-single" if="netbeans.home" name="-do-debug-fix">
  1086. <j2seproject1:nbjpdareload/>
  1087. </target>
  1088. <target depends="init,-pre-debug-fix,-do-debug-fix" if="netbeans.home" name="debug-fix"/>
  1089. <!--
  1090. =================
  1091. PROFILING SECTION
  1092. =================
  1093. -->
  1094. <!--
  1095. pre NB7.2 profiler integration
  1096. -->
  1097. <target depends="profile-init,compile" description="Profile a project in the IDE." if="profiler.info.jvmargs.agent" name="-profile-pre72">
  1098. <fail unless="netbeans.home">This target only works when run from inside the NetBeans IDE.</fail>
  1099. <nbprofiledirect>
  1100. <classpath>
  1101. <path path="${run.classpath}"/>
  1102. </classpath>
  1103. </nbprofiledirect>
  1104. <profile/>
  1105. </target>
  1106. <target depends="profile-init,compile-single" description="Profile a selected class in the IDE." if="profiler.info.jvmargs.agent" name="-profile-single-pre72">
  1107. <fail unless="profile.class">Must select one file in the IDE or set profile.class</fail>
  1108. <fail unless="netbeans.home">This target only works when run from inside the NetBeans IDE.</fail>
  1109. <nbprofiledirect>
  1110. <classpath>
  1111. <path path="${run.classpath}"/>
  1112. </classpath>
  1113. </nbprofiledirect>
  1114. <profile classname="${profile.class}"/>
  1115. </target>
  1116. <target depends="profile-init,compile-single" if="profiler.info.jvmargs.agent" name="-profile-applet-pre72">
  1117. <fail unless="netbeans.home">This target only works when run from inside the NetBeans IDE.</fail>
  1118. <nbprofiledirect>
  1119. <classpath>
  1120. <path path="${run.classpath}"/>
  1121. </classpath>
  1122. </nbprofiledirect>
  1123. <profile classname="sun.applet.AppletViewer">
  1124. <customize>
  1125. <arg value="${applet.url}"/>
  1126. </customize>
  1127. </profile>
  1128. </target>
  1129. <target depends="profile-init,compile-test-single" if="profiler.info.jvmargs.agent" name="-profile-test-single-pre72">
  1130. <fail unless="netbeans.home">This target only works when run from inside the NetBeans IDE.</fail>
  1131. <nbprofiledirect>
  1132. <classpath>
  1133. <path path="${run.test.classpath}"/>
  1134. </classpath>
  1135. </nbprofiledirect>
  1136. <junit dir="${profiler.info.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" jvm="${profiler.info.jvm}" showoutput="true">
  1137. <env key="${profiler.info.pathvar}" path="${profiler.info.agentpath}:${profiler.current.path}"/>
  1138. <jvmarg value="${profiler.info.jvmargs.agent}"/>
  1139. <jvmarg line="${profiler.info.jvmargs}"/>
  1140. <test name="${profile.class}"/>
  1141. <classpath>
  1142. <path path="${run.test.classpath}"/>
  1143. </classpath>
  1144. <syspropertyset>
  1145. <propertyref prefix="test-sys-prop."/>
  1146. <mapper from="test-sys-prop.*" to="*" type="glob"/>
  1147. </syspropertyset>
  1148. <formatter type="brief" usefile="false"/>
  1149. <formatter type="xml"/>
  1150. </junit>
  1151. </target>
  1152. <!--
  1153. end of pre NB72 profiling section
  1154. -->
  1155. <target if="netbeans.home" name="-profile-check">
  1156. <condition property="profiler.configured">
  1157. <or>
  1158. <contains casesensitive="true" string="${run.jvmargs.ide}" substring="-agentpath:"/>
  1159. <contains casesensitive="true" string="${run.jvmargs.ide}" substring="-javaagent:"/>
  1160. </or>
  1161. </condition>
  1162. </target>
  1163. <target depends="-profile-check,-profile-pre72" description="Profile a project in the IDE." if="profiler.configured" name="profile" unless="profiler.info.jvmargs.agent">
  1164. <startprofiler/>
  1165. <antcall target="run"/>
  1166. </target>
  1167. <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">
  1168. <fail unless="run.class">Must select one file in the IDE or set run.class</fail>
  1169. <startprofiler/>
  1170. <antcall target="run-single"/>
  1171. </target>
  1172. <target depends="-profile-test-single-pre72" description="Profile a selected test in the IDE." name="profile-test-single"/>
  1173. <target depends="-profile-check" description="Profile a selected test in the IDE." if="profiler.configured" name="profile-test" unless="profiler.info.jvmargs">
  1174. <fail unless="test.includes">Must select some files in the IDE or set test.includes</fail>
  1175. <startprofiler/>
  1176. <antcall target="test-single"/>
  1177. </target>
  1178. <target depends="-profile-check" description="Profile a selected class in the IDE." if="profiler.configured" name="profile-test-with-main">
  1179. <fail unless="run.class">Must select one file in the IDE or set run.class</fail>
  1180. <startprofiler/>
  1181. <antcal target="run-test-with-main"/>
  1182. </target>
  1183. <target depends="-profile-check,-profile-applet-pre72" if="profiler.configured" name="profile-applet" unless="profiler.info.jvmargs.agent">
  1184. <fail unless="applet.url">Must select one file in the IDE or set applet.url</fail>
  1185. <startprofiler/>
  1186. <antcall target="run-applet"/>
  1187. </target>
  1188. <!--
  1189. ===============
  1190. JAVADOC SECTION
  1191. ===============
  1192. -->
  1193. <target depends="init" if="have.sources" name="-javadoc-build">
  1194. <mkdir dir="${dist.javadoc.dir}"/>
  1195. <condition else="" property="javadoc.endorsed.classpath.cmd.line.arg" value="-J${endorsed.classpath.cmd.line.arg}">
  1196. <and>
  1197. <isset property="endorsed.classpath.cmd.line.arg"/>
  1198. <not>
  1199. <equals arg1="${endorsed.classpath.cmd.line.arg}" arg2=""/>
  1200. </not>
  1201. </and>
  1202. </condition>
  1203. <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}">
  1204. <classpath>
  1205. <path path="${javac.classpath}"/>
  1206. </classpath>
  1207. <fileset dir="${src.dir}" excludes="*.java,${excludes}" includes="${includes}">
  1208. <filename name="**/*.java"/>
  1209. </fileset>
  1210. <fileset dir="${build.generated.sources.dir}" erroronmissingdir="false">
  1211. <include name="**/*.java"/>
  1212. <exclude name="*.java"/>
  1213. </fileset>
  1214. <arg line="${javadoc.endorsed.classpath.cmd.line.arg}"/>
  1215. </javadoc>
  1216. <copy todir="${dist.javadoc.dir}">
  1217. <fileset dir="${src.dir}" excludes="${excludes}" includes="${includes}">
  1218. <filename name="**/doc-files/**"/>
  1219. </fileset>
  1220. <fileset dir="${build.generated.sources.dir}" erroronmissingdir="false">
  1221. <include name="**/doc-files/**"/>
  1222. </fileset>
  1223. </copy>
  1224. </target>
  1225. <target depends="init,-javadoc-build" if="netbeans.home" name="-javadoc-browse" unless="no.javadoc.preview">
  1226. <nbbrowse file="${dist.javadoc.dir}/index.html"/>
  1227. </target>
  1228. <target depends="init,-javadoc-build,-javadoc-browse" description="Build Javadoc." name="javadoc"/>
  1229. <!--
  1230. =========================
  1231. TEST COMPILATION SECTION
  1232. =========================
  1233. -->
  1234. <target depends="init,compile" if="have.tests" name="-pre-pre-compile-test">
  1235. <mkdir dir="${build.test.classes.dir}"/>
  1236. </target>
  1237. <target name="-pre-compile-test">
  1238. <!-- Empty placeholder for easier customization. -->
  1239. <!-- You can override this target in the ../build.xml file. -->
  1240. </target>
  1241. <target if="do.depend.true" name="-compile-test-depend">
  1242. <j2seproject3:depend classpath="${javac.test.classpath}" destdir="${build.test.classes.dir}" srcdir="${test.src.dir}"/>
  1243. </target>
  1244. <target depends="init,deps-jar,compile,-pre-pre-compile-test,-pre-compile-test,-compile-test-depend" if="have.tests" name="-do-compile-test">
  1245. <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}"/>
  1246. <copy todir="${build.test.classes.dir}">
  1247. <fileset dir="${test.src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
  1248. </copy>
  1249. </target>
  1250. <target name="-post-compile-test">
  1251. <!-- Empty placeholder for easier customization. -->
  1252. <!-- You can override this target in the ../build.xml file. -->
  1253. </target>
  1254. <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test,-do-compile-test,-post-compile-test" name="compile-test"/>
  1255. <target name="-pre-compile-test-single">
  1256. <!-- Empty placeholder for easier customization. -->
  1257. <!-- You can override this target in the ../build.xml file. -->
  1258. </target>
  1259. <target depends="init,deps-jar,compile,-pre-pre-compile-test,-pre-compile-test-single" if="have.tests" name="-do-compile-test-single">
  1260. <fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail>
  1261. <j2seproject3:force-recompile destdir="${build.test.classes.dir}"/>
  1262. <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}"/>
  1263. <copy todir="${build.test.classes.dir}">
  1264. <fileset dir="${test.src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
  1265. </copy>
  1266. </target>
  1267. <target name="-post-compile-test-single">
  1268. <!-- Empty placeholder for easier customization. -->
  1269. <!-- You can override this target in the ../build.xml file. -->
  1270. </target>
  1271. <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test-single,-do-compile-test-single,-post-compile-test-single" name="compile-test-single"/>
  1272. <!--
  1273. =======================
  1274. TEST EXECUTION SECTION
  1275. =======================
  1276. -->
  1277. <target depends="init" if="have.tests" name="-pre-test-run">
  1278. <mkdir dir="${build.test.results.dir}"/>
  1279. </target>
  1280. <target depends="init,compile-test,-pre-test-run" if="have.tests" name="-do-test-run">
  1281. <j2seproject3:test testincludes="**/*Test.java"/>
  1282. </target>
  1283. <target depends="init,compile-test,-pre-test-run,-do-test-run" if="have.tests" name="-post-test-run">
  1284. <fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail>
  1285. </target>
  1286. <target depends="init" if="have.tests" name="test-report"/>
  1287. <target depends="init" if="netbeans.home+have.tests" name="-test-browse"/>
  1288. <target depends="init,compile-test,-pre-test-run,-do-test-run,test-report,-post-test-run,-test-browse" description="Run unit tests." name="test"/>
  1289. <target depends="init" if="have.tests" name="-pre-test-run-single">
  1290. <mkdir dir="${build.test.results.dir}"/>
  1291. </target>
  1292. <target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-do-test-run-single">
  1293. <fail unless="test.includes">Must select some files in the IDE or set test.includes</fail>
  1294. <j2seproject3:test excludes="" includes="${test.includes}" testincludes="${test.includes}"/>
  1295. </target>
  1296. <target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single" if="have.tests" name="-post-test-run-single">
  1297. <fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail>
  1298. </target>
  1299. <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"/>
  1300. <target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-do-test-run-single-method">
  1301. <fail unless="test.class">Must select some files in the IDE or set test.class</fail>
  1302. <fail unless="test.method">Must select some method in the IDE or set test.method</fail>
  1303. <j2seproject3:test excludes="" includes="${javac.includes}" testincludes="${test.class}" testmethods="${test.method}"/>
  1304. </target>
  1305. <target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single-method" if="have.tests" name="-post-test-run-single-method">
  1306. <fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail>
  1307. </target>
  1308. <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"/>
  1309. <!--
  1310. =======================
  1311. TEST DEBUGGING SECTION
  1312. =======================
  1313. -->
  1314. <target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-debug-start-debuggee-test">
  1315. <fail unless="test.class">Must select one file in the IDE or set test.class</fail>
  1316. <j2seproject3:test-debug excludes="" includes="${javac.includes}" testClass="${test.class}" testincludes="${javac.includes}"/>
  1317. </target>
  1318. <target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-debug-start-debuggee-test-method">
  1319. <fail unless="test.class">Must select one file in the IDE or set test.class</fail>
  1320. <fail unless="test.method">Must select some method in the IDE or set test.method</fail>
  1321. <j2seproject3:test-debug excludes="" includes="${javac.includes}" testClass="${test.class}" testMethod="${test.method}" testincludes="${test.class}" testmethods="${test.method}"/>
  1322. </target>
  1323. <target depends="init,compile-test" if="netbeans.home+have.tests" name="-debug-start-debugger-test">
  1324. <j2seproject1:nbjpdastart classpath="${debug.test.classpath}" name="${test.class}"/>
  1325. </target>
  1326. <target depends="init,compile-test-single,-debug-start-debugger-test,-debug-start-debuggee-test" name="debug-test"/>
  1327. <target depends="init,compile-test-single,-debug-start-debugger-test,-debug-start-debuggee-test-method" name="debug-test-method"/>
  1328. <target depends="init,-pre-debug-fix,compile-test-single" if="netbeans.home" name="-do-debug-fix-test">
  1329. <j2seproject1:nbjpdareload dir="${build.test.classes.dir}"/>
  1330. </target>
  1331. <target depends="init,-pre-debug-fix,-do-debug-fix-test" if="netbeans.home" name="debug-fix-test"/>
  1332. <!--
  1333. =========================
  1334. APPLET EXECUTION SECTION
  1335. =========================
  1336. -->
  1337. <target depends="init,compile-single" name="run-applet">
  1338. <fail unless="applet.url">Must select one file in the IDE or set applet.url</fail>
  1339. <j2seproject1:java classname="sun.applet.AppletViewer">
  1340. <customize>
  1341. <arg value="${applet.url}"/>
  1342. </customize>
  1343. </j2seproject1:java>
  1344. </target>
  1345. <!--
  1346. =========================
  1347. APPLET DEBUGGING SECTION
  1348. =========================
  1349. -->
  1350. <target depends="init,compile-single" if="netbeans.home" name="-debug-start-debuggee-applet">
  1351. <fail unless="applet.url">Must select one file in the IDE or set applet.url</fail>
  1352. <j2seproject3:debug classname="sun.applet.AppletViewer">
  1353. <customize>
  1354. <arg value="${applet.url}"/>
  1355. </customize>
  1356. </j2seproject3:debug>
  1357. </target>
  1358. <target depends="init,compile-single,-debug-start-debugger,-debug-start-debuggee-applet" if="netbeans.home" name="debug-applet"/>
  1359. <!--
  1360. ===============
  1361. CLEANUP SECTION
  1362. ===============
  1363. -->
  1364. <target name="-deps-clean-init" unless="built-clean.properties">
  1365. <property location="${build.dir}/built-clean.properties" name="built-clean.properties"/>
  1366. <delete file="${built-clean.properties}" quiet="true"/>
  1367. </target>
  1368. <target if="already.built.clean.${basedir}" name="-warn-already-built-clean">
  1369. <echo level="warn" message="Cycle detected: GBP was already built"/>
  1370. </target>
  1371. <target depends="init,-deps-clean-init" name="deps-clean" unless="no.deps">
  1372. <mkdir dir="${build.dir}"/>
  1373. <touch file="${built-clean.properties}" verbose="false"/>
  1374. <property file="${built-clean.properties}" prefix="already.built.clean."/>
  1375. <antcall target="-warn-already-built-clean"/>
  1376. <propertyfile file="${built-clean.properties}">
  1377. <entry key="${basedir}" value=""/>
  1378. </propertyfile>
  1379. </target>
  1380. <target depends="init" name="-do-clean">
  1381. <delete dir="${build.dir}"/>
  1382. <delete dir="${dist.dir}" followsymlinks="false" includeemptydirs="true"/>
  1383. </target>
  1384. <target name="-post-clean">
  1385. <!-- Empty placeholder for easier customization. -->
  1386. <!-- You can override this target in the ../build.xml file. -->
  1387. </target>
  1388. <target depends="init,deps-clean,-do-clean,-post-clean" description="Clean build products." name="clean"/>
  1389. <target name="-check-call-dep">
  1390. <property file="${call.built.properties}" prefix="already.built."/>
  1391. <condition property="should.call.dep">
  1392. <and>
  1393. <not>
  1394. <isset property="already.built.${call.subproject}"/>
  1395. </not>
  1396. <available file="${call.script}"/>
  1397. </and>
  1398. </condition>
  1399. </target>
  1400. <target depends="-check-call-dep" if="should.call.dep" name="-maybe-call-dep">
  1401. <ant antfile="${call.script}" inheritall="false" target="${call.target}">
  1402. <propertyset>
  1403. <propertyref prefix="transfer."/>
  1404. <mapper from="transfer.*" to="*" type="glob"/>
  1405. </propertyset>
  1406. </ant>
  1407. </target>
  1408. </project>