PageRenderTime 62ms CodeModel.GetById 24ms RepoModel.GetById 0ms app.codeStats 1ms

/nbproject/build-impl.xml

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