build-impl.xml 78 KB

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