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

build-impl.xml 76KB

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