Unsupported library that attempts to punch holes through NAT
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 41KB

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