build-impl.xml 78 KB

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