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 12 KiB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330
  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 (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="../CoreTypes/fileset.html">FileSet</a> and
  46. supports all 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'</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</td>
  107. <td valign="top" align="center">No</td>
  108. </tr>
  109. <tr>
  110. <td valign="top">defaultexcludes</td>
  111. <td valign="top">indicates whether default excludes should be used or not
  112. (&quot;yes&quot;/&quot;no&quot;). Default excludes are used when
  113. omitted.</td>
  114. <td valign="top" align="center">No</td>
  115. </tr>
  116. <tr>
  117. <td valign="top">destDir</td>
  118. <td valign="top">the destination directory into which the NetRexx
  119. source files should be copied and then compiled</td>
  120. <td valign="top" align="center">Yes</td>
  121. </tr>
  122. <tr>
  123. <td valign="top">diag</td>
  124. <td valign="top">Whether diagnostic information about the compile is
  125. generated</td>
  126. <td valign="top" align="center">No</td>
  127. </tr>
  128. <tr>
  129. <td valign="top">excludes</td>
  130. <td valign="top">comma- or space-separated list of patterns of files that must be
  131. excluded. No files (except default excludes) are excluded when
  132. omitted.</td>
  133. <td valign="top" align="center">No</td>
  134. </tr>
  135. <tr>
  136. <td valign="top">excludesfile</td>
  137. <td valign="top">the name of a file. Each line of this file is
  138. taken to be an exclude pattern</td>
  139. <td valign="top" align="center">No</td>
  140. </tr>
  141. <tr>
  142. <td valign="top">explicit</td>
  143. <td valign="top">Whether variables must be declared explicitly
  144. before use</td>
  145. <td valign="top" align="center">No</td>
  146. </tr>
  147. <tr>
  148. <td valign="top">format</td>
  149. <td valign="top">Whether the generated java code is formatted nicely
  150. or left to match NetRexx line numbers for call stack debugging</td>
  151. <td valign="top" align="center">No</td>
  152. </tr>
  153. <tr>
  154. <td valign="top">includes</td>
  155. <td valign="top">comma- or space-separated list of patterns of files that must be
  156. included. All files are included when omitted.</td>
  157. <td valign="top" align="center">No</td>
  158. </tr>
  159. <tr>
  160. <td valign="top">includesfile</td>
  161. <td valign="top">the name of a file. Each line of this file is
  162. taken to be an include pattern</td>
  163. <td valign="top" align="center">No</td>
  164. </tr>
  165. <tr>
  166. <td valign="top">java</td>
  167. <td valign="top">Whether the generated java code is produced</td>
  168. <td valign="top" align="center">No</td>
  169. </tr>
  170. <tr>
  171. <td valign="top">keep</td>
  172. <td valign="top">Sets whether the generated java source file should be kept
  173. after compilation. The generated files will have an extension of
  174. .java.keep, <b>not</b> .java</td>
  175. <td valign="top" align="center">No</td>
  176. </tr>
  177. <tr>
  178. <td valign="top">logo</td>
  179. <td valign="top">Whether the compiler text logo is displayed when
  180. compiling</td>
  181. <td valign="top" align="center">No</td>
  182. </tr>
  183. <tr>
  184. <td valign="top">replace</td>
  185. <td valign="top">Whether the generated .java file should be replaced
  186. when compiling</td>
  187. <td valign="top" align="center">No</td>
  188. </tr>
  189. <tr>
  190. <td valign="top">savelog</td>
  191. <td valign="top">Whether the compiler messages will be written to
  192. NetRexxC.log as well as to the console</td>
  193. <td valign="top" align="center">No</td>
  194. </tr>
  195. <tr>
  196. <td valign="top">sourcedir</td>
  197. <td valign="top">Tells the NetRexx compiler to store the class files in the
  198. same directory as the source files. The alternative is the working
  199. directory</td>
  200. <td valign="top" align="center">No</td>
  201. </tr>
  202. <tr>
  203. <td valign="top">srcDir</td>
  204. <td valign="top">Set the source dir to find the source NetRexx
  205. files</td>
  206. <td valign="top" align="center">Yes</td>
  207. </tr>
  208. <tr>
  209. <td valign="top">strictargs</td>
  210. <td valign="top">Tells the NetRexx compiler that method calls always
  211. need parentheses, even if no arguments are needed, e.g.
  212. <code>aStringVar.getBytes</code> vs.
  213. <code>aStringVar.getBytes()</code></td>
  214. <td valign="top" align="center">No</td>
  215. </tr>
  216. <tr>
  217. <td valign="top">strictassign</td>
  218. <td valign="top">Tells the NetRexx compile that assignments must
  219. match exactly on type</td>
  220. <td valign="top" align="center">No</td>
  221. </tr>
  222. <tr>
  223. <td valign="top">strictcase</td>
  224. <td valign="top">Specifies whether the NetRexx compiler should be
  225. case sensitive or not</td>
  226. <td valign="top" align="center">No</td>
  227. </tr>
  228. <tr>
  229. <td valign="top">strictimport</td>
  230. <td valign="top">Whether classes need to be imported explicitly using an
  231. <code>import</code> statement. By default the NetRexx compiler will
  232. import certain packages automatically</td>
  233. <td valign="top" align="center">No</td>
  234. </tr>
  235. <tr>
  236. <td valign="top">strictprops</td>
  237. <td valign="top">Whether local properties need to be qualified
  238. explicitly using <code>this</code></td>
  239. <td valign="top" align="center">No</td>
  240. </tr>
  241. <tr>
  242. <td valign="top">strictsignal</td>
  243. <td valign="top">Whether the compiler should force catching of
  244. exceptions by explicitly named types</td>
  245. <td valign="top" align="center">No</td>
  246. </tr>
  247. <tr>
  248. <td valign="top">symbols</td>
  249. <td valign="top">Whether debug symbols should be generated into the
  250. class file</td>
  251. <td valign="top" align="center">No</td>
  252. </tr>
  253. <tr>
  254. <td valign="top">time</td>
  255. <td valign="top">Asks the NetRexx compiler to print compilation
  256. times to the console</td>
  257. <td valign="top" align="center">No</td>
  258. </tr>
  259. <tr>
  260. <td valign="top">trace</td>
  261. <td valign="top">Turns on or off tracing and directs the resultant
  262. trace output</td>
  263. <td valign="top" align="center">No</td>
  264. </tr>
  265. <tr>
  266. <td valign="top">utf8</td>
  267. <td valign="top">Tells the NetRexx compiler that the source is in UTF8</td>
  268. <td valign="top" align="center">No</td>
  269. </tr>
  270. <tr>
  271. <td valign="top">verbose</td>
  272. <td valign="top">Whether lots of warnings and error messages should
  273. be generated</td>
  274. <td valign="top" align="center">No</td>
  275. </tr>
  276. <tr>
  277. <td valign="top">suppressMethodArgumentNotUsed</td>
  278. <td valign="top">Tells whether we should filter out the
  279. &amp;Method argument not used&amp; messages in strictargs mode.</td>
  280. <td valign="top" align="center">no</td>
  281. </tr>
  282. <tr>
  283. <td valign="top">suppressPrivatePropertyNotUsed</td>
  284. <td valign="top">Tells whether we should filter out the
  285. &amp;Private Property defined, but not used&amp; messages in strictargs mode.</td>
  286. <td valign="top" align="center">no</td>
  287. </tr>
  288. <tr>
  289. <td valign="top">suppressVariableNotUsed</td>
  290. <td valign="top">Tells whether we should filter out the
  291. &amp;Variable set but not used&amp; messages in strictargs mode.
  292. Please be careful with this one, as you can hide errors behind it!</td>
  293. <td valign="top" align="center">no</td>
  294. </tr>
  295. <tr>
  296. <td valign="top">suppressExceptionNotSignalled</td>
  297. <td valign="top">Tells whether we should filter out the
  298. &amp;Exception is declared, but not signaled within the method&amp;
  299. messages in strictsignal mode.</td>
  300. <td valign="top" align="center">no</td>
  301. </tr>
  302. <tr>
  303. <td valign="top">suppressDeprecation</td>
  304. <td valign="top">Tells whether we should filter out any deprecation-messages
  305. of the compiler out.</td>
  306. <td valign="top" align="center">no</td>
  307. </tr>
  308. </table>
  309. <h3>Examples</h3>
  310. <blockquote>
  311. <p><code>&lt;netrexxc srcDir=&quot;/source/project&quot;
  312. includes=&quot;vnr/util/*&quot;
  313. destDir=&quot;/source/project/build&quot;
  314. classpath=&quot;/source/project2/proj.jar&quot;
  315. comments=&quot;true&quot;
  316. crossref=&quot;false&quot; replace=&quot;true&quot;
  317. keep=&quot;true&quot;/&gt;</code>
  318. </p>
  319. </blockquote>
  320. </body>
  321. </html>