build-impl.xml 77KB

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