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

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337
  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 id="netrexxc">NetRexxC</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. <p><strong>Note</strong>: This task depends on external libraries not
  57. included in the Apache Ant distribution. See <a href="../install.html#librarydependencies">Library Dependencies</a>
  58. for more information.</p>
  59. <h3>Parameters</h3>
  60. <table>
  61. <tr>
  62. <td valign="top"><b>Attribute</b></td>
  63. <td valign="top"><b>Description</b></td>
  64. <td align="center" valign="top"><b>Required</b></td>
  65. </tr>
  66. <tr>
  67. <td valign="top">binary</td>
  68. <td valign="top">Whether literals are treated as the java binary
  69. type rather than the NetRexx types</td>
  70. <td valign="top" align="center">No</td>
  71. </tr>
  72. <tr>
  73. <td valign="top">classpath</td>
  74. <td valign="top">The classpath to use during compilation</td>
  75. <td valign="top" align="center">No</td>
  76. </tr>
  77. <tr>
  78. <td valign="top">comments</td>
  79. <td valign="top">Whether comments are passed through to the
  80. generated java source</td>
  81. <td valign="top" align="center">No</td>
  82. </tr>
  83. <tr>
  84. <td valign="top">compact</td>
  85. <td valign="top">Whether error messages come out in compact or
  86. verbose format. Default is the compact format.</td>
  87. <td valign="top" align="center">No</td>
  88. </tr>
  89. <tr>
  90. <td valign="top">compile</td>
  91. <td valign="top">Whether the NetRexx compiler should compile the
  92. generated java code</td>
  93. <td valign="top" align="center">No</td>
  94. </tr>
  95. <tr>
  96. <td valign="top">console</td>
  97. <td valign="top">Whether or not messages should be displayed on the
  98. 'console'. Note that this task will rely on the default value for filtering compile messages.</td>
  99. <td valign="top" align="center">No</td>
  100. </tr>
  101. <tr>
  102. <td valign="top">crossref</td>
  103. <td valign="top">Whether variable cross references are generated</td>
  104. <td valign="top" align="center">No</td>
  105. </tr>
  106. <tr>
  107. <td valign="top">decimal</td>
  108. <td valign="top">Whether decimal arithmetic should be used for the
  109. NetRexx code. Setting this to off will report decimal arithmetic
  110. as an error, for performance critical applications.</td>
  111. <td valign="top" align="center">No</td>
  112. </tr>
  113. <tr>
  114. <td valign="top">defaultexcludes</td>
  115. <td valign="top">indicates whether default excludes should be used or not
  116. (&quot;yes&quot;/&quot;no&quot;). Default excludes are used when
  117. omitted.</td>
  118. <td valign="top" align="center">No</td>
  119. </tr>
  120. <tr>
  121. <td valign="top">destDir</td>
  122. <td valign="top">the destination directory into which the NetRexx
  123. source files should be copied and then compiled</td>
  124. <td valign="top" align="center">Yes</td>
  125. </tr>
  126. <tr>
  127. <td valign="top">diag</td>
  128. <td valign="top">Whether diagnostic information about the compile is
  129. generated</td>
  130. <td valign="top" align="center">No</td>
  131. </tr>
  132. <tr>
  133. <td valign="top">excludes</td>
  134. <td valign="top">comma- or space-separated list of patterns of files that must be
  135. excluded. No files (except default excludes) are excluded when
  136. omitted.</td>
  137. <td valign="top" align="center">No</td>
  138. </tr>
  139. <tr>
  140. <td valign="top">excludesfile</td>
  141. <td valign="top">the name of a file. Each line of this file is
  142. taken to be an exclude pattern</td>
  143. <td valign="top" align="center">No</td>
  144. </tr>
  145. <tr>
  146. <td valign="top">explicit</td>
  147. <td valign="top">Whether variables must be declared explicitly
  148. before use</td>
  149. <td valign="top" align="center">No</td>
  150. </tr>
  151. <tr>
  152. <td valign="top">format</td>
  153. <td valign="top">Whether the generated java code is formatted nicely
  154. or left to match NetRexx line numbers for call stack debugging</td>
  155. <td valign="top" align="center">No</td>
  156. </tr>
  157. <tr>
  158. <td valign="top">includes</td>
  159. <td valign="top">comma- or space-separated list of patterns of files that must be
  160. included. All files are included when omitted.</td>
  161. <td valign="top" align="center">No</td>
  162. </tr>
  163. <tr>
  164. <td valign="top">includesfile</td>
  165. <td valign="top">the name of a file. Each line of this file is
  166. taken to be an include pattern</td>
  167. <td valign="top" align="center">No</td>
  168. </tr>
  169. <tr>
  170. <td valign="top">java</td>
  171. <td valign="top">Whether the generated java code is produced</td>
  172. <td valign="top" align="center">No</td>
  173. </tr>
  174. <tr>
  175. <td valign="top">keep</td>
  176. <td valign="top">Sets whether the generated java source file should be kept
  177. after compilation. The generated files will have an extension of
  178. .java.keep, <b>not</b> .java. Use removeKeepExtension to change that.</td>
  179. <td valign="top" align="center">No</td>
  180. </tr>
  181. <tr>
  182. <td valign="top">logo</td>
  183. <td valign="top">Whether the compiler text logo is displayed when
  184. compiling</td>
  185. <td valign="top" align="center">No</td>
  186. </tr>
  187. <tr>
  188. <td valign="top">removeKeepExtension</td>
  189. <td valign="top">Tells whether the trailing .keep in nocompile-mode should
  190. be removed so that the resulting java source really ends on .java. This
  191. facilitates the use of the javadoc tool lateron.</td>
  192. <td valign="top" align="center">No</td>
  193. </tr>
  194. <tr>
  195. <td valign="top">replace</td>
  196. <td valign="top">Whether the generated .java file should be replaced
  197. when compiling</td>
  198. <td valign="top" align="center">No</td>
  199. </tr>
  200. <tr>
  201. <td valign="top">savelog</td>
  202. <td valign="top">Whether the compiler messages will be written to
  203. NetRexxC.log as well as to the console</td>
  204. <td valign="top" align="center">No</td>
  205. </tr>
  206. <tr>
  207. <td valign="top">sourcedir</td>
  208. <td valign="top">Tells the NetRexx compiler to store the class files in the
  209. same directory as the source files. The alternative is the working
  210. directory</td>
  211. <td valign="top" align="center">No</td>
  212. </tr>
  213. <tr>
  214. <td valign="top">srcDir</td>
  215. <td valign="top">Set the source dir to find the source NetRexx
  216. files</td>
  217. <td valign="top" align="center">Yes</td>
  218. </tr>
  219. <tr>
  220. <td valign="top">strictargs</td>
  221. <td valign="top">Tells the NetRexx compiler that method calls always
  222. need parentheses, even if no arguments are needed, e.g.
  223. <code>aStringVar.getBytes</code> vs.
  224. <code>aStringVar.getBytes()</code></td>
  225. <td valign="top" align="center">No</td>
  226. </tr>
  227. <tr>
  228. <td valign="top">strictassign</td>
  229. <td valign="top">Tells the NetRexx compile that assignments must
  230. match exactly on type</td>
  231. <td valign="top" align="center">No</td>
  232. </tr>
  233. <tr>
  234. <td valign="top">strictcase</td>
  235. <td valign="top">Specifies whether the NetRexx compiler should be
  236. case sensitive or not</td>
  237. <td valign="top" align="center">No</td>
  238. </tr>
  239. <tr>
  240. <td valign="top">strictimport</td>
  241. <td valign="top">Whether classes need to be imported explicitly using an
  242. <code>import</code> statement. By default the NetRexx compiler will
  243. import certain packages automatically</td>
  244. <td valign="top" align="center">No</td>
  245. </tr>
  246. <tr>
  247. <td valign="top">strictprops</td>
  248. <td valign="top">Whether local properties need to be qualified
  249. explicitly using <code>this</code></td>
  250. <td valign="top" align="center">No</td>
  251. </tr>
  252. <tr>
  253. <td valign="top">strictsignal</td>
  254. <td valign="top">Whether the compiler should force catching of
  255. exceptions by explicitly named types</td>
  256. <td valign="top" align="center">No</td>
  257. </tr>
  258. <tr>
  259. <td valign="top">symbols</td>
  260. <td valign="top">Whether debug symbols should be generated into the
  261. class file</td>
  262. <td valign="top" align="center">No</td>
  263. </tr>
  264. <tr>
  265. <td valign="top">time</td>
  266. <td valign="top">Asks the NetRexx compiler to print compilation
  267. times to the console</td>
  268. <td valign="top" align="center">No</td>
  269. </tr>
  270. <tr>
  271. <td valign="top">trace</td>
  272. <td valign="top">Turns on or off tracing and directs the resultant
  273. trace output</td>
  274. <td valign="top" align="center">No</td>
  275. </tr>
  276. <tr>
  277. <td valign="top">utf8</td>
  278. <td valign="top">Tells the NetRexx compiler that the source is in UTF8</td>
  279. <td valign="top" align="center">No</td>
  280. </tr>
  281. <tr>
  282. <td valign="top">verbose</td>
  283. <td valign="top">Whether lots of warnings and error messages should
  284. be generated</td>
  285. <td valign="top" align="center">No</td>
  286. </tr>
  287. <tr>
  288. <td valign="top">suppressMethodArgumentNotUsed</td>
  289. <td valign="top">Tells whether we should filter out the
  290. &amp;Method argument not used&amp; messages in strictargs mode.</td>
  291. <td valign="top" align="center">No</td>
  292. </tr>
  293. <tr>
  294. <td valign="top">suppressPrivatePropertyNotUsed</td>
  295. <td valign="top">Tells whether we should filter out the
  296. &amp;Private Property defined, but not used&amp; messages in strictargs mode.</td>
  297. <td valign="top" align="center">No</td>
  298. </tr>
  299. <tr>
  300. <td valign="top">suppressVariableNotUsed</td>
  301. <td valign="top">Tells whether we should filter out the
  302. &amp;Variable set but not used&amp; messages in strictargs mode.
  303. Please be careful with this one, as you can hide errors behind it!</td>
  304. <td valign="top" align="center">No</td>
  305. </tr>
  306. <tr>
  307. <td valign="top">suppressExceptionNotSignalled</td>
  308. <td valign="top">Tells whether we should filter out the
  309. &amp;Exception is declared, but not signalled within the method&amp;
  310. messages in strictsignal mode.</td>
  311. <td valign="top" align="center">No</td>
  312. </tr>
  313. <tr>
  314. <td valign="top">suppressDeprecation</td>
  315. <td valign="top">Tells whether we should filter out any deprecation-messages
  316. of the compiler out.</td>
  317. <td valign="top" align="center">No</td>
  318. </tr>
  319. </table>
  320. <h3>Examples</h3>
  321. <pre>&lt;netrexxc srcDir=&quot;/source/project&quot;
  322. includes=&quot;vnr/util/*&quot;
  323. destDir=&quot;/source/project/build&quot;
  324. classpath=&quot;/source/project2/proj.jar&quot;
  325. comments=&quot;true&quot;
  326. crossref=&quot;false&quot; replace=&quot;true&quot;
  327. keep=&quot;true&quot;/&gt;</pre>
  328. </body>
  329. </html>