build-impl.xml 76 KB

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