Context-detection API for Android developed as a university project
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 43KB

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