build-impl.xml 76 KB

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