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

netrexxc.html 13 KiB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338
  1. <!--
  2. Licensed to the Apache Software Foundation (ASF) under one or more
  3. contributor license agreements. See the NOTICE file distributed with
  4. this work for additional information regarding copyright ownership.
  5. The ASF licenses this file to You under the Apache License, Version 2.0
  6. (the "License"); you may not use this file except in compliance with
  7. the License. You may obtain a copy of the License at
  8. http://www.apache.org/licenses/LICENSE-2.0
  9. Unless required by applicable law or agreed to in writing, software
  10. distributed under the License is distributed on an "AS IS" BASIS,
  11. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  12. See the License for the specific language governing permissions and
  13. limitations under the License.
  14. -->
  15. <html>
  16. <head>
  17. <meta http-equiv="Content-Language" content="en-us">
  18. <link rel="stylesheet" type="text/css" href="../stylesheets/style.css">
  19. <title>NetRexxC Task</title>
  20. </head>
  21. <body>
  22. <h2><a name="netrexxc">NetRexxC</a></h2>
  23. <h3>Description</h3>
  24. <p>Compiles a <a href="http://www2.hursley.ibm.com/netrexx" target="_top">NetRexx</a>
  25. source tree within the running (Apache Ant) VM.</p>
  26. <p>The source and destination directory will be recursively scanned for
  27. NetRexx source files to compile. Only NetRexx files that have no corresponding
  28. class file or where the class file is older than the java file will be compiled.</p>
  29. <p>Files in the source tree are copied to the destination directory,
  30. allowing support files to be located properly in the classpath. The source
  31. files are copied because the NetRexx compiler cannot produce class files in a
  32. specific directory via parameters</p>
  33. <p>The directory structure of the source tree should follow the package
  34. hierarchy.</p>
  35. <p>It is possible to refine the set of files that are being compiled/copied.
  36. This can be done with the <i>includes</i>, <i>includesfile</i>, <i>excludes</i>, <i>excludesfile</i> and
  37. <i>defaultexcludes</i> attributes. With the <i>includes</i> or <i>includesfile</i> attribute you
  38. specify the files you want to have included by using patterns. The
  39. <i>exclude</i> or <i>excludesfile</i> attribute is used to specify the files you want to have
  40. excluded. This is also done with patterns. And finally with the
  41. <i>defaultexcludes</i> attribute, you can specify whether you
  42. want to use default exclusions or not. See the section on <a
  43. href="../dirtasks.html#directorybasedtasks">directory based tasks</a>, on how the
  44. inclusion/exclusion of files works, and how to write patterns.</p>
  45. <p>This task forms an implicit <a href="../Types/fileset.html">FileSet</a> and
  46. supports most attributes of <code>&lt;fileset&gt;</code>
  47. (<code>dir</code> becomes <code>srcdir</code>) as well as the nested
  48. <code>&lt;include&gt;</code>, <code>&lt;exclude&gt;</code> and
  49. <code>&lt;patternset&gt;</code> elements.</p>
  50. <p>All properties except classpath, srcdir and destDir are also available as properties in the form
  51. <code>ant.netrexxc.<i>attributename</i></code>, eg.<br>
  52. <code>&lt;property name="ant.netrexxc.verbose" value="noverbose"/&gt;</code><br>
  53. or from the command line as<br>
  54. <code>ant -Dant.netrexxc.verbose=noverbose ...</code>
  55. </p>
  56. <h3>Parameters</h3>
  57. <table border="1" cellpadding="2" cellspacing="0">
  58. <tr>
  59. <td valign="top"><b>Attribute</b></td>
  60. <td valign="top"><b>Description</b></td>
  61. <td align="center" valign="top"><b>Required</b></td>
  62. </tr>
  63. <tr>
  64. <td valign="top">binary</td>
  65. <td valign="top">Whether literals are treated as the java binary
  66. type rather than the NetRexx types</td>
  67. <td valign="top" align="center">No</td>
  68. </tr>
  69. <tr>
  70. <td valign="top">classpath</td>
  71. <td valign="top">The classpath to use during compilation</td>
  72. <td valign="top" align="center">No</td>
  73. </tr>
  74. <tr>
  75. <td valign="top">comments</td>
  76. <td valign="top">Whether comments are passed through to the
  77. generated java source</td>
  78. <td valign="top" align="center">No</td>
  79. </tr>
  80. <tr>
  81. <td valign="top">compact</td>
  82. <td valign="top">Whether error messages come out in compact or
  83. verbose format. Default is the compact format.</td>
  84. <td valign="top" align="center">No</td>
  85. </tr>
  86. <tr>
  87. <td valign="top">compile</td>
  88. <td valign="top">Whether the NetRexx compiler should compile the
  89. generated java code</td>
  90. <td valign="top" align="center">No</td>
  91. </tr>
  92. <tr>
  93. <td valign="top">console</td>
  94. <td valign="top">Whether or not messages should be displayed on the
  95. 'console'. Note that this task will rely on the default value for filtering compile messages.</td>
  96. <td valign="top" align="center">No</td>
  97. </tr>
  98. <tr>
  99. <td valign="top">crossref</td>
  100. <td valign="top">Whether variable cross references are generated</td>
  101. <td valign="top" align="center">No</td>
  102. </tr>
  103. <tr>
  104. <td valign="top">decimal</td>
  105. <td valign="top">Whether decimal arithmetic should be used for the
  106. NetRexx code. Setting this to off will report decimal arithmetic
  107. as an error, for performance critical applications.</td>
  108. <td valign="top" align="center">No</td>
  109. </tr>
  110. <tr>
  111. <td valign="top">defaultexcludes</td>
  112. <td valign="top">indicates whether default excludes should be used or not
  113. (&quot;yes&quot;/&quot;no&quot;). Default excludes are used when
  114. omitted.</td>
  115. <td valign="top" align="center">No</td>
  116. </tr>
  117. <tr>
  118. <td valign="top">destDir</td>
  119. <td valign="top">the destination directory into which the NetRexx
  120. source files should be copied and then compiled</td>
  121. <td valign="top" align="center">Yes</td>
  122. </tr>
  123. <tr>
  124. <td valign="top">diag</td>
  125. <td valign="top">Whether diagnostic information about the compile is
  126. generated</td>
  127. <td valign="top" align="center">No</td>
  128. </tr>
  129. <tr>
  130. <td valign="top">excludes</td>
  131. <td valign="top">comma- or space-separated list of patterns of files that must be
  132. excluded. No files (except default excludes) are excluded when
  133. omitted.</td>
  134. <td valign="top" align="center">No</td>
  135. </tr>
  136. <tr>
  137. <td valign="top">excludesfile</td>
  138. <td valign="top">the name of a file. Each line of this file is
  139. taken to be an exclude pattern</td>
  140. <td valign="top" align="center">No</td>
  141. </tr>
  142. <tr>
  143. <td valign="top">explicit</td>
  144. <td valign="top">Whether variables must be declared explicitly
  145. before use</td>
  146. <td valign="top" align="center">No</td>
  147. </tr>
  148. <tr>
  149. <td valign="top">format</td>
  150. <td valign="top">Whether the generated java code is formatted nicely
  151. or left to match NetRexx line numbers for call stack debugging</td>
  152. <td valign="top" align="center">No</td>
  153. </tr>
  154. <tr>
  155. <td valign="top">includes</td>
  156. <td valign="top">comma- or space-separated list of patterns of files that must be
  157. included. All files are included when omitted.</td>
  158. <td valign="top" align="center">No</td>
  159. </tr>
  160. <tr>
  161. <td valign="top">includesfile</td>
  162. <td valign="top">the name of a file. Each line of this file is
  163. taken to be an include pattern</td>
  164. <td valign="top" align="center">No</td>
  165. </tr>
  166. <tr>
  167. <td valign="top">java</td>
  168. <td valign="top">Whether the generated java code is produced</td>
  169. <td valign="top" align="center">No</td>
  170. </tr>
  171. <tr>
  172. <td valign="top">keep</td>
  173. <td valign="top">Sets whether the generated java source file should be kept
  174. after compilation. The generated files will have an extension of
  175. .java.keep, <b>not</b> .java. Use removeKeepExtension to change that.</td>
  176. <td valign="top" align="center">No</td>
  177. </tr>
  178. <tr>
  179. <td valign="top">logo</td>
  180. <td valign="top">Whether the compiler text logo is displayed when
  181. compiling</td>
  182. <td valign="top" align="center">No</td>
  183. </tr>
  184. <tr>
  185. <td valign="top">removeKeepExtension</td>
  186. <td valign="top">Tells whether the trailing .keep in nocompile-mode should
  187. be removed so that the resulting java source really ends on .java. This
  188. facilitates the use of the javadoc tool lateron.</td>
  189. <td valign="top" align="center">No</td>
  190. </tr>
  191. <tr>
  192. <td valign="top">replace</td>
  193. <td valign="top">Whether the generated .java file should be replaced
  194. when compiling</td>
  195. <td valign="top" align="center">No</td>
  196. </tr>
  197. <tr>
  198. <td valign="top">savelog</td>
  199. <td valign="top">Whether the compiler messages will be written to
  200. NetRexxC.log as well as to the console</td>
  201. <td valign="top" align="center">No</td>
  202. </tr>
  203. <tr>
  204. <td valign="top">sourcedir</td>
  205. <td valign="top">Tells the NetRexx compiler to store the class files in the
  206. same directory as the source files. The alternative is the working
  207. directory</td>
  208. <td valign="top" align="center">No</td>
  209. </tr>
  210. <tr>
  211. <td valign="top">srcDir</td>
  212. <td valign="top">Set the source dir to find the source NetRexx
  213. files</td>
  214. <td valign="top" align="center">Yes</td>
  215. </tr>
  216. <tr>
  217. <td valign="top">strictargs</td>
  218. <td valign="top">Tells the NetRexx compiler that method calls always
  219. need parentheses, even if no arguments are needed, e.g.
  220. <code>aStringVar.getBytes</code> vs.
  221. <code>aStringVar.getBytes()</code></td>
  222. <td valign="top" align="center">No</td>
  223. </tr>
  224. <tr>
  225. <td valign="top">strictassign</td>
  226. <td valign="top">Tells the NetRexx compile that assignments must
  227. match exactly on type</td>
  228. <td valign="top" align="center">No</td>
  229. </tr>
  230. <tr>
  231. <td valign="top">strictcase</td>
  232. <td valign="top">Specifies whether the NetRexx compiler should be
  233. case sensitive or not</td>
  234. <td valign="top" align="center">No</td>
  235. </tr>
  236. <tr>
  237. <td valign="top">strictimport</td>
  238. <td valign="top">Whether classes need to be imported explicitly using an
  239. <code>import</code> statement. By default the NetRexx compiler will
  240. import certain packages automatically</td>
  241. <td valign="top" align="center">No</td>
  242. </tr>
  243. <tr>
  244. <td valign="top">strictprops</td>
  245. <td valign="top">Whether local properties need to be qualified
  246. explicitly using <code>this</code></td>
  247. <td valign="top" align="center">No</td>
  248. </tr>
  249. <tr>
  250. <td valign="top">strictsignal</td>
  251. <td valign="top">Whether the compiler should force catching of
  252. exceptions by explicitly named types</td>
  253. <td valign="top" align="center">No</td>
  254. </tr>
  255. <tr>
  256. <td valign="top">symbols</td>
  257. <td valign="top">Whether debug symbols should be generated into the
  258. class file</td>
  259. <td valign="top" align="center">No</td>
  260. </tr>
  261. <tr>
  262. <td valign="top">time</td>
  263. <td valign="top">Asks the NetRexx compiler to print compilation
  264. times to the console</td>
  265. <td valign="top" align="center">No</td>
  266. </tr>
  267. <tr>
  268. <td valign="top">trace</td>
  269. <td valign="top">Turns on or off tracing and directs the resultant
  270. trace output</td>
  271. <td valign="top" align="center">No</td>
  272. </tr>
  273. <tr>
  274. <td valign="top">utf8</td>
  275. <td valign="top">Tells the NetRexx compiler that the source is in UTF8</td>
  276. <td valign="top" align="center">No</td>
  277. </tr>
  278. <tr>
  279. <td valign="top">verbose</td>
  280. <td valign="top">Whether lots of warnings and error messages should
  281. be generated</td>
  282. <td valign="top" align="center">No</td>
  283. </tr>
  284. <tr>
  285. <td valign="top">suppressMethodArgumentNotUsed</td>
  286. <td valign="top">Tells whether we should filter out the
  287. &amp;Method argument not used&amp; messages in strictargs mode.</td>
  288. <td valign="top" align="center">No</td>
  289. </tr>
  290. <tr>
  291. <td valign="top">suppressPrivatePropertyNotUsed</td>
  292. <td valign="top">Tells whether we should filter out the
  293. &amp;Private Property defined, but not used&amp; messages in strictargs mode.</td>
  294. <td valign="top" align="center">No</td>
  295. </tr>
  296. <tr>
  297. <td valign="top">suppressVariableNotUsed</td>
  298. <td valign="top">Tells whether we should filter out the
  299. &amp;Variable set but not used&amp; messages in strictargs mode.
  300. Please be careful with this one, as you can hide errors behind it!</td>
  301. <td valign="top" align="center">No</td>
  302. </tr>
  303. <tr>
  304. <td valign="top">suppressExceptionNotSignalled</td>
  305. <td valign="top">Tells whether we should filter out the
  306. &amp;Exception is declared, but not signalled within the method&amp;
  307. messages in strictsignal mode.</td>
  308. <td valign="top" align="center">No</td>
  309. </tr>
  310. <tr>
  311. <td valign="top">suppressDeprecation</td>
  312. <td valign="top">Tells whether we should filter out any deprecation-messages
  313. of the compiler out.</td>
  314. <td valign="top" align="center">No</td>
  315. </tr>
  316. </table>
  317. <h3>Examples</h3>
  318. <blockquote>
  319. <p><code>&lt;netrexxc srcDir=&quot;/source/project&quot;
  320. includes=&quot;vnr/util/*&quot;
  321. destDir=&quot;/source/project/build&quot;
  322. classpath=&quot;/source/project2/proj.jar&quot;
  323. comments=&quot;true&quot;
  324. crossref=&quot;false&quot; replace=&quot;true&quot;
  325. keep=&quot;true&quot;/&gt;</code>
  326. </p>
  327. </blockquote>
  328. </body>
  329. </html>