build-impl.xml 76 KB

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