Java IRC bot
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

build-impl.xml 39KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730
  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. - junit compilation
  14. - junit execution
  15. - junit 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="charliebravo-impl">
  20. <fail message="Please build using Ant 1.7.1 or higher.">
  21. <condition>
  22. <not>
  23. <antversion atleast="1.7.1"/>
  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="manifest.available+main.class">
  56. <and>
  57. <isset property="manifest.available"/>
  58. <isset property="main.class"/>
  59. <not>
  60. <equals arg1="${main.class}" arg2="" trim="true"/>
  61. </not>
  62. </and>
  63. </condition>
  64. <condition property="manifest.available+main.class+mkdist.available">
  65. <and>
  66. <istrue value="${manifest.available+main.class}"/>
  67. <isset property="libs.CopyLibs.classpath"/>
  68. </and>
  69. </condition>
  70. <condition property="have.tests">
  71. <or>
  72. <available file="${test.src.dir}"/>
  73. </or>
  74. </condition>
  75. <condition property="have.sources">
  76. <or>
  77. <available file="${src.src4.dir}"/>
  78. <available file="${src.java.dir}"/>
  79. <available file="${src.src3.dir}"/>
  80. <available file="${src.src2.dir}"/>
  81. <available file="${src.src.dir}"/>
  82. <available file="${src.dir}"/>
  83. </or>
  84. </condition>
  85. <condition property="netbeans.home+have.tests">
  86. <and>
  87. <isset property="netbeans.home"/>
  88. <isset property="have.tests"/>
  89. </and>
  90. </condition>
  91. <condition property="no.javadoc.preview">
  92. <and>
  93. <isset property="javadoc.preview"/>
  94. <isfalse value="${javadoc.preview}"/>
  95. </and>
  96. </condition>
  97. <property name="run.jvmargs" value=""/>
  98. <property name="javac.compilerargs" value=""/>
  99. <property name="work.dir" value="${basedir}"/>
  100. <condition property="no.deps">
  101. <and>
  102. <istrue value="${no.dependencies}"/>
  103. </and>
  104. </condition>
  105. <property name="javac.debug" value="true"/>
  106. <property name="javadoc.preview" value="true"/>
  107. <property name="application.args" value=""/>
  108. <property name="source.encoding" value="${file.encoding}"/>
  109. <condition property="javadoc.encoding.used" value="${javadoc.encoding}">
  110. <and>
  111. <isset property="javadoc.encoding"/>
  112. <not>
  113. <equals arg1="${javadoc.encoding}" arg2=""/>
  114. </not>
  115. </and>
  116. </condition>
  117. <property name="javadoc.encoding.used" value="${source.encoding}"/>
  118. <property name="includes" value="**"/>
  119. <property name="excludes" value=""/>
  120. <property name="do.depend" value="false"/>
  121. <condition property="do.depend.true">
  122. <istrue value="${do.depend}"/>
  123. </condition>
  124. <condition else="" property="javac.compilerargs.jaxws" value="-Djava.endorsed.dirs='${jaxws.endorsed.dir}'">
  125. <and>
  126. <isset property="jaxws.endorsed.dir"/>
  127. <available file="nbproject/jaxws-build.xml"/>
  128. </and>
  129. </condition>
  130. </target>
  131. <target name="-post-init">
  132. <!-- Empty placeholder for easier customization. -->
  133. <!-- You can override this target in the ../build.xml file. -->
  134. </target>
  135. <target depends="-pre-init,-init-private,-init-user,-init-project,-do-init" name="-init-check">
  136. <fail unless="src.src4.dir">Must set src.src4.dir</fail>
  137. <fail unless="src.java.dir">Must set src.java.dir</fail>
  138. <fail unless="src.src3.dir">Must set src.src3.dir</fail>
  139. <fail unless="src.src2.dir">Must set src.src2.dir</fail>
  140. <fail unless="src.src.dir">Must set src.src.dir</fail>
  141. <fail unless="src.dir">Must set src.dir</fail>
  142. <fail unless="test.src.dir">Must set test.src.dir</fail>
  143. <fail unless="build.dir">Must set build.dir</fail>
  144. <fail unless="dist.dir">Must set dist.dir</fail>
  145. <fail unless="build.classes.dir">Must set build.classes.dir</fail>
  146. <fail unless="dist.javadoc.dir">Must set dist.javadoc.dir</fail>
  147. <fail unless="build.test.classes.dir">Must set build.test.classes.dir</fail>
  148. <fail unless="build.test.results.dir">Must set build.test.results.dir</fail>
  149. <fail unless="build.classes.excludes">Must set build.classes.excludes</fail>
  150. <fail unless="dist.jar">Must set dist.jar</fail>
  151. </target>
  152. <target name="-init-macrodef-property">
  153. <macrodef name="property" uri="http://www.netbeans.org/ns/j2se-project/1">
  154. <attribute name="name"/>
  155. <attribute name="value"/>
  156. <sequential>
  157. <property name="@{name}" value="${@{value}}"/>
  158. </sequential>
  159. </macrodef>
  160. </target>
  161. <target name="-init-macrodef-javac">
  162. <macrodef name="javac" uri="http://www.netbeans.org/ns/j2se-project/3">
  163. <attribute default="${src.src4.dir}:${src.java.dir}:${src.src3.dir}:${src.src2.dir}:${src.src.dir}:${src.dir}" name="srcdir"/>
  164. <attribute default="${build.classes.dir}" name="destdir"/>
  165. <attribute default="${javac.classpath}" name="classpath"/>
  166. <attribute default="${includes}" name="includes"/>
  167. <attribute default="${excludes}" name="excludes"/>
  168. <attribute default="${javac.debug}" name="debug"/>
  169. <attribute default="${empty.dir}" name="sourcepath"/>
  170. <attribute default="${empty.dir}" name="gensrcdir"/>
  171. <element name="customize" optional="true"/>
  172. <sequential>
  173. <property location="${build.dir}/empty" name="empty.dir"/>
  174. <mkdir dir="${empty.dir}"/>
  175. <javac debug="@{debug}" deprecation="${javac.deprecation}" destdir="@{destdir}" encoding="${source.encoding}" excludes="@{excludes}" includeantruntime="false" includes="@{includes}" source="${javac.source}" sourcepath="@{sourcepath}" srcdir="@{srcdir}" target="${javac.target}">
  176. <src>
  177. <dirset dir="@{gensrcdir}" erroronmissingdir="false">
  178. <include name="*"/>
  179. </dirset>
  180. </src>
  181. <classpath>
  182. <path path="@{classpath}"/>
  183. </classpath>
  184. <compilerarg line="${javac.compilerargs} ${javac.compilerargs.jaxws}"/>
  185. <customize/>
  186. </javac>
  187. </sequential>
  188. </macrodef>
  189. <macrodef name="depend" uri="http://www.netbeans.org/ns/j2se-project/3">
  190. <attribute default="${src.src4.dir}:${src.java.dir}:${src.src3.dir}:${src.src2.dir}:${src.src.dir}:${src.dir}" name="srcdir"/>
  191. <attribute default="${build.classes.dir}" name="destdir"/>
  192. <attribute default="${javac.classpath}" name="classpath"/>
  193. <sequential>
  194. <depend cache="${build.dir}/depcache" destdir="@{destdir}" excludes="${excludes}" includes="${includes}" srcdir="@{srcdir}">
  195. <classpath>
  196. <path path="@{classpath}"/>
  197. </classpath>
  198. </depend>
  199. </sequential>
  200. </macrodef>
  201. <macrodef name="force-recompile" uri="http://www.netbeans.org/ns/j2se-project/3">
  202. <attribute default="${build.classes.dir}" name="destdir"/>
  203. <sequential>
  204. <fail unless="javac.includes">Must set javac.includes</fail>
  205. <pathconvert pathsep="," property="javac.includes.binary">
  206. <path>
  207. <filelist dir="@{destdir}" files="${javac.includes}"/>
  208. </path>
  209. <globmapper from="*.java" to="*.class"/>
  210. </pathconvert>
  211. <delete>
  212. <files includes="${javac.includes.binary}"/>
  213. </delete>
  214. </sequential>
  215. </macrodef>
  216. </target>
  217. <target name="-init-macrodef-junit">
  218. <macrodef name="junit" uri="http://www.netbeans.org/ns/j2se-project/3">
  219. <attribute default="${includes}" name="includes"/>
  220. <attribute default="${excludes}" name="excludes"/>
  221. <attribute default="**" name="testincludes"/>
  222. <sequential>
  223. <junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" showoutput="true">
  224. <batchtest todir="${build.test.results.dir}">
  225. <fileset dir="${test.src.dir}" excludes="@{excludes},${excludes}" includes="@{includes}">
  226. <filename name="@{testincludes}"/>
  227. </fileset>
  228. </batchtest>
  229. <classpath>
  230. <path path="${run.test.classpath}"/>
  231. </classpath>
  232. <syspropertyset>
  233. <propertyref prefix="test-sys-prop."/>
  234. <mapper from="test-sys-prop.*" to="*" type="glob"/>
  235. </syspropertyset>
  236. <formatter type="brief" usefile="false"/>
  237. <formatter type="xml"/>
  238. <jvmarg line="${run.jvmargs}"/>
  239. </junit>
  240. </sequential>
  241. </macrodef>
  242. </target>
  243. <target depends="-init-debug-args" name="-init-macrodef-nbjpda">
  244. <macrodef name="nbjpdastart" uri="http://www.netbeans.org/ns/j2se-project/1">
  245. <attribute default="${main.class}" name="name"/>
  246. <attribute default="${debug.classpath}" name="classpath"/>
  247. <attribute default="" name="stopclassname"/>
  248. <sequential>
  249. <nbjpdastart addressproperty="jpda.address" name="@{name}" stopclassname="@{stopclassname}" transport="${debug-transport}">
  250. <classpath>
  251. <path path="@{classpath}"/>
  252. </classpath>
  253. </nbjpdastart>
  254. </sequential>
  255. </macrodef>
  256. <macrodef name="nbjpdareload" uri="http://www.netbeans.org/ns/j2se-project/1">
  257. <attribute default="${build.classes.dir}" name="dir"/>
  258. <sequential>
  259. <nbjpdareload>
  260. <fileset dir="@{dir}" includes="${fix.classes}">
  261. <include name="${fix.includes}*.class"/>
  262. </fileset>
  263. </nbjpdareload>
  264. </sequential>
  265. </macrodef>
  266. </target>
  267. <target name="-init-debug-args">
  268. <property name="version-output" value="java version &quot;${ant.java.version}"/>
  269. <condition property="have-jdk-older-than-1.4">
  270. <or>
  271. <contains string="${version-output}" substring="java version &quot;1.0"/>
  272. <contains string="${version-output}" substring="java version &quot;1.1"/>
  273. <contains string="${version-output}" substring="java version &quot;1.2"/>
  274. <contains string="${version-output}" substring="java version &quot;1.3"/>
  275. </or>
  276. </condition>
  277. <condition else="-Xdebug" property="debug-args-line" value="-Xdebug -Xnoagent -Djava.compiler=none">
  278. <istrue value="${have-jdk-older-than-1.4}"/>
  279. </condition>
  280. <condition else="dt_socket" property="debug-transport-by-os" value="dt_shmem">
  281. <os family="windows"/>
  282. </condition>
  283. <condition else="${debug-transport-by-os}" property="debug-transport" value="${debug.transport}">
  284. <isset property="debug.transport"/>
  285. </condition>
  286. </target>
  287. <target depends="-init-debug-args" name="-init-macrodef-debug">
  288. <macrodef name="debug" uri="http://www.netbeans.org/ns/j2se-project/3">
  289. <attribute default="${main.class}" name="classname"/>
  290. <attribute default="${debug.classpath}" name="classpath"/>
  291. <element name="customize" optional="true"/>
  292. <sequential>
  293. <java classname="@{classname}" dir="${work.dir}" fork="true">
  294. <jvmarg line="${debug-args-line}"/>
  295. <jvmarg value="-Xrunjdwp:transport=${debug-transport},address=${jpda.address}"/>
  296. <jvmarg value="-Dfile.encoding=${source.encoding}"/>
  297. <redirector errorencoding="${source.encoding}" inputencoding="${source.encoding}" outputencoding="${source.encoding}"/>
  298. <jvmarg line="${run.jvmargs}"/>
  299. <classpath>
  300. <path path="@{classpath}"/>
  301. </classpath>
  302. <syspropertyset>
  303. <propertyref prefix="run-sys-prop."/>
  304. <mapper from="run-sys-prop.*" to="*" type="glob"/>
  305. </syspropertyset>
  306. <customize/>
  307. </java>
  308. </sequential>
  309. </macrodef>
  310. </target>
  311. <target name="-init-macrodef-java">
  312. <macrodef name="java" uri="http://www.netbeans.org/ns/j2se-project/1">
  313. <attribute default="${main.class}" name="classname"/>
  314. <attribute default="${run.classpath}" name="classpath"/>
  315. <element name="customize" optional="true"/>
  316. <sequential>
  317. <java classname="@{classname}" dir="${work.dir}" fork="true">
  318. <jvmarg value="-Dfile.encoding=${source.encoding}"/>
  319. <redirector errorencoding="${source.encoding}" inputencoding="${source.encoding}" outputencoding="${source.encoding}"/>
  320. <jvmarg line="${run.jvmargs}"/>
  321. <classpath>
  322. <path path="@{classpath}"/>
  323. </classpath>
  324. <syspropertyset>
  325. <propertyref prefix="run-sys-prop."/>
  326. <mapper from="run-sys-prop.*" to="*" type="glob"/>
  327. </syspropertyset>
  328. <customize/>
  329. </java>
  330. </sequential>
  331. </macrodef>
  332. </target>
  333. <target name="-init-presetdef-jar">
  334. <presetdef name="jar" uri="http://www.netbeans.org/ns/j2se-project/1">
  335. <jar compress="${jar.compress}" jarfile="${dist.jar}">
  336. <j2seproject1:fileset dir="${build.classes.dir}"/>
  337. </jar>
  338. </presetdef>
  339. </target>
  340. <target depends="-pre-init,-init-private,-init-user,-init-project,-do-init,-post-init,-init-check,-init-macrodef-property,-init-macrodef-javac,-init-macrodef-junit,-init-macrodef-nbjpda,-init-macrodef-debug,-init-macrodef-java,-init-presetdef-jar" name="init"/>
  341. <!--
  342. ===================
  343. COMPILATION SECTION
  344. ===================
  345. -->
  346. <target depends="init" name="deps-jar" unless="no.deps"/>
  347. <target depends="init,-check-automatic-build,-clean-after-automatic-build" name="-verify-automatic-build"/>
  348. <target depends="init" name="-check-automatic-build">
  349. <available file="${build.classes.dir}/.netbeans_automatic_build" property="netbeans.automatic.build"/>
  350. </target>
  351. <target depends="init" if="netbeans.automatic.build" name="-clean-after-automatic-build">
  352. <antcall target="clean"/>
  353. </target>
  354. <target depends="init,deps-jar" name="-pre-pre-compile">
  355. <mkdir dir="${build.classes.dir}"/>
  356. </target>
  357. <target name="-pre-compile">
  358. <!-- Empty placeholder for easier customization. -->
  359. <!-- You can override this target in the ../build.xml file. -->
  360. </target>
  361. <target if="do.depend.true" name="-compile-depend">
  362. <pathconvert property="build.generated.subdirs">
  363. <dirset dir="${build.generated.sources.dir}" erroronmissingdir="false">
  364. <include name="*"/>
  365. </dirset>
  366. </pathconvert>
  367. <j2seproject3:depend srcdir="${src.src4.dir}:${src.java.dir}:${src.src3.dir}:${src.src2.dir}:${src.src.dir}:${src.dir}:${build.generated.subdirs}"/>
  368. </target>
  369. <target depends="init,deps-jar,-pre-pre-compile,-pre-compile,-compile-depend" if="have.sources" name="-do-compile">
  370. <j2seproject3:javac gensrcdir="${build.generated.sources.dir}"/>
  371. <copy todir="${build.classes.dir}">
  372. <fileset dir="${src.src4.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
  373. <fileset dir="${src.java.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
  374. <fileset dir="${src.src3.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
  375. <fileset dir="${src.src2.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
  376. <fileset dir="${src.src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
  377. <fileset dir="${src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
  378. </copy>
  379. </target>
  380. <target name="-post-compile">
  381. <!-- Empty placeholder for easier customization. -->
  382. <!-- You can override this target in the ../build.xml file. -->
  383. </target>
  384. <target depends="init,deps-jar,-verify-automatic-build,-pre-pre-compile,-pre-compile,-do-compile,-post-compile" description="Compile project." name="compile"/>
  385. <target name="-pre-compile-single">
  386. <!-- Empty placeholder for easier customization. -->
  387. <!-- You can override this target in the ../build.xml file. -->
  388. </target>
  389. <target depends="init,deps-jar,-pre-pre-compile" name="-do-compile-single">
  390. <fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail>
  391. <j2seproject3:force-recompile/>
  392. <j2seproject3:javac excludes="" gensrcdir="${build.generated.sources.dir}" includes="${javac.includes}" sourcepath="${src.src4.dir}:${src.java.dir}:${src.src3.dir}:${src.src2.dir}:${src.src.dir}:${src.dir}"/>
  393. </target>
  394. <target name="-post-compile-single">
  395. <!-- Empty placeholder for easier customization. -->
  396. <!-- You can override this target in the ../build.xml file. -->
  397. </target>
  398. <target depends="init,deps-jar,-verify-automatic-build,-pre-pre-compile,-pre-compile-single,-do-compile-single,-post-compile-single" name="compile-single"/>
  399. <!--
  400. ====================
  401. JAR BUILDING SECTION
  402. ====================
  403. -->
  404. <target depends="init" name="-pre-pre-jar">
  405. <dirname file="${dist.jar}" property="dist.jar.dir"/>
  406. <mkdir dir="${dist.jar.dir}"/>
  407. </target>
  408. <target name="-pre-jar">
  409. <!-- Empty placeholder for easier customization. -->
  410. <!-- You can override this target in the ../build.xml file. -->
  411. </target>
  412. <target depends="init,compile,-pre-pre-jar,-pre-jar" name="-do-jar-without-manifest" unless="manifest.available">
  413. <j2seproject1:jar/>
  414. </target>
  415. <target depends="init,compile,-pre-pre-jar,-pre-jar" if="manifest.available" name="-do-jar-with-manifest" unless="manifest.available+main.class">
  416. <j2seproject1:jar manifest="${manifest.file}"/>
  417. </target>
  418. <target depends="init,compile,-pre-pre-jar,-pre-jar" if="manifest.available+main.class" name="-do-jar-with-mainclass" unless="manifest.available+main.class+mkdist.available">
  419. <j2seproject1:jar manifest="${manifest.file}">
  420. <j2seproject1:manifest>
  421. <j2seproject1:attribute name="Main-Class" value="${main.class}"/>
  422. </j2seproject1:manifest>
  423. </j2seproject1:jar>
  424. <echo>To run this application from the command line without Ant, try:</echo>
  425. <property location="${build.classes.dir}" name="build.classes.dir.resolved"/>
  426. <property location="${dist.jar}" name="dist.jar.resolved"/>
  427. <pathconvert property="run.classpath.with.dist.jar">
  428. <path path="${run.classpath}"/>
  429. <map from="${build.classes.dir.resolved}" to="${dist.jar.resolved}"/>
  430. </pathconvert>
  431. <echo>java -cp "${run.classpath.with.dist.jar}" ${main.class}</echo>
  432. </target>
  433. <target depends="init,compile,-pre-pre-jar,-pre-jar" if="manifest.available+main.class+mkdist.available" name="-do-jar-with-libraries">
  434. <property location="${build.classes.dir}" name="build.classes.dir.resolved"/>
  435. <pathconvert property="run.classpath.without.build.classes.dir">
  436. <path path="${run.classpath}"/>
  437. <map from="${build.classes.dir.resolved}" to=""/>
  438. </pathconvert>
  439. <pathconvert pathsep=" " property="jar.classpath">
  440. <path path="${run.classpath.without.build.classes.dir}"/>
  441. <chainedmapper>
  442. <flattenmapper/>
  443. <globmapper from="*" to="lib/*"/>
  444. </chainedmapper>
  445. </pathconvert>
  446. <taskdef classname="org.netbeans.modules.java.j2seproject.copylibstask.CopyLibs" classpath="${libs.CopyLibs.classpath}" name="copylibs"/>
  447. <copylibs compress="${jar.compress}" jarfile="${dist.jar}" manifest="${manifest.file}" runtimeclasspath="${run.classpath.without.build.classes.dir}">
  448. <fileset dir="${build.classes.dir}"/>
  449. <manifest>
  450. <attribute name="Main-Class" value="${main.class}"/>
  451. <attribute name="Class-Path" value="${jar.classpath}"/>
  452. </manifest>
  453. </copylibs>
  454. <echo>To run this application from the command line without Ant, try:</echo>
  455. <property location="${dist.jar}" name="dist.jar.resolved"/>
  456. <echo>java -jar "${dist.jar.resolved}"</echo>
  457. </target>
  458. <target depends="init,compile,-pre-pre-jar,-pre-jar" if="libs.CopyLibs.classpath" name="-do-jar-with-libraries-without-manifest" unless="manifest.available+main.class">
  459. <property location="${build.classes.dir}" name="build.classes.dir.resolved"/>
  460. <pathconvert property="run.classpath.without.build.classes.dir">
  461. <path path="${run.classpath}"/>
  462. <map from="${build.classes.dir.resolved}" to=""/>
  463. </pathconvert>
  464. <pathconvert pathsep=" " property="jar.classpath">
  465. <path path="${run.classpath.without.build.classes.dir}"/>
  466. <chainedmapper>
  467. <flattenmapper/>
  468. <globmapper from="*" to="lib/*"/>
  469. </chainedmapper>
  470. </pathconvert>
  471. <taskdef classname="org.netbeans.modules.java.j2seproject.copylibstask.CopyLibs" classpath="${libs.CopyLibs.classpath}" name="copylibs"/>
  472. <copylibs compress="${jar.compress}" jarfile="${dist.jar}" runtimeclasspath="${run.classpath.without.build.classes.dir}">
  473. <fileset dir="${build.classes.dir}"/>
  474. </copylibs>
  475. </target>
  476. <target name="-post-jar">
  477. <!-- Empty placeholder for easier customization. -->
  478. <!-- You can override this target in the ../build.xml file. -->
  479. </target>
  480. <target depends="init,compile,-pre-jar,-do-jar-with-manifest,-do-jar-without-manifest,-do-jar-with-mainclass,-do-jar-with-libraries,-do-jar-with-libraries-without-manifest,-post-jar" description="Build JAR." name="jar"/>
  481. <!--
  482. =================
  483. EXECUTION SECTION
  484. =================
  485. -->
  486. <target depends="init,compile" description="Run a main class." name="run">
  487. <j2seproject1:java>
  488. <customize>
  489. <arg line="${application.args}"/>
  490. </customize>
  491. </j2seproject1:java>
  492. </target>
  493. <target name="-do-not-recompile">
  494. <property name="javac.includes.binary" value=""/>
  495. </target>
  496. <target depends="init,-do-not-recompile,compile-single" name="run-single">
  497. <fail unless="run.class">Must select one file in the IDE or set run.class</fail>
  498. <j2seproject1:java classname="${run.class}"/>
  499. </target>
  500. <target depends="init,-do-not-recompile,compile-test-single" name="run-test-with-main">
  501. <fail unless="run.class">Must select one file in the IDE or set run.class</fail>
  502. <j2seproject1:java classname="${run.class}" classpath="${run.test.classpath}"/>
  503. </target>
  504. <!--
  505. =================
  506. DEBUGGING SECTION
  507. =================
  508. -->
  509. <target depends="init" if="netbeans.home" name="-debug-start-debugger">
  510. <j2seproject1:nbjpdastart name="${debug.class}"/>
  511. </target>
  512. <target depends="init" if="netbeans.home" name="-debug-start-debugger-main-test">
  513. <j2seproject1:nbjpdastart classpath="${debug.test.classpath}" name="${debug.class}"/>
  514. </target>
  515. <target depends="init,compile" name="-debug-start-debuggee">
  516. <j2seproject3:debug>
  517. <customize>
  518. <arg line="${application.args}"/>
  519. </customize>
  520. </j2seproject3:debug>
  521. </target>
  522. <target depends="init,compile,-debug-start-debugger,-debug-start-debuggee" description="Debug project in IDE." if="netbeans.home" name="debug"/>
  523. <target depends="init" if="netbeans.home" name="-debug-start-debugger-stepinto">
  524. <j2seproject1:nbjpdastart stopclassname="${main.class}"/>
  525. </target>
  526. <target depends="init,compile,-debug-start-debugger-stepinto,-debug-start-debuggee" if="netbeans.home" name="debug-stepinto"/>
  527. <target depends="init,compile-single" if="netbeans.home" name="-debug-start-debuggee-single">
  528. <fail unless="debug.class">Must select one file in the IDE or set debug.class</fail>
  529. <j2seproject3:debug classname="${debug.class}"/>
  530. </target>
  531. <target depends="init,-do-not-recompile,compile-single,-debug-start-debugger,-debug-start-debuggee-single" if="netbeans.home" name="debug-single"/>
  532. <target depends="init,compile-test-single" if="netbeans.home" name="-debug-start-debuggee-main-test">
  533. <fail unless="debug.class">Must select one file in the IDE or set debug.class</fail>
  534. <j2seproject3:debug classname="${debug.class}" classpath="${debug.test.classpath}"/>
  535. </target>
  536. <target depends="init,-do-not-recompile,compile-test-single,-debug-start-debugger-main-test,-debug-start-debuggee-main-test" if="netbeans.home" name="debug-test-with-main"/>
  537. <target depends="init" name="-pre-debug-fix">
  538. <fail unless="fix.includes">Must set fix.includes</fail>
  539. <property name="javac.includes" value="${fix.includes}.java"/>
  540. </target>
  541. <target depends="init,-pre-debug-fix,compile-single" if="netbeans.home" name="-do-debug-fix">
  542. <j2seproject1:nbjpdareload/>
  543. </target>
  544. <target depends="init,-pre-debug-fix,-do-debug-fix" if="netbeans.home" name="debug-fix"/>
  545. <!--
  546. ===============
  547. JAVADOC SECTION
  548. ===============
  549. -->
  550. <target depends="init" name="-javadoc-build">
  551. <mkdir dir="${dist.javadoc.dir}"/>
  552. <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}">
  553. <classpath>
  554. <path path="${javac.classpath}"/>
  555. </classpath>
  556. <fileset dir="${src.src4.dir}" excludes="${excludes}" includes="${includes}">
  557. <filename name="**/*.java"/>
  558. </fileset>
  559. <fileset dir="${src.java.dir}" excludes="${excludes}" includes="${includes}">
  560. <filename name="**/*.java"/>
  561. </fileset>
  562. <fileset dir="${src.src3.dir}" excludes="${excludes}" includes="${includes}">
  563. <filename name="**/*.java"/>
  564. </fileset>
  565. <fileset dir="${src.src2.dir}" excludes="${excludes}" includes="${includes}">
  566. <filename name="**/*.java"/>
  567. </fileset>
  568. <fileset dir="${src.src.dir}" excludes="${excludes}" includes="${includes}">
  569. <filename name="**/*.java"/>
  570. </fileset>
  571. <fileset dir="${src.dir}" excludes="${excludes}" includes="${includes}">
  572. <filename name="**/*.java"/>
  573. </fileset>
  574. <fileset dir="${build.generated.sources.dir}" erroronmissingdir="false">
  575. <include name="**/*.java"/>
  576. </fileset>
  577. </javadoc>
  578. </target>
  579. <target depends="init,-javadoc-build" if="netbeans.home" name="-javadoc-browse" unless="no.javadoc.preview">
  580. <nbbrowse file="${dist.javadoc.dir}/index.html"/>
  581. </target>
  582. <target depends="init,-javadoc-build,-javadoc-browse" description="Build Javadoc." name="javadoc"/>
  583. <!--
  584. =========================
  585. JUNIT COMPILATION SECTION
  586. =========================
  587. -->
  588. <target depends="init,compile" if="have.tests" name="-pre-pre-compile-test">
  589. <mkdir dir="${build.test.classes.dir}"/>
  590. </target>
  591. <target name="-pre-compile-test">
  592. <!-- Empty placeholder for easier customization. -->
  593. <!-- You can override this target in the ../build.xml file. -->
  594. </target>
  595. <target if="do.depend.true" name="-compile-test-depend">
  596. <j2seproject3:depend classpath="${javac.test.classpath}" destdir="${build.test.classes.dir}" srcdir="${test.src.dir}"/>
  597. </target>
  598. <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test,-compile-test-depend" if="have.tests" name="-do-compile-test">
  599. <j2seproject3:javac classpath="${javac.test.classpath}" debug="true" destdir="${build.test.classes.dir}" srcdir="${test.src.dir}"/>
  600. <copy todir="${build.test.classes.dir}">
  601. <fileset dir="${test.src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
  602. </copy>
  603. </target>
  604. <target name="-post-compile-test">
  605. <!-- Empty placeholder for easier customization. -->
  606. <!-- You can override this target in the ../build.xml file. -->
  607. </target>
  608. <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test,-do-compile-test,-post-compile-test" name="compile-test"/>
  609. <target name="-pre-compile-test-single">
  610. <!-- Empty placeholder for easier customization. -->
  611. <!-- You can override this target in the ../build.xml file. -->
  612. </target>
  613. <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test-single" if="have.tests" name="-do-compile-test-single">
  614. <fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail>
  615. <j2seproject3:force-recompile destdir="${build.test.classes.dir}"/>
  616. <j2seproject3:javac classpath="${javac.test.classpath}" debug="true" destdir="${build.test.classes.dir}" excludes="" includes="${javac.includes}" sourcepath="${test.src.dir}" srcdir="${test.src.dir}"/>
  617. <copy todir="${build.test.classes.dir}">
  618. <fileset dir="${test.src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
  619. </copy>
  620. </target>
  621. <target name="-post-compile-test-single">
  622. <!-- Empty placeholder for easier customization. -->
  623. <!-- You can override this target in the ../build.xml file. -->
  624. </target>
  625. <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test-single,-do-compile-test-single,-post-compile-test-single" name="compile-test-single"/>
  626. <!--
  627. =======================
  628. JUNIT EXECUTION SECTION
  629. =======================
  630. -->
  631. <target depends="init" if="have.tests" name="-pre-test-run">
  632. <mkdir dir="${build.test.results.dir}"/>
  633. </target>
  634. <target depends="init,compile-test,-pre-test-run" if="have.tests" name="-do-test-run">
  635. <j2seproject3:junit testincludes="**/*Test.java"/>
  636. </target>
  637. <target depends="init,compile-test,-pre-test-run,-do-test-run" if="have.tests" name="-post-test-run">
  638. <fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail>
  639. </target>
  640. <target depends="init" if="have.tests" name="test-report"/>
  641. <target depends="init" if="netbeans.home+have.tests" name="-test-browse"/>
  642. <target depends="init,compile-test,-pre-test-run,-do-test-run,test-report,-post-test-run,-test-browse" description="Run unit tests." name="test"/>
  643. <target depends="init" if="have.tests" name="-pre-test-run-single">
  644. <mkdir dir="${build.test.results.dir}"/>
  645. </target>
  646. <target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-do-test-run-single">
  647. <fail unless="test.includes">Must select some files in the IDE or set test.includes</fail>
  648. <j2seproject3:junit excludes="" includes="${test.includes}"/>
  649. </target>
  650. <target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single" if="have.tests" name="-post-test-run-single">
  651. <fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail>
  652. </target>
  653. <target depends="init,-do-not-recompile,compile-test-single,-pre-test-run-single,-do-test-run-single,-post-test-run-single" description="Run single unit test." name="test-single"/>
  654. <!--
  655. =======================
  656. JUNIT DEBUGGING SECTION
  657. =======================
  658. -->
  659. <target depends="init,compile-test" if="have.tests" name="-debug-start-debuggee-test">
  660. <fail unless="test.class">Must select one file in the IDE or set test.class</fail>
  661. <property location="${build.test.results.dir}/TEST-${test.class}.xml" name="test.report.file"/>
  662. <delete file="${test.report.file}"/>
  663. <mkdir dir="${build.test.results.dir}"/>
  664. <j2seproject3:debug classname="org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner" classpath="${ant.home}/lib/ant.jar:${ant.home}/lib/ant-junit.jar:${debug.test.classpath}">
  665. <customize>
  666. <syspropertyset>
  667. <propertyref prefix="test-sys-prop."/>
  668. <mapper from="test-sys-prop.*" to="*" type="glob"/>
  669. </syspropertyset>
  670. <arg value="${test.class}"/>
  671. <arg value="showoutput=true"/>
  672. <arg value="formatter=org.apache.tools.ant.taskdefs.optional.junit.BriefJUnitResultFormatter"/>
  673. <arg value="formatter=org.apache.tools.ant.taskdefs.optional.junit.XMLJUnitResultFormatter,${test.report.file}"/>
  674. </customize>
  675. </j2seproject3:debug>
  676. </target>
  677. <target depends="init,compile-test" if="netbeans.home+have.tests" name="-debug-start-debugger-test">
  678. <j2seproject1:nbjpdastart classpath="${debug.test.classpath}" name="${test.class}"/>
  679. </target>
  680. <target depends="init,-do-not-recompile,compile-test-single,-debug-start-debugger-test,-debug-start-debuggee-test" name="debug-test"/>
  681. <target depends="init,-pre-debug-fix,compile-test-single" if="netbeans.home" name="-do-debug-fix-test">
  682. <j2seproject1:nbjpdareload dir="${build.test.classes.dir}"/>
  683. </target>
  684. <target depends="init,-pre-debug-fix,-do-debug-fix-test" if="netbeans.home" name="debug-fix-test"/>
  685. <!--
  686. =========================
  687. APPLET EXECUTION SECTION
  688. =========================
  689. -->
  690. <target depends="init,compile-single" name="run-applet">
  691. <fail unless="applet.url">Must select one file in the IDE or set applet.url</fail>
  692. <j2seproject1:java classname="sun.applet.AppletViewer">
  693. <customize>
  694. <arg value="${applet.url}"/>
  695. </customize>
  696. </j2seproject1:java>
  697. </target>
  698. <!--
  699. =========================
  700. APPLET DEBUGGING SECTION
  701. =========================
  702. -->
  703. <target depends="init,compile-single" if="netbeans.home" name="-debug-start-debuggee-applet">
  704. <fail unless="applet.url">Must select one file in the IDE or set applet.url</fail>
  705. <j2seproject3:debug classname="sun.applet.AppletViewer">
  706. <customize>
  707. <arg value="${applet.url}"/>
  708. </customize>
  709. </j2seproject3:debug>
  710. </target>
  711. <target depends="init,compile-single,-debug-start-debugger,-debug-start-debuggee-applet" if="netbeans.home" name="debug-applet"/>
  712. <!--
  713. ===============
  714. CLEANUP SECTION
  715. ===============
  716. -->
  717. <target depends="init" name="deps-clean" unless="no.deps"/>
  718. <target depends="init" name="-do-clean">
  719. <delete dir="${build.dir}"/>
  720. <delete dir="${dist.dir}"/>
  721. </target>
  722. <target name="-post-clean">
  723. <!-- Empty placeholder for easier customization. -->
  724. <!-- You can override this target in the ../build.xml file. -->
  725. </target>
  726. <target depends="init,deps-clean,-do-clean,-post-clean" description="Clean build products." name="clean"/>
  727. </project>