build-impl.xml 78 KB

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