You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

build-impl.xml 78KB

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