build-impl.xml 78 KB

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