PageRenderTime 55ms CodeModel.GetById 19ms RepoModel.GetById 0ms app.codeStats 0ms

/Prototipo/Servlet/nbproject/build-impl.xml

http://prototipomemoria.googlecode.com/
XML | 929 lines | 839 code | 0 blank | 90 comment | 0 complexity | 900485e2e2c5e48c70bbe4152141a324 MD5 | raw file
Possible License(s): BSD-3-Clause
  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. - dist
  10. - execution
  11. - debugging
  12. - javadoc
  13. - junit compilation
  14. - junit execution
  15. - junit debugging
  16. - cleanup
  17. -->
  18. <project xmlns:webproject1="http://www.netbeans.org/ns/web-project/1" xmlns:webproject2="http://www.netbeans.org/ns/web-project/2" xmlns:webproject3="http://www.netbeans.org/ns/web-project/3" basedir=".." default="default" name="Servlet-impl">
  19. <import file="ant-deploy.xml"/>
  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="dist,javadoc" description="Build whole project." name="default"/>
  28. <!--
  29. INITIALIZATION SECTION
  30. -->
  31. <target name="-pre-init">
  32. <!-- Empty placeholder for easier customization. -->
  33. <!-- You can override this target in the ../build.xml file. -->
  34. </target>
  35. <target depends="-pre-init" name="-init-private">
  36. <property file="nbproject/private/private.properties"/>
  37. </target>
  38. <target depends="-pre-init,-init-private" name="-init-user">
  39. <property file="${user.properties.file}"/>
  40. <!-- The two properties below are usually overridden -->
  41. <!-- by the active platform. Just a fallback. -->
  42. <property name="default.javac.source" value="1.4"/>
  43. <property name="default.javac.target" value="1.4"/>
  44. </target>
  45. <target depends="-pre-init,-init-private,-init-user" name="-init-project">
  46. <property file="nbproject/project.properties"/>
  47. </target>
  48. <target depends="-pre-init,-init-private,-init-user,-init-project,-init-macrodef-property" if="dist.ear.dir" name="-do-ear-init"/>
  49. <target depends="-pre-init,-init-private,-init-user,-init-project,-init-macrodef-property" name="-do-init">
  50. <condition property="have.tests">
  51. <or>
  52. <available file="${test.src.dir}"/>
  53. </or>
  54. </condition>
  55. <condition property="have.sources">
  56. <or>
  57. <available file="${src.dir}"/>
  58. </or>
  59. </condition>
  60. <condition property="netbeans.home+have.tests">
  61. <and>
  62. <isset property="netbeans.home"/>
  63. <isset property="have.tests"/>
  64. </and>
  65. </condition>
  66. <condition property="no.javadoc.preview">
  67. <isfalse value="${javadoc.preview}"/>
  68. </condition>
  69. <property name="javac.compilerargs" value=""/>
  70. <condition property="no.deps">
  71. <and>
  72. <istrue value="${no.dependencies}"/>
  73. </and>
  74. </condition>
  75. <condition property="no.dist.ear.dir">
  76. <not>
  77. <isset property="dist.ear.dir"/>
  78. </not>
  79. </condition>
  80. <property name="build.web.excludes" value="${build.classes.excludes}"/>
  81. <condition property="do.compile.jsps">
  82. <istrue value="${compile.jsps}"/>
  83. </condition>
  84. <condition property="do.debug.server">
  85. <or>
  86. <not>
  87. <isset property="debug.server"/>
  88. </not>
  89. <istrue value="${debug.server}"/>
  90. <and>
  91. <not>
  92. <istrue value="${debug.server}"/>
  93. </not>
  94. <not>
  95. <istrue value="${debug.client}"/>
  96. </not>
  97. </and>
  98. </or>
  99. </condition>
  100. <condition property="do.debug.client">
  101. <istrue value="${debug.client}"/>
  102. </condition>
  103. <condition property="do.display.browser">
  104. <istrue value="${display.browser}"/>
  105. </condition>
  106. <condition property="do.display.browser.debug">
  107. <and>
  108. <isset property="do.display.browser"/>
  109. <not>
  110. <isset property="do.debug.client"/>
  111. </not>
  112. </and>
  113. </condition>
  114. <available file="${conf.dir}/MANIFEST.MF" property="has.custom.manifest"/>
  115. <available file="${persistence.xml.dir}/persistence.xml" property="has.persistence.xml"/>
  116. <condition property="do.war.package.with.custom.manifest">
  117. <isset property="has.custom.manifest"/>
  118. </condition>
  119. <condition property="do.war.package.without.custom.manifest">
  120. <not>
  121. <isset property="has.custom.manifest"/>
  122. </not>
  123. </condition>
  124. <condition property="do.tmp.war.package.with.custom.manifest">
  125. <and>
  126. <isset property="has.custom.manifest"/>
  127. <or>
  128. <isfalse value="${directory.deployment.supported}"/>
  129. <isset property="dist.ear.dir"/>
  130. </or>
  131. </and>
  132. </condition>
  133. <condition property="do.tmp.war.package.without.custom.manifest">
  134. <and>
  135. <not>
  136. <isset property="has.custom.manifest"/>
  137. </not>
  138. <or>
  139. <isfalse value="${directory.deployment.supported}"/>
  140. <isset property="dist.ear.dir"/>
  141. </or>
  142. </and>
  143. </condition>
  144. <condition property="do.tmp.war.package">
  145. <or>
  146. <isfalse value="${directory.deployment.supported}"/>
  147. <isset property="dist.ear.dir"/>
  148. </or>
  149. </condition>
  150. <property name="build.meta.inf.dir" value="${build.web.dir}/META-INF"/>
  151. <condition else="" property="application.args.param" value="${application.args}">
  152. <and>
  153. <isset property="application.args"/>
  154. <not>
  155. <equals arg1="${application.args}" arg2="" trim="true"/>
  156. </not>
  157. </and>
  158. </condition>
  159. <property name="source.encoding" value="${file.encoding}"/>
  160. <condition property="javadoc.encoding.used" value="${javadoc.encoding}">
  161. <and>
  162. <isset property="javadoc.encoding"/>
  163. <not>
  164. <equals arg1="${javadoc.encoding}" arg2=""/>
  165. </not>
  166. </and>
  167. </condition>
  168. <property name="javadoc.encoding.used" value="${source.encoding}"/>
  169. <property name="includes" value="**"/>
  170. <property name="excludes" value=""/>
  171. <property name="runmain.jvmargs" value=""/>
  172. <path id="endorsed.classpath.path" path="${endorsed.classpath}"/>
  173. <condition else="" property="endorsed.classpath.cmd.line.arg" value="-Xbootclasspath/p:'${toString:endorsed.classpath.path}'">
  174. <length length="0" string="${endorsed.classpath}" when="greater"/>
  175. </condition>
  176. </target>
  177. <target depends="init" name="-init-cos" unless="deploy.on.save">
  178. <condition property="deploy.on.save" value="true">
  179. <istrue value="${j2ee.deploy.on.save}"/>
  180. </condition>
  181. </target>
  182. <target name="-post-init">
  183. <!-- Empty placeholder for easier customization. -->
  184. <!-- You can override this target in the ../build.xml file. -->
  185. </target>
  186. <target depends="-pre-init,-init-private,-init-user,-init-project,-do-init" name="-init-check">
  187. <fail unless="src.dir">Must set src.dir</fail>
  188. <fail unless="test.src.dir">Must set test.src.dir</fail>
  189. <fail unless="build.dir">Must set build.dir</fail>
  190. <fail unless="build.web.dir">Must set build.web.dir</fail>
  191. <fail unless="build.generated.dir">Must set build.generated.dir</fail>
  192. <fail unless="dist.dir">Must set dist.dir</fail>
  193. <fail unless="build.classes.dir">Must set build.classes.dir</fail>
  194. <fail unless="dist.javadoc.dir">Must set dist.javadoc.dir</fail>
  195. <fail unless="build.test.classes.dir">Must set build.test.classes.dir</fail>
  196. <fail unless="build.test.results.dir">Must set build.test.results.dir</fail>
  197. <fail unless="build.classes.excludes">Must set build.classes.excludes</fail>
  198. <fail unless="dist.war">Must set dist.war</fail>
  199. <fail unless="j2ee.platform.classpath">
  200. The Java EE server classpath is not correctly set up. Your active server type is ${j2ee.server.type}.
  201. Either open the project in the IDE and assign the server or setup the server classpath manually.
  202. For example like this:
  203. ant -Duser.properties.file=&lt;path_to_property_file&gt; (where you put the property "j2ee.platform.classpath" in a .properties file)
  204. or ant -Dj2ee.platform.classpath=&lt;server_classpath&gt; (where no properties file is used)
  205. </fail>
  206. </target>
  207. <target name="-init-macrodef-property">
  208. <macrodef name="property" uri="http://www.netbeans.org/ns/web-project/1">
  209. <attribute name="name"/>
  210. <attribute name="value"/>
  211. <sequential>
  212. <property name="@{name}" value="${@{value}}"/>
  213. </sequential>
  214. </macrodef>
  215. </target>
  216. <target name="-init-macrodef-javac">
  217. <macrodef name="javac" uri="http://www.netbeans.org/ns/web-project/2">
  218. <attribute default="${src.dir}" name="srcdir"/>
  219. <attribute default="${build.classes.dir}" name="destdir"/>
  220. <attribute default="${javac.classpath}:${j2ee.platform.classpath}" name="classpath"/>
  221. <attribute default="${includes}" name="includes"/>
  222. <attribute default="${excludes}" name="excludes"/>
  223. <attribute default="${javac.debug}" name="debug"/>
  224. <attribute default="${empty.dir}" name="gensrcdir"/>
  225. <element name="customize" optional="true"/>
  226. <sequential>
  227. <property location="${build.dir}/empty" name="empty.dir"/>
  228. <mkdir dir="${empty.dir}"/>
  229. <javac debug="@{debug}" deprecation="${javac.deprecation}" destdir="@{destdir}" encoding="${source.encoding}" excludes="@{excludes}" includeantruntime="false" includes="@{includes}" source="${javac.source}" srcdir="@{srcdir}" target="${javac.target}">
  230. <src>
  231. <dirset dir="@{gensrcdir}" erroronmissingdir="false">
  232. <include name="*"/>
  233. </dirset>
  234. </src>
  235. <classpath>
  236. <path path="@{classpath}"/>
  237. </classpath>
  238. <compilerarg line="${endorsed.classpath.cmd.line.arg}"/>
  239. <compilerarg line="${javac.compilerargs}"/>
  240. <customize/>
  241. </javac>
  242. </sequential>
  243. </macrodef>
  244. </target>
  245. <target name="-init-macrodef-junit">
  246. <macrodef name="junit" uri="http://www.netbeans.org/ns/web-project/2">
  247. <attribute default="${includes}" name="includes"/>
  248. <attribute default="${excludes}" name="excludes"/>
  249. <attribute default="**" name="testincludes"/>
  250. <sequential>
  251. <junit dir="${basedir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" showoutput="true" tempdir="${java.io.tmpdir}">
  252. <batchtest todir="${build.test.results.dir}">
  253. <fileset dir="${test.src.dir}" excludes="@{excludes},${excludes}" includes="@{includes}">
  254. <filename name="@{testincludes}"/>
  255. </fileset>
  256. </batchtest>
  257. <classpath>
  258. <path path="${run.test.classpath}:${j2ee.platform.classpath}:${j2ee.platform.embeddableejb.classpath}"/>
  259. </classpath>
  260. <syspropertyset>
  261. <propertyref prefix="test-sys-prop."/>
  262. <mapper from="test-sys-prop.*" to="*" type="glob"/>
  263. </syspropertyset>
  264. <formatter type="brief" usefile="false"/>
  265. <formatter type="xml"/>
  266. <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
  267. <jvmarg line="${runmain.jvmargs}"/>
  268. </junit>
  269. </sequential>
  270. </macrodef>
  271. </target>
  272. <target name="-init-macrodef-java">
  273. <macrodef name="java" uri="http://www.netbeans.org/ns/web-project/1">
  274. <attribute default="${main.class}" name="classname"/>
  275. <attribute default="${debug.classpath}" name="classpath"/>
  276. <element name="customize" optional="true"/>
  277. <sequential>
  278. <java classname="@{classname}" fork="true">
  279. <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
  280. <jvmarg line="${runmain.jvmargs}"/>
  281. <classpath>
  282. <path path="@{classpath}:${j2ee.platform.classpath}"/>
  283. </classpath>
  284. <syspropertyset>
  285. <propertyref prefix="run-sys-prop."/>
  286. <mapper from="run-sys-prop.*" to="*" type="glob"/>
  287. </syspropertyset>
  288. <customize/>
  289. </java>
  290. </sequential>
  291. </macrodef>
  292. </target>
  293. <target name="-init-macrodef-nbjsdebug">
  294. <macrodef name="nbjsdebugstart" uri="http://www.netbeans.org/ns/web-project/1">
  295. <attribute default="${client.url}" name="webUrl"/>
  296. <sequential>
  297. <nbjsdebugstart urlPart="${client.urlPart}" webUrl="@{webUrl}"/>
  298. </sequential>
  299. </macrodef>
  300. </target>
  301. <target depends="-init-debug-args" name="-init-macrodef-nbjpda">
  302. <macrodef name="nbjpdastart" uri="http://www.netbeans.org/ns/web-project/1">
  303. <attribute default="${main.class}" name="name"/>
  304. <attribute default="${debug.classpath}:${j2ee.platform.classpath}" name="classpath"/>
  305. <sequential>
  306. <nbjpdastart addressproperty="jpda.address" name="@{name}" transport="${debug-transport}">
  307. <classpath>
  308. <path path="@{classpath}"/>
  309. </classpath>
  310. </nbjpdastart>
  311. </sequential>
  312. </macrodef>
  313. <macrodef name="nbjpdareload" uri="http://www.netbeans.org/ns/web-project/1">
  314. <attribute default="${build.classes.dir}" name="dir"/>
  315. <sequential>
  316. <nbjpdareload>
  317. <fileset dir="@{dir}" includes="${fix.classes}">
  318. <include name="${fix.includes}*.class"/>
  319. </fileset>
  320. </nbjpdareload>
  321. </sequential>
  322. </macrodef>
  323. <macrodef name="nbjpdaappreloaded" uri="http://www.netbeans.org/ns/web-project/1">
  324. <sequential>
  325. <nbjpdaappreloaded/>
  326. </sequential>
  327. </macrodef>
  328. </target>
  329. <target name="-init-debug-args">
  330. <property name="version-output" value="java version &quot;${ant.java.version}"/>
  331. <condition property="have-jdk-older-than-1.4">
  332. <or>
  333. <contains string="${version-output}" substring="java version &quot;1.0"/>
  334. <contains string="${version-output}" substring="java version &quot;1.1"/>
  335. <contains string="${version-output}" substring="java version &quot;1.2"/>
  336. <contains string="${version-output}" substring="java version &quot;1.3"/>
  337. </or>
  338. </condition>
  339. <condition else="-Xdebug" property="debug-args-line" value="-Xdebug -Xnoagent -Djava.compiler=none">
  340. <istrue value="${have-jdk-older-than-1.4}"/>
  341. </condition>
  342. <condition else="dt_socket" property="debug-transport-by-os" value="dt_shmem">
  343. <os family="windows"/>
  344. </condition>
  345. <condition else="${debug-transport-by-os}" property="debug-transport" value="${debug.transport}">
  346. <isset property="debug.transport"/>
  347. </condition>
  348. </target>
  349. <target depends="-init-debug-args" name="-init-macrodef-debug">
  350. <macrodef name="debug" uri="http://www.netbeans.org/ns/web-project/1">
  351. <attribute default="${main.class}" name="classname"/>
  352. <attribute default="${debug.classpath}:${j2ee.platform.classpath}" name="classpath"/>
  353. <attribute default="${application.args.param}" name="args"/>
  354. <element name="customize" optional="true"/>
  355. <sequential>
  356. <java classname="@{classname}" fork="true">
  357. <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
  358. <jvmarg line="${debug-args-line}"/>
  359. <jvmarg value="-Xrunjdwp:transport=${debug-transport},address=${jpda.address}"/>
  360. <jvmarg line="${runmain.jvmargs}"/>
  361. <classpath>
  362. <path path="@{classpath}"/>
  363. </classpath>
  364. <syspropertyset>
  365. <propertyref prefix="run-sys-prop."/>
  366. <mapper from="run-sys-prop.*" to="*" type="glob"/>
  367. </syspropertyset>
  368. <arg line="@{args}"/>
  369. <customize/>
  370. </java>
  371. </sequential>
  372. </macrodef>
  373. </target>
  374. <target name="-init-taskdefs">
  375. <fail unless="libs.CopyLibs.classpath">
  376. The libs.CopyLibs.classpath property is not set up.
  377. This property must point to
  378. org-netbeans-modules-java-j2seproject-copylibstask.jar file which is part
  379. of NetBeans IDE installation and is usually located at
  380. &lt;netbeans_installation&gt;/java&lt;version&gt;/ant/extra folder.
  381. Either open the project in the IDE and make sure CopyLibs library
  382. exists or setup the property manually. For example like this:
  383. ant -Dlibs.CopyLibs.classpath=a/path/to/org-netbeans-modules-java-j2seproject-copylibstask.jar
  384. </fail>
  385. <taskdef classpath="${libs.CopyLibs.classpath}" resource="org/netbeans/modules/java/j2seproject/copylibstask/antlib.xml"/>
  386. </target>
  387. <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-java,-init-macrodef-nbjpda,-init-macrodef-nbjsdebug,-init-macrodef-debug,-init-taskdefs" name="init"/>
  388. <!--
  389. COMPILATION SECTION
  390. -->
  391. <target depends="init" if="no.dist.ear.dir" name="deps-module-jar" unless="no.deps">
  392. <ant antfile="${project.PrototipoCommons}/build.xml" inheritall="false" target="jar">
  393. <property name="deploy.on.save" value="false"/>
  394. </ant>
  395. <ant antfile="${project.PrototipoCommons-1}/build.xml" inheritall="false" target="jar">
  396. <property name="deploy.on.save" value="false"/>
  397. </ant>
  398. </target>
  399. <target depends="init" if="dist.ear.dir" name="deps-ear-jar" unless="no.deps">
  400. <ant antfile="${project.PrototipoCommons}/build.xml" inheritall="false" target="jar">
  401. <property name="deploy.on.save" value="false"/>
  402. </ant>
  403. <ant antfile="${project.PrototipoCommons-1}/build.xml" inheritall="false" target="jar">
  404. <property name="deploy.on.save" value="false"/>
  405. </ant>
  406. </target>
  407. <target depends="init, deps-module-jar, deps-ear-jar" name="deps-jar" unless="no.deps"/>
  408. <target depends="init,deps-jar" name="-pre-pre-compile">
  409. <mkdir dir="${build.classes.dir}"/>
  410. </target>
  411. <target name="-pre-compile">
  412. <!-- Empty placeholder for easier customization. -->
  413. <!-- You can override this target in the ../build.xml file. -->
  414. </target>
  415. <target name="-copy-webdir">
  416. <copy todir="${build.web.dir}">
  417. <fileset dir="${web.docbase.dir}" excludes="${build.web.excludes},${excludes}" includes="${includes}"/>
  418. </copy>
  419. <copy todir="${build.web.dir}/WEB-INF">
  420. <fileset dir="${webinf.dir}" excludes="${build.web.excludes}"/>
  421. </copy>
  422. </target>
  423. <target depends="init, deps-jar, -pre-pre-compile, -pre-compile, -copy-manifest, -copy-persistence-xml, -copy-webdir, library-inclusion-in-archive,library-inclusion-in-manifest" if="have.sources" name="-do-compile">
  424. <webproject2:javac destdir="${build.classes.dir}" gensrcdir="${build.generated.sources.dir}"/>
  425. <copy todir="${build.classes.dir}">
  426. <fileset dir="${src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
  427. </copy>
  428. </target>
  429. <target if="has.custom.manifest" name="-copy-manifest">
  430. <mkdir dir="${build.meta.inf.dir}"/>
  431. <copy todir="${build.meta.inf.dir}">
  432. <fileset dir="${conf.dir}" includes="MANIFEST.MF"/>
  433. </copy>
  434. </target>
  435. <target if="has.persistence.xml" name="-copy-persistence-xml">
  436. <mkdir dir="${build.web.dir}/WEB-INF/classes/META-INF"/>
  437. <copy todir="${build.web.dir}/WEB-INF/classes/META-INF">
  438. <fileset dir="${persistence.xml.dir}" includes="persistence.xml"/>
  439. </copy>
  440. </target>
  441. <target name="-post-compile">
  442. <!-- Empty placeholder for easier customization. -->
  443. <!-- You can override this target in the ../build.xml file. -->
  444. </target>
  445. <target depends="init,deps-jar,-pre-pre-compile,-pre-compile,-do-compile,-post-compile" description="Compile project." name="compile"/>
  446. <target name="-pre-compile-single">
  447. <!-- Empty placeholder for easier customization. -->
  448. <!-- You can override this target in the ../build.xml file. -->
  449. </target>
  450. <target depends="init,deps-jar,-pre-pre-compile" name="-do-compile-single">
  451. <fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail>
  452. <webproject2:javac excludes="" gensrcdir="${build.generated.sources.dir}" includes="${javac.includes}"/>
  453. <copy todir="${build.classes.dir}">
  454. <fileset dir="${src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
  455. </copy>
  456. </target>
  457. <target name="-post-compile-single">
  458. <!-- Empty placeholder for easier customization. -->
  459. <!-- You can override this target in the ../build.xml file. -->
  460. </target>
  461. <target depends="init,deps-jar,-pre-pre-compile,-pre-compile-single,-do-compile-single,-post-compile-single" name="compile-single"/>
  462. <target depends="compile" description="Test compile JSP pages to expose compilation errors." if="do.compile.jsps" name="compile-jsps">
  463. <mkdir dir="${build.generated.dir}/src"/>
  464. <java classname="org.netbeans.modules.web.project.ant.JspC" failonerror="true" fork="true">
  465. <arg value="-uriroot"/>
  466. <arg file="${basedir}/${build.web.dir}"/>
  467. <arg value="-d"/>
  468. <arg file="${basedir}/${build.generated.dir}/src"/>
  469. <arg value="-die1"/>
  470. <arg value="-compilerSourceVM ${javac.source}"/>
  471. <arg value="-compilerTargetVM ${javac.target}"/>
  472. <arg value="-javaEncoding ${source.encoding}"/>
  473. <classpath path="${java.home}/../lib/tools.jar:${jspctask.classpath}:${jspcompilation.classpath}"/>
  474. </java>
  475. <mkdir dir="${build.generated.dir}/classes"/>
  476. <webproject2:javac classpath="${j2ee.platform.classpath}:${build.classes.dir}:${jspcompilation.classpath}" destdir="${build.generated.dir}/classes" srcdir="${build.generated.dir}/src"/>
  477. </target>
  478. <target depends="compile" if="jsp.includes" name="-do-compile-single-jsp">
  479. <fail unless="javac.jsp.includes">Must select some files in the IDE or set javac.jsp.includes</fail>
  480. <mkdir dir="${build.generated.dir}/src"/>
  481. <java classname="org.netbeans.modules.web.project.ant.JspCSingle" failonerror="true" fork="true">
  482. <arg value="-uriroot"/>
  483. <arg file="${basedir}/${build.web.dir}"/>
  484. <arg value="-d"/>
  485. <arg file="${basedir}/${build.generated.dir}/src"/>
  486. <arg value="-die1"/>
  487. <arg value="-jspc.files"/>
  488. <arg path="${jsp.includes}"/>
  489. <arg value="-compilerSourceVM ${javac.source}"/>
  490. <arg value="-compilerTargetVM ${javac.target}"/>
  491. <arg value="-javaEncoding ${source.encoding}"/>
  492. <classpath path="${java.home}/../lib/tools.jar:${jspctask.classpath}:${jspcompilation.classpath}"/>
  493. </java>
  494. <mkdir dir="${build.generated.dir}/classes"/>
  495. <webproject2:javac classpath="${j2ee.platform.classpath}:${build.classes.dir}:${jspcompilation.classpath}" destdir="${build.generated.dir}/classes" srcdir="${build.generated.dir}/src">
  496. <customize>
  497. <patternset includes="${javac.jsp.includes}"/>
  498. </customize>
  499. </webproject2:javac>
  500. </target>
  501. <target name="compile-single-jsp">
  502. <fail unless="jsp.includes">Must select a file in the IDE or set jsp.includes</fail>
  503. <antcall target="-do-compile-single-jsp"/>
  504. </target>
  505. <!--
  506. DIST BUILDING SECTION
  507. -->
  508. <target name="-pre-dist">
  509. <!-- Empty placeholder for easier customization. -->
  510. <!-- You can override this target in the ../build.xml file. -->
  511. </target>
  512. <target depends="init,compile,compile-jsps,-pre-dist" if="do.war.package.without.custom.manifest" name="-do-dist-without-manifest">
  513. <dirname file="${dist.war}" property="dist.jar.dir"/>
  514. <mkdir dir="${dist.jar.dir}"/>
  515. <jar compress="${jar.compress}" jarfile="${dist.war}">
  516. <fileset dir="${build.web.dir}"/>
  517. </jar>
  518. </target>
  519. <target depends="init,compile,compile-jsps,-pre-dist" if="do.war.package.with.custom.manifest" name="-do-dist-with-manifest">
  520. <dirname file="${dist.war}" property="dist.jar.dir"/>
  521. <mkdir dir="${dist.jar.dir}"/>
  522. <jar compress="${jar.compress}" jarfile="${dist.war}" manifest="${build.meta.inf.dir}/MANIFEST.MF">
  523. <fileset dir="${build.web.dir}"/>
  524. </jar>
  525. </target>
  526. <target depends="init,compile,compile-jsps,-pre-dist" if="do.tmp.war.package.without.custom.manifest" name="-do-tmp-dist-without-manifest">
  527. <dirname file="${dist.war}" property="dist.jar.dir"/>
  528. <mkdir dir="${dist.jar.dir}"/>
  529. <jar compress="${jar.compress}" jarfile="${dist.war}">
  530. <fileset dir="${build.web.dir}"/>
  531. </jar>
  532. </target>
  533. <target depends="init,compile,compile-jsps,-pre-dist" if="do.tmp.war.package.with.custom.manifest" name="-do-tmp-dist-with-manifest">
  534. <dirname file="${dist.war}" property="dist.jar.dir"/>
  535. <mkdir dir="${dist.jar.dir}"/>
  536. <jar compress="${jar.compress}" jarfile="${dist.war}" manifest="${build.meta.inf.dir}/MANIFEST.MF">
  537. <fileset dir="${build.web.dir}"/>
  538. </jar>
  539. </target>
  540. <target depends="init,compile,compile-jsps,-pre-dist,-do-dist-with-manifest,-do-dist-without-manifest" name="do-dist"/>
  541. <target depends="init" if="dist.ear.dir" name="library-inclusion-in-manifest">
  542. <copyfiles files="${reference.PrototipoCommons.jar}" iftldtodir="${build.web.dir}/WEB-INF" todir="${dist.ear.dir}/lib"/>
  543. <copyfiles files="${reference.PrototipoCommons-1.jar}" iftldtodir="${build.web.dir}/WEB-INF" todir="${dist.ear.dir}/lib"/>
  544. <copyfiles files="${file.reference.xstream-1.4.1.jar}" iftldtodir="${build.web.dir}/WEB-INF" todir="${dist.ear.dir}/lib"/>
  545. <copyfiles files="${file.reference.xstream-benchmark-1.4.1.jar}" iftldtodir="${build.web.dir}/WEB-INF" todir="${dist.ear.dir}/lib"/>
  546. <copyfiles files="${file.reference.xstream-hibernate-1.4.1.jar}" iftldtodir="${build.web.dir}/WEB-INF" todir="${dist.ear.dir}/lib"/>
  547. <copyfiles files="${file.reference.cglib-nodep-2.2.jar}" iftldtodir="${build.web.dir}/WEB-INF" todir="${dist.ear.dir}/lib"/>
  548. <copyfiles files="${file.reference.dom4j-1.6.1.jar}" iftldtodir="${build.web.dir}/WEB-INF" todir="${dist.ear.dir}/lib"/>
  549. <copyfiles files="${file.reference.jdom-1.1.jar}" iftldtodir="${build.web.dir}/WEB-INF" todir="${dist.ear.dir}/lib"/>
  550. <copyfiles files="${file.reference.jettison-1.2.jar}" iftldtodir="${build.web.dir}/WEB-INF" todir="${dist.ear.dir}/lib"/>
  551. <copyfiles files="${file.reference.joda-time-1.6.jar}" iftldtodir="${build.web.dir}/WEB-INF" todir="${dist.ear.dir}/lib"/>
  552. <copyfiles files="${file.reference.json-20080701.jar}" iftldtodir="${build.web.dir}/WEB-INF" todir="${dist.ear.dir}/lib"/>
  553. <copyfiles files="${file.reference.kxml2-2.3.0.jar}" iftldtodir="${build.web.dir}/WEB-INF" todir="${dist.ear.dir}/lib"/>
  554. <copyfiles files="${file.reference.kxml2-min-2.3.0.jar}" iftldtodir="${build.web.dir}/WEB-INF" todir="${dist.ear.dir}/lib"/>
  555. <copyfiles files="${file.reference.stax-1.2.0.jar}" iftldtodir="${build.web.dir}/WEB-INF" todir="${dist.ear.dir}/lib"/>
  556. <copyfiles files="${file.reference.stax-api-1.0.1.jar}" iftldtodir="${build.web.dir}/WEB-INF" todir="${dist.ear.dir}/lib"/>
  557. <copyfiles files="${file.reference.wstx-asl-3.2.7.jar}" iftldtodir="${build.web.dir}/WEB-INF" todir="${dist.ear.dir}/lib"/>
  558. <copyfiles files="${file.reference.xmlpull-1.1.3.1.jar}" iftldtodir="${build.web.dir}/WEB-INF" todir="${dist.ear.dir}/lib"/>
  559. <copyfiles files="${file.reference.xom-1.1.jar}" iftldtodir="${build.web.dir}/WEB-INF" todir="${dist.ear.dir}/lib"/>
  560. <copyfiles files="${file.reference.xpp3_min-1.1.4c.jar}" iftldtodir="${build.web.dir}/WEB-INF" todir="${dist.ear.dir}/lib"/>
  561. <copyfiles files="${file.reference.antlr-2.7.6.jar}" iftldtodir="${build.web.dir}/WEB-INF" todir="${dist.ear.dir}/lib"/>
  562. <copyfiles files="${file.reference.commons-collections-3.1.jar}" iftldtodir="${build.web.dir}/WEB-INF" todir="${dist.ear.dir}/lib"/>
  563. <copyfiles files="${file.reference.dom4j-1.6.1.jar-1}" iftldtodir="${build.web.dir}/WEB-INF" todir="${dist.ear.dir}/lib"/>
  564. <copyfiles files="${file.reference.hibernate-core-3.3.2.GA.jar}" iftldtodir="${build.web.dir}/WEB-INF" todir="${dist.ear.dir}/lib"/>
  565. <copyfiles files="${file.reference.hsqldb-1.8.0.7.jar}" iftldtodir="${build.web.dir}/WEB-INF" todir="${dist.ear.dir}/lib"/>
  566. <copyfiles files="${file.reference.jta-1.1.jar}" iftldtodir="${build.web.dir}/WEB-INF" todir="${dist.ear.dir}/lib"/>
  567. <copyfiles files="${file.reference.slf4j-api-1.6.1.jar}" iftldtodir="${build.web.dir}/WEB-INF" todir="${dist.ear.dir}/lib"/>
  568. <copyfiles files="${file.reference.xmlpull-1.1.3.1.jar-1}" iftldtodir="${build.web.dir}/WEB-INF" todir="${dist.ear.dir}/lib"/>
  569. <copyfiles files="${file.reference.xpp3_min-1.1.4c.jar-1}" iftldtodir="${build.web.dir}/WEB-INF" todir="${dist.ear.dir}/lib"/>
  570. <mkdir dir="${build.web.dir}/META-INF"/>
  571. <manifest file="${build.web.dir}/META-INF/MANIFEST.MF" mode="update"/>
  572. </target>
  573. <target depends="init" name="library-inclusion-in-archive" unless="dist.ear.dir">
  574. <copyfiles files="${reference.PrototipoCommons.jar}" todir="${build.web.dir}/WEB-INF/lib"/>
  575. <copyfiles files="${reference.PrototipoCommons-1.jar}" todir="${build.web.dir}/WEB-INF/lib"/>
  576. <copyfiles files="${file.reference.xstream-1.4.1.jar}" todir="${build.web.dir}/WEB-INF/lib"/>
  577. <copyfiles files="${file.reference.xstream-benchmark-1.4.1.jar}" todir="${build.web.dir}/WEB-INF/lib"/>
  578. <copyfiles files="${file.reference.xstream-hibernate-1.4.1.jar}" todir="${build.web.dir}/WEB-INF/lib"/>
  579. <copyfiles files="${file.reference.cglib-nodep-2.2.jar}" todir="${build.web.dir}/WEB-INF/lib"/>
  580. <copyfiles files="${file.reference.dom4j-1.6.1.jar}" todir="${build.web.dir}/WEB-INF/lib"/>
  581. <copyfiles files="${file.reference.jdom-1.1.jar}" todir="${build.web.dir}/WEB-INF/lib"/>
  582. <copyfiles files="${file.reference.jettison-1.2.jar}" todir="${build.web.dir}/WEB-INF/lib"/>
  583. <copyfiles files="${file.reference.joda-time-1.6.jar}" todir="${build.web.dir}/WEB-INF/lib"/>
  584. <copyfiles files="${file.reference.json-20080701.jar}" todir="${build.web.dir}/WEB-INF/lib"/>
  585. <copyfiles files="${file.reference.kxml2-2.3.0.jar}" todir="${build.web.dir}/WEB-INF/lib"/>
  586. <copyfiles files="${file.reference.kxml2-min-2.3.0.jar}" todir="${build.web.dir}/WEB-INF/lib"/>
  587. <copyfiles files="${file.reference.stax-1.2.0.jar}" todir="${build.web.dir}/WEB-INF/lib"/>
  588. <copyfiles files="${file.reference.stax-api-1.0.1.jar}" todir="${build.web.dir}/WEB-INF/lib"/>
  589. <copyfiles files="${file.reference.wstx-asl-3.2.7.jar}" todir="${build.web.dir}/WEB-INF/lib"/>
  590. <copyfiles files="${file.reference.xmlpull-1.1.3.1.jar}" todir="${build.web.dir}/WEB-INF/lib"/>
  591. <copyfiles files="${file.reference.xom-1.1.jar}" todir="${build.web.dir}/WEB-INF/lib"/>
  592. <copyfiles files="${file.reference.xpp3_min-1.1.4c.jar}" todir="${build.web.dir}/WEB-INF/lib"/>
  593. <copyfiles files="${file.reference.antlr-2.7.6.jar}" todir="${build.web.dir}/WEB-INF/lib"/>
  594. <copyfiles files="${file.reference.commons-collections-3.1.jar}" todir="${build.web.dir}/WEB-INF/lib"/>
  595. <copyfiles files="${file.reference.dom4j-1.6.1.jar-1}" todir="${build.web.dir}/WEB-INF/lib"/>
  596. <copyfiles files="${file.reference.hibernate-core-3.3.2.GA.jar}" todir="${build.web.dir}/WEB-INF/lib"/>
  597. <copyfiles files="${file.reference.hsqldb-1.8.0.7.jar}" todir="${build.web.dir}/WEB-INF/lib"/>
  598. <copyfiles files="${file.reference.jta-1.1.jar}" todir="${build.web.dir}/WEB-INF/lib"/>
  599. <copyfiles files="${file.reference.slf4j-api-1.6.1.jar}" todir="${build.web.dir}/WEB-INF/lib"/>
  600. <copyfiles files="${file.reference.xmlpull-1.1.3.1.jar-1}" todir="${build.web.dir}/WEB-INF/lib"/>
  601. <copyfiles files="${file.reference.xpp3_min-1.1.4c.jar-1}" todir="${build.web.dir}/WEB-INF/lib"/>
  602. </target>
  603. <target depends="init" if="dist.ear.dir" name="-clean-webinf-lib">
  604. <delete dir="${build.web.dir}/WEB-INF/lib"/>
  605. </target>
  606. <target depends="init,-clean-webinf-lib,compile,compile-jsps,-pre-dist,library-inclusion-in-manifest" if="do.tmp.war.package" name="do-ear-dist">
  607. <dirname file="${dist.ear.war}" property="dist.jar.dir"/>
  608. <mkdir dir="${dist.jar.dir}"/>
  609. <jar compress="${jar.compress}" jarfile="${dist.ear.war}" manifest="${build.web.dir}/META-INF/MANIFEST.MF">
  610. <fileset dir="${build.web.dir}"/>
  611. </jar>
  612. </target>
  613. <target name="-post-dist">
  614. <!-- Empty placeholder for easier customization. -->
  615. <!-- You can override this target in the ../build.xml file. -->
  616. </target>
  617. <target depends="init,compile,-pre-dist,do-dist,-post-dist" description="Build distribution (WAR)." name="dist"/>
  618. <target depends="init,-clean-webinf-lib,-init-cos,compile,-pre-dist,do-ear-dist,-post-dist" description="Build distribution (WAR) to be packaged into an EAR." name="dist-ear"/>
  619. <!--
  620. EXECUTION SECTION
  621. -->
  622. <target depends="run-deploy,run-display-browser" description="Deploy to server and show in browser." name="run"/>
  623. <target name="-pre-run-deploy">
  624. <!-- Empty placeholder for easier customization. -->
  625. <!-- You can override this target in the ../build.xml file. -->
  626. </target>
  627. <target name="-post-run-deploy">
  628. <!-- Empty placeholder for easier customization. -->
  629. <!-- You can override this target in the ../build.xml file. -->
  630. </target>
  631. <target name="-pre-nbmodule-run-deploy">
  632. <!-- Empty placeholder for easier customization. -->
  633. <!-- This target can be overriden by NetBeans modules. Don't override it directly, use -pre-run-deploy task instead. -->
  634. </target>
  635. <target name="-post-nbmodule-run-deploy">
  636. <!-- Empty placeholder for easier customization. -->
  637. <!-- This target can be overriden by NetBeans modules. Don't override it directly, use -post-run-deploy task instead. -->
  638. </target>
  639. <target name="-run-deploy-am">
  640. <!-- Task to deploy to the Access Manager runtime. -->
  641. </target>
  642. <target depends="init,-init-cos,compile,compile-jsps,-do-compile-single-jsp,-pre-dist,-do-tmp-dist-with-manifest,-do-tmp-dist-without-manifest,-pre-run-deploy,-pre-nbmodule-run-deploy,-run-deploy-nb,-init-deploy-ant,-deploy-ant,-run-deploy-am,-post-nbmodule-run-deploy,-post-run-deploy" name="run-deploy">
  643. <nbjpdaappreloaded/>
  644. </target>
  645. <target if="netbeans.home" name="-run-deploy-nb">
  646. <nbdeploy clientUrlPart="${client.urlPart}" debugmode="false" forceRedeploy="${forceRedeploy}"/>
  647. </target>
  648. <target name="-init-deploy-ant" unless="netbeans.home">
  649. <property name="deploy.ant.archive" value="${dist.war}"/>
  650. <property name="deploy.ant.docbase.dir" value="${web.docbase.dir}"/>
  651. <property name="deploy.ant.resource.dir" value="${resource.dir}"/>
  652. <property name="deploy.ant.enabled" value="true"/>
  653. </target>
  654. <target depends="dist,-run-undeploy-nb,-init-deploy-ant,-undeploy-ant" name="run-undeploy"/>
  655. <target if="netbeans.home" name="-run-undeploy-nb">
  656. <fail message="Undeploy is not supported from within the IDE"/>
  657. </target>
  658. <target depends="init,-pre-dist,dist,-post-dist" name="verify">
  659. <nbverify file="${dist.war}"/>
  660. </target>
  661. <target depends="run-deploy,-init-display-browser,-display-browser-nb,-display-browser-cl" name="run-display-browser"/>
  662. <target if="do.display.browser" name="-init-display-browser">
  663. <condition property="do.display.browser.nb">
  664. <isset property="netbeans.home"/>
  665. </condition>
  666. <condition property="do.display.browser.cl">
  667. <isset property="deploy.ant.enabled"/>
  668. </condition>
  669. </target>
  670. <target if="do.display.browser.nb" name="-display-browser-nb">
  671. <nbbrowse url="${client.url}"/>
  672. </target>
  673. <target if="do.display.browser.cl" name="-get-browser" unless="browser">
  674. <condition property="browser" value="rundll32">
  675. <os family="windows"/>
  676. </condition>
  677. <condition else="" property="browser.args" value="url.dll,FileProtocolHandler">
  678. <os family="windows"/>
  679. </condition>
  680. <condition property="browser" value="/usr/bin/open">
  681. <os family="mac"/>
  682. </condition>
  683. <property environment="env"/>
  684. <condition property="browser" value="${env.BROWSER}">
  685. <isset property="env.BROWSER"/>
  686. </condition>
  687. <condition property="browser" value="/usr/bin/firefox">
  688. <available file="/usr/bin/firefox"/>
  689. </condition>
  690. <condition property="browser" value="/usr/local/firefox/firefox">
  691. <available file="/usr/local/firefox/firefox"/>
  692. </condition>
  693. <condition property="browser" value="/usr/bin/mozilla">
  694. <available file="/usr/bin/mozilla"/>
  695. </condition>
  696. <condition property="browser" value="/usr/local/mozilla/mozilla">
  697. <available file="/usr/local/mozilla/mozilla"/>
  698. </condition>
  699. <condition property="browser" value="/usr/sfw/lib/firefox/firefox">
  700. <available file="/usr/sfw/lib/firefox/firefox"/>
  701. </condition>
  702. <condition property="browser" value="/opt/csw/bin/firefox">
  703. <available file="/opt/csw/bin/firefox"/>
  704. </condition>
  705. <condition property="browser" value="/usr/sfw/lib/mozilla/mozilla">
  706. <available file="/usr/sfw/lib/mozilla/mozilla"/>
  707. </condition>
  708. <condition property="browser" value="/opt/csw/bin/mozilla">
  709. <available file="/opt/csw/bin/mozilla"/>
  710. </condition>
  711. </target>
  712. <target depends="-get-browser" if="do.display.browser.cl" name="-display-browser-cl">
  713. <fail unless="browser">
  714. Browser not found, cannot launch the deployed application. Try to set the BROWSER environment variable.
  715. </fail>
  716. <property name="browse.url" value="${deploy.ant.client.url}${client.urlPart}"/>
  717. <echo>Launching ${browse.url}</echo>
  718. <exec executable="${browser}" spawn="true">
  719. <arg line="${browser.args} ${browse.url}"/>
  720. </exec>
  721. </target>
  722. <target depends="init,-init-cos,compile-single" name="run-main">
  723. <fail unless="run.class">Must select one file in the IDE or set run.class</fail>
  724. <webproject1:java classname="${run.class}"/>
  725. </target>
  726. <target depends="init,compile-test-single,-pre-test-run-single" name="run-test-with-main">
  727. <fail unless="run.class">Must select one file in the IDE or set run.class</fail>
  728. <webproject1:java classname="${run.class}" classpath="${run.test.classpath}"/>
  729. </target>
  730. <!--
  731. DEBUGGING SECTION
  732. -->
  733. <target depends="init,-init-cos,compile,compile-jsps,-do-compile-single-jsp,-pre-dist,-do-tmp-dist-with-manifest,-do-tmp-dist-without-manifest" description="Debug project in IDE." if="netbeans.home" name="debug">
  734. <nbstartserver debugmode="true"/>
  735. <antcall target="connect-debugger"/>
  736. <nbdeploy clientUrlPart="${client.urlPart}" debugmode="true" forceRedeploy="true"/>
  737. <antcall target="debug-display-browser"/>
  738. <antcall target="connect-client-debugger"/>
  739. </target>
  740. <target if="do.debug.server" name="connect-debugger" unless="is.debugged">
  741. <nbjpdaconnect address="${jpda.address}" host="${jpda.host}" name="${name}" transport="${jpda.transport}">
  742. <classpath>
  743. <path path="${debug.classpath}:${j2ee.platform.classpath}"/>
  744. </classpath>
  745. <sourcepath>
  746. <path path="${web.docbase.dir}"/>
  747. </sourcepath>
  748. </nbjpdaconnect>
  749. </target>
  750. <target if="do.display.browser.debug" name="debug-display-browser">
  751. <nbbrowse url="${client.url}"/>
  752. </target>
  753. <target if="do.debug.client" name="connect-client-debugger">
  754. <webproject1:nbjsdebugstart webUrl="${client.url}"/>
  755. </target>
  756. <target depends="init,compile-test-single" if="netbeans.home" name="-debug-start-debuggee-main-test">
  757. <fail unless="debug.class">Must select one file in the IDE or set debug.class</fail>
  758. <webproject1:debug classname="${debug.class}" classpath="${debug.test.classpath}"/>
  759. </target>
  760. <target depends="init,compile-test-single,-debug-start-debugger-main-test,-debug-start-debuggee-main-test" if="netbeans.home" name="debug-test-with-main"/>
  761. <target depends="init,compile,compile-jsps,-do-compile-single-jsp,debug" if="netbeans.home" name="debug-single"/>
  762. <target depends="init" if="netbeans.home" name="-debug-start-debugger-main-test">
  763. <webproject1:nbjpdastart classpath="${debug.test.classpath}" name="${debug.class}"/>
  764. </target>
  765. <target depends="init" if="netbeans.home" name="-debug-start-debugger">
  766. <webproject1:nbjpdastart name="${debug.class}"/>
  767. </target>
  768. <target depends="init,compile-single" if="netbeans.home" name="-debug-start-debuggee-single">
  769. <fail unless="debug.class">Must select one file in the IDE or set debug.class</fail>
  770. <webproject1:debug classname="${debug.class}"/>
  771. </target>
  772. <target depends="init,compile-single,-debug-start-debugger,-debug-start-debuggee-single" if="netbeans.home" name="debug-single-main"/>
  773. <target depends="init" name="-pre-debug-fix">
  774. <fail unless="fix.includes">Must set fix.includes</fail>
  775. <property name="javac.includes" value="${fix.includes}.java"/>
  776. </target>
  777. <target depends="init,-pre-debug-fix,compile-single" if="netbeans.home" name="-do-debug-fix">
  778. <webproject1:nbjpdareload/>
  779. </target>
  780. <target depends="init,-pre-debug-fix,-do-debug-fix" if="netbeans.home" name="debug-fix"/>
  781. <!--
  782. JAVADOC SECTION
  783. -->
  784. <target depends="init" name="javadoc-build">
  785. <mkdir dir="${dist.javadoc.dir}"/>
  786. <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}">
  787. <classpath>
  788. <path path="${javac.classpath}:${j2ee.platform.classpath}"/>
  789. </classpath>
  790. <fileset dir="${src.dir}" excludes="${excludes}" includes="${includes}">
  791. <filename name="**/*.java"/>
  792. </fileset>
  793. <fileset dir="${build.generated.sources.dir}" erroronmissingdir="false">
  794. <include name="**/*.java"/>
  795. </fileset>
  796. </javadoc>
  797. </target>
  798. <target depends="init,javadoc-build" if="netbeans.home" name="javadoc-browse" unless="no.javadoc.preview">
  799. <nbbrowse file="${dist.javadoc.dir}/index.html"/>
  800. </target>
  801. <target depends="init,javadoc-build,javadoc-browse" description="Build Javadoc." name="javadoc"/>
  802. <!--
  803. JUNIT COMPILATION SECTION
  804. -->
  805. <target depends="init,compile" if="have.tests" name="-pre-pre-compile-test">
  806. <mkdir dir="${build.test.classes.dir}"/>
  807. <property name="j2ee.platform.embeddableejb.classpath" value=""/>
  808. </target>
  809. <target name="-pre-compile-test">
  810. <!-- Empty placeholder for easier customization. -->
  811. <!-- You can override this target in the ../build.xml file. -->
  812. </target>
  813. <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test" if="have.tests" name="-do-compile-test">
  814. <webproject2:javac classpath="${javac.test.classpath}:${j2ee.platform.classpath}:${j2ee.platform.embeddableejb.classpath}" debug="true" destdir="${build.test.classes.dir}" srcdir="${test.src.dir}"/>
  815. <copy todir="${build.test.classes.dir}">
  816. <fileset dir="${test.src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
  817. </copy>
  818. </target>
  819. <target name="-post-compile-test">
  820. <!-- Empty placeholder for easier customization. -->
  821. <!-- You can override this target in the ../build.xml file. -->
  822. </target>
  823. <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test,-do-compile-test,-post-compile-test" name="compile-test"/>
  824. <target name="-pre-compile-test-single">
  825. <!-- Empty placeholder for easier customization. -->
  826. <!-- You can override this target in the ../build.xml file. -->
  827. </target>
  828. <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test-single" if="have.tests" name="-do-compile-test-single">
  829. <fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail>
  830. <webproject2:javac classpath="${javac.test.classpath}:${j2ee.platform.classpath}:${j2ee.platform.embeddableejb.classpath}" debug="true" destdir="${build.test.classes.dir}" excludes="" includes="${javac.includes}" srcdir="${test.src.dir}"/>
  831. <copy todir="${build.test.classes.dir}">
  832. <fileset dir="${test.src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
  833. </copy>
  834. </target>
  835. <target name="-post-compile-test-single">
  836. <!-- Empty placeholder for easier customization. -->
  837. <!-- You can override this target in the ../build.xml file. -->
  838. </target>
  839. <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test-single,-do-compile-test-single,-post-compile-test-single" name="compile-test-single"/>
  840. <!--
  841. JUNIT EXECUTION SECTION
  842. -->
  843. <target depends="init" if="have.tests" name="-pre-test-run">
  844. <mkdir dir="${build.test.results.dir}"/>
  845. </target>
  846. <target depends="init,compile-test,-pre-test-run" if="have.tests" name="-do-test-run">
  847. <webproject2:junit testincludes="**/*Test.java"/>
  848. </target>
  849. <target depends="init,compile-test,-pre-test-run,-do-test-run" if="have.tests" name="-post-test-run">
  850. <fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail>
  851. </target>
  852. <target depends="init" if="have.tests" name="test-report"/>
  853. <target depends="init" if="netbeans.home+have.tests" name="-test-browse"/>
  854. <target depends="init,compile-test,-pre-test-run,-do-test-run,test-report,-post-test-run,-test-browse" description="Run unit tests." name="test"/>
  855. <target depends="init" if="have.tests" name="-pre-test-run-single">
  856. <mkdir dir="${build.test.results.dir}"/>
  857. </target>
  858. <target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-do-test-run-single">
  859. <fail unless="test.includes">Must select some files in the IDE or set test.includes</fail>
  860. <webproject2:junit excludes="" includes="${test.includes}"/>
  861. </target>
  862. <target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single" if="have.tests" name="-post-test-run-single">
  863. <fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail>
  864. </target>
  865. <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"/>
  866. <!--
  867. JUNIT DEBUGGING SECTION
  868. -->
  869. <target depends="init,compile-test" if="have.tests" name="-debug-start-debuggee-test">
  870. <fail unless="test.class">Must select one file in the IDE or set test.class</fail>
  871. <property location="${build.test.results.dir}/TEST-${test.class}.xml" name="test.report.file"/>
  872. <delete file="${test.report.file}"/>
  873. <!-- must exist, otherwise the XML formatter would fail -->
  874. <mkdir dir="${build.test.results.dir}"/>
  875. <webproject1:debug args="${test.class}" classname="org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner" classpath="${ant.home}/lib/ant.jar:${ant.home}/lib/ant-junit.jar:${debug.test.classpath}:${j2ee.platform.embeddableejb.classpath}">
  876. <customize>
  877. <arg value="showoutput=true"/>
  878. <arg value="formatter=org.apache.tools.ant.taskdefs.optional.junit.BriefJUnitResultFormatter"/>
  879. <arg value="formatter=org.apache.tools.ant.taskdefs.optional.junit.XMLJUnitResultFormatter,${test.report.file}"/>
  880. </customize>
  881. </webproject1:debug>
  882. </target>
  883. <target depends="init,compile-test" if="netbeans.home+have.tests" name="-debug-start-debugger-test">
  884. <webproject1:nbjpdastart classpath="${debug.test.classpath}" name="${test.class}"/>
  885. </target>
  886. <target depends="init,compile-test,-debug-start-debugger-test,-debug-start-debuggee-test" name="debug-test"/>
  887. <target depends="init,-pre-debug-fix,compile-test-single" if="netbeans.home" name="-do-debug-fix-test">
  888. <webproject1:nbjpdareload dir="${build.test.classes.dir}"/>
  889. </target>
  890. <target depends="init,-pre-debug-fix,-do-debug-fix-test" if="netbeans.home" name="debug-fix-test"/>
  891. <!--
  892. CLEANUP SECTION
  893. -->
  894. <target depends="init" if="no.dist.ear.dir" name="deps-clean" unless="no.deps">
  895. <ant antfile="${project.PrototipoCommons}/build.xml" inheritall="false" target="clean"/>
  896. <ant antfile="${project.PrototipoCommons-1}/build.xml" inheritall="false" target="clean"/>
  897. </target>
  898. <target depends="init" name="do-clean">
  899. <condition property="build.dir.to.clean" value="${build.web.dir}">
  900. <isset property="dist.ear.dir"/>
  901. </condition>
  902. <property name="build.dir.to.clean" value="${build.web.dir}"/>
  903. <delete includeEmptyDirs="true" quiet="true">
  904. <fileset dir="${build.dir.to.clean}/WEB-INF/lib"/>
  905. </delete>
  906. <delete dir="${build.dir}"/>
  907. <available file="${build.dir.to.clean}/WEB-INF/lib" property="status.clean-failed" type="dir"/>
  908. <delete dir="${dist.dir}"/>
  909. </target>
  910. <target depends="do-clean" if="status.clean-failed" name="check-clean">
  911. <echo message="Warning: unable to delete some files in ${build.web.dir}/WEB-INF/lib - they are probably locked by the J2EE server. "/>
  912. <echo level="info" message="To delete all files undeploy the module from Server Registry in Runtime tab and then use Clean again."/>
  913. </target>
  914. <target depends="init" if="netbeans.home" name="undeploy-clean">
  915. <nbundeploy failOnError="false" startServer="false"/>
  916. </target>
  917. <target name="-post-clean">
  918. <!-- Empty placeholder for easier customization. -->
  919. <!-- You can override this target in the ../build.xml file. -->
  920. </target>
  921. <target depends="init,undeploy-clean,deps-clean,do-clean,check-clean,-post-clean" description="Clean build products." name="clean"/>
  922. <target depends="clean" description="Clean build products." name="clean-ear"/>
  923. </project>