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

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302
  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="https://www.ibm.com/software/awdtools/netrexx/library.html"
  25. target="_top">NetRexx</a> source tree within the running (Apache Ant) JVM.</p>
  26. <p>The source and destination directory will be recursively scanned for NetRexx source files to
  27. compile. Only NetRexx files that have no corresponding class file or where the class file is older
  28. than the java file will be compiled.</p>
  29. <p>Files in the source tree are copied to the destination directory, allowing support files to be
  30. located properly in the classpath. The source files are copied because the NetRexx compiler cannot
  31. produce class files in a specific directory via parameters</p>
  32. <p>The directory structure of the source tree should follow the package hierarchy.</p>
  33. <p>It is possible to refine the set of files that are being compiled/copied. This can be done with
  34. the <var>includes</var>, <var>includesfile</var>, <var>excludes</var>, <var>excludesfile</var>
  35. and <var>defaultexcludes</var> attributes. With the <var>includes</var> or <var>includesfile</var>
  36. attribute you specify the files you want to have included by using patterns. The <var>exclude</var>
  37. or <var>excludesfile</var> attribute is used to specify the files you want to have excluded. This
  38. is also done with patterns. And finally with the <var>defaultexcludes</var> attribute, you can
  39. specify whether you want to use default exclusions or not. See the section
  40. on <a href="../dirtasks.html#directorybasedtasks">directory based tasks</a>, on how the
  41. inclusion/exclusion of files works, and how to write patterns.</p>
  42. <p>This task forms an implicit <a href="../Types/fileset.html">FileSet</a> and supports most
  43. attributes of <code>&lt;fileset&gt;</code> (<var>dir</var> becomes <var>srcdir</var>) as well as the
  44. nested <code>&lt;include&gt;</code>, <code>&lt;exclude&gt;</code>
  45. and <code>&lt;patternset&gt;</code> elements.</p>
  46. <p>All attributes except <var>classpath</var>, <var>srcdir</var> and <var>destDir</var> are also
  47. available as properties in the form <code>ant.netrexxc.<i>attributename</i></code>,
  48. eg.<br/><code class="code">&lt;property name="ant.netrexxc.verbose"
  49. value="noverbose"/&gt;</code><br/> or from the command line as<br/><kbd>ant
  50. -Dant.netrexxc.verbose=noverbose ...</kbd></p>
  51. <p><strong>Note</strong>: This task depends on external libraries not included in the Apache Ant
  52. distribution. See <a href="../install.html#librarydependencies">Library Dependencies</a> for more
  53. information.</p>
  54. <h3>Parameters</h3>
  55. <table class="attr">
  56. <tr>
  57. <th>Attribute</th>
  58. <th>Description</th>
  59. <th>Required</th>
  60. </tr>
  61. <tr>
  62. <td>binary</td>
  63. <td>Whether literals are treated as the Java binary type rather than the NetRexx types</td>
  64. <td>No</td>
  65. </tr>
  66. <tr>
  67. <td>classpath</td>
  68. <td>The classpath to use during compilation</td>
  69. <td>No</td>
  70. </tr>
  71. <tr>
  72. <td>comments</td>
  73. <td>Whether comments are passed through to the generated Java source file</td>
  74. <td>No</td>
  75. </tr>
  76. <tr>
  77. <td>compact</td>
  78. <td>Whether error messages come out in compact or verbose format.</td>
  79. <td>No; default is <q>true</q></td>
  80. </tr>
  81. <tr>
  82. <td>compile</td>
  83. <td>Whether the NetRexx compiler should compile the generated Java code</td>
  84. <td>No</td>
  85. </tr>
  86. <tr>
  87. <td>console</td>
  88. <td>Whether or not messages should be displayed on the 'console'. Note that this task will rely
  89. on the default value for filtering compile messages.</td>
  90. <td>No</td>
  91. </tr>
  92. <tr>
  93. <td>crossref</td>
  94. <td>Whether variable cross references are generated</td>
  95. <td>No</td>
  96. </tr>
  97. <tr>
  98. <td>decimal</td>
  99. <td>Whether decimal arithmetic should be used for the NetRexx code. Setting this to <q>off</q>
  100. will report decimal arithmetic as an error, for performance critical applications.</td>
  101. <td>No</td>
  102. </tr>
  103. <tr>
  104. <td>defaultexcludes</td>
  105. <td>Whether default excludes should be used or not (<q>yes|no</q>).</td>
  106. <td>No; defaults to <q>yes</q></td>
  107. </tr>
  108. <tr>
  109. <td>destDir</td>
  110. <td>the destination directory into which the NetRexx source files should be copied and then
  111. compiled</td>
  112. <td>Yes</td>
  113. </tr>
  114. <tr>
  115. <td>diag</td>
  116. <td>Whether diagnostic information about the compile is generated</td>
  117. <td>No</td>
  118. </tr>
  119. <tr>
  120. <td>excludes</td>
  121. <td>Comma- or space-separated list of patterns of files that must be excluded.</td>
  122. <td>No; defaults to default excludes or none if <var>defaultexcludes</var> is <q>no</q></td>
  123. </tr>
  124. <tr>
  125. <td>excludesfile</td>
  126. <td>Name of a file. Each line of this file is taken to be an exclude pattern</td>
  127. <td>No</td>
  128. </tr>
  129. <tr>
  130. <td>explicit</td>
  131. <td>Whether variables must be declared explicitly before use</td>
  132. <td>No</td>
  133. </tr>
  134. <tr>
  135. <td>format</td>
  136. <td>Whether the generated Java code is formatted nicely or left to match NetRexx line numbers
  137. for call stack debugging</td>
  138. <td>No</td>
  139. </tr>
  140. <tr>
  141. <td>includes</td>
  142. <td>Comma- or space-separated list of patterns of files that must be included.</td>
  143. <td>No; defaults to all (<q>**</q>)</td>
  144. </tr>
  145. <tr>
  146. <td>includesfile</td>
  147. <td>Name of a file. Each line of this file is taken to be an include pattern</td>
  148. <td>No</td>
  149. </tr>
  150. <tr>
  151. <td>java</td>
  152. <td>Whether the generated Java code is produced</td>
  153. <td>No</td>
  154. </tr>
  155. <tr>
  156. <td>keep</td>
  157. <td>Sets whether the generated java source file should be kept after compilation. The generated
  158. files will have an extension
  159. of <samp>.java.keep</samp>, <strong>not</strong> <samp>.java</samp>. Use <q>removeKeepExtension</q>
  160. to change that.</td>
  161. <td>No</td>
  162. </tr>
  163. <tr>
  164. <td>logo</td>
  165. <td>Whether the compiler text logo is displayed when compiling</td>
  166. <td>No</td>
  167. </tr>
  168. <tr>
  169. <td>removeKeepExtension</td>
  170. <td>Tells whether the trailing <samp>.keep</samp> in <var>compile</var>=<q>false</q> mode should
  171. be removed so that the resulting Java source file really ends on <samp>.java</samp>. This
  172. facilitates the use of the <kbd>javadoc</kbd> tool later on.</td>
  173. <td>No</td>
  174. </tr>
  175. <tr>
  176. <td>replace</td>
  177. <td>Whether the generated <samp>.java</samp> files should be replaced when compiling</td>
  178. <td>No</td>
  179. </tr>
  180. <tr>
  181. <td>savelog</td>
  182. <td>Whether the compiler messages will be written to <samp>NetRexxC.log</samp> as well as to the
  183. console</td>
  184. <td>No</td>
  185. </tr>
  186. <tr>
  187. <td>sourcedir</td>
  188. <td>Tells the NetRexx compiler to store the class files in the same directory as the source
  189. files. The alternative is the working directory</td>
  190. <td>No</td>
  191. </tr>
  192. <tr>
  193. <td>srcDir</td>
  194. <td>Sets the directory to find the source NetRexx files in</td>
  195. <td>Yes</td>
  196. </tr>
  197. <tr>
  198. <td>strictargs</td>
  199. <td>Tells the NetRexx compiler that method calls always need parentheses, even if no arguments
  200. are needed, e.g. <code>aStringVar.getBytes</code> vs. <code>aStringVar.getBytes()</code></td>
  201. <td>No</td>
  202. </tr>
  203. <tr>
  204. <td>strictassign</td>
  205. <td>Tells the NetRexx compile that assignments must match exactly on type</td>
  206. <td>No</td>
  207. </tr>
  208. <tr>
  209. <td>strictcase</td>
  210. <td>Specifies whether the NetRexx compiler should be case sensitive or not</td>
  211. <td>No</td>
  212. </tr>
  213. <tr>
  214. <td>strictimport</td>
  215. <td>Whether classes need to be imported explicitly using an <code>import</code> statement</td>
  216. <td>No; by default the NetRexx compiler will import certain packages automatically</td>
  217. </tr>
  218. <tr>
  219. <td>strictprops</td>
  220. <td>Whether local properties need to be qualified explicitly using <code>this</code></td>
  221. <td>No</td>
  222. </tr>
  223. <tr>
  224. <td>strictsignal</td>
  225. <td>Whether the compiler should force catching of exceptions by explicitly named types</td>
  226. <td>No</td>
  227. </tr>
  228. <tr>
  229. <td>symbols</td>
  230. <td>Whether debug symbols should be generated into the class file</td>
  231. <td>No</td>
  232. </tr>
  233. <tr>
  234. <td>time</td>
  235. <td>Asks the NetRexx compiler to print compilation times to the console</td>
  236. <td>No</td>
  237. </tr>
  238. <tr>
  239. <td>trace</td>
  240. <td>Turns on or off tracing and directs the resultant trace output</td>
  241. <td>No</td>
  242. </tr>
  243. <tr>
  244. <td>utf8</td>
  245. <td>Tells the NetRexx compiler that the source is in UTF8</td>
  246. <td>No</td>
  247. </tr>
  248. <tr>
  249. <td>verbose</td>
  250. <td>Tells whether lots of warnings and error messages should be generated</td>
  251. <td>No</td>
  252. </tr>
  253. <tr>
  254. <td>suppressMethodArgumentNotUsed</td>
  255. <td>Tells whether we should filter out the <q>Method argument not used</q> messages
  256. in <var>strictargs</var> mode.</td>
  257. <td>No</td>
  258. </tr>
  259. <tr>
  260. <td>suppressPrivatePropertyNotUsed</td>
  261. <td>Tells whether we should filter out the <q>Private Property defined, but not used</q>
  262. messages in <var>strictargs</var> mode.</td>
  263. <td>No</td>
  264. </tr>
  265. <tr>
  266. <td>suppressVariableNotUsed</td>
  267. <td>Tells whether we should filter out the <q>Variable set but not used</q> messages
  268. in <var>strictargs</var> mode. Please be careful with this one, as you can hide errors behind
  269. it!</td>
  270. <td>No</td>
  271. </tr>
  272. <tr>
  273. <td>suppressExceptionNotSignalled</td>
  274. <td>Tells whether we should filter out the <q>Exception is declared, but not signalled within
  275. the method</q> messages in <var>strictsignal</var> mode.</td>
  276. <td>No</td>
  277. </tr>
  278. <tr>
  279. <td>suppressDeprecation</td>
  280. <td>Tells whether we should filter out any deprecation messages of the compiler output</td>
  281. <td>No</td>
  282. </tr>
  283. </table>
  284. <h3>Examples</h3>
  285. <pre>
  286. &lt;netrexxc srcDir=&quot;/source/project&quot;
  287. includes=&quot;vnr/util/*&quot;
  288. destDir=&quot;/source/project/build&quot;
  289. classpath=&quot;/source/project2/proj.jar&quot;
  290. comments=&quot;true&quot;
  291. crossref=&quot;false&quot; replace=&quot;true&quot;
  292. keep=&quot;true&quot;/&gt;</pre>
  293. </body>
  294. </html>