## NetRexxC

### Description

Compiles a NetRexx source tree within the running (Ant) VM.

The source and destination directory will be recursively scanned for NetRexx source files to compile. Only NetRexx files that have no corresponding class file or where the class file is older than the java file will be compiled.

Files in the source tree are copied to the destination directory, allowing support files to be located properly in the classpath. The source files are copied because the NetRexx compiler cannot produce class files in a specific directory via parameters

The directory structure of the source tree should follow the package hierarchy.

It is possible to refine the set of files that are being compiled/copied. This can be done with the includes, includesfile, excludes, excludesfile and defaultexcludes attributes. With the includes or includesfile attribute you specify the files you want to have included by using patterns. The exclude or excludesfile attribute is used to specify the files you want to have excluded. This is also done with patterns. And finally with the defaultexcludes attribute, you can specify whether you want to use default exclusions or not. See the section on directory based tasks, on how the inclusion/exclusion of files works, and how to write patterns.

This task forms an implicit FileSet and supports all attributes of `<fileset>` (`dir` becomes `srcdir`) as well as the nested `<include>`, `<exclude>` and `<patternset>` elements.

All properties except classpath, srcdir and destDir are also available as properties in the form `ant.netrexxc.attributename`, eg.
`<property name="ant.netrexxc.verbose" value="noverbose"/>`
or from the command line as
`ant -Dant.netrexxc.verbose=noverbose ...`

### Parameters

Attribute | Description | Required
binary | Whether literals are treated as the java binary type rather than the NetRexx types | No
classpath | The classpath to use during compilation | No
comments | Whether comments are passed through to the generated java source | No
compact | Whether error messages come out in compact or verbose format. Default is the compact format. | No
compile | Whether the NetRexx compiler should compile the generated java code | No
console | Whether or not messages should be displayed on the 'console' | No
crossref | Whether variable cross references are generated | No
decimal | Whether decimal arithmetic should be used for the NetRexx code | No
defaultexcludes | indicates whether default excludes should be used or not ("yes"/"no"). Default excludes are used when omitted. | No
destDir | the destination directory into which the NetRexx source files should be copied and then compiled | Yes
diag | Whether diagnostic information about the compile is generated | No
excludes | comma- or space-separated list of patterns of files that must be excluded. No files (except default excludes) are excluded when omitted. | No
excludesfile | the name of a file. Each line of this file is taken to be an exclude pattern | No
explicit | Whether variables must be declared explicitly before use | No
format | Whether the generated java code is formatted nicely or left to match NetRexx line numbers for call stack debugging | No
includes | comma- or space-separated list of patterns of files that must be included. All files are included when omitted. | No
includesfile | the name of a file. Each line of this file is taken to be an include pattern | No
java | Whether the generated java code is produced | No
keep | Sets whether the generated java source file should be kept after compilation. The generated files will have an extension of .java.keep, not .java | No
logo | Whether the compiler text logo is displayed when compiling | No
replace | Whether the generated .java file should be replaced when compiling | No
savelog | Whether the compiler messages will be written to NetRexxC.log as well as to the console | No
sourcedir | Tells the NetRexx compiler to store the class files in the same directory as the source files. The alternative is the working directory | No
srcDir | Set the source dir to find the source NetRexx files | Yes
strictargs | Tells the NetRexx compiler that method calls always need parentheses, even if no arguments are needed, e.g. `aStringVar.getBytes` vs. `aStringVar.getBytes()` | No
strictassign | Tells the NetRexx compile that assignments must match exactly on type | No
strictcase | Specifies whether the NetRexx compiler should be case sensitive or not | No
strictimport | Whether classes need to be imported explicitly using an `import` statement. By default the NetRexx compiler will import certain packages automatically | No
strictprops | Whether local properties need to be qualified explicitly using `this` | No
strictsignal | Whether the compiler should force catching of exceptions by explicitly named types | No
symbols | Whether debug symbols should be generated into the class file | No
time | Asks the NetRexx compiler to print compilation times to the console | No
trace | Turns on or off tracing and directs the resultant trace output | No
utf8 | Tells the NetRexx compiler that the source is in UTF8 | No
verbose | Whether lots of warnings and error messages should be generated | No
suppressMethodArgumentNotUsed | Tells whether we should filter out the &Method argument not used& messages in strictargs mode. | no
suppressPrivatePropertyNotUsed | Tells whether we should filter out the &Private Property defined, but not used& messages in strictargs mode. | no
suppressVariableNotUsed | Tells whether we should filter out the &Variable set but not used& messages in strictargs mode. Please be careful with this one, as you can hide errors behind it! | no
suppressExceptionNotSignalled | Tells whether we should filter out the &Exception is declared, but not signalled within the method& messages in strictsignal mode. | no
suppressDeprecation | Tells wether we should filter out any deprecation-messages of the compiler out. | no

### Examples

> `<netrexxc srcDir="/source/project" includes="vnr/util/*" destDir="/source/project/build" classpath="/source/project2/proj.jar" comments="true" crossref="false" replace="true" keep="true"/>`

Copyright © 2000-2002,2004 The Apache Software Foundation. All rights Reserved.