build-impl.xml 78 KB

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