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

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 most attributes of <fileset> (dir becomes srcdir) as well as the nested <include>, <exclude> and <patternset> elements.

All attributes 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 ...

Note: This task depends on external libraries not included in the Apache Ant distribution. See Library Dependencies for more information.


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 file No
compact Whether error messages come out in compact or verbose format. No; default is true
compile Whether the NetRexx compiler should compile the generated Java code No
console Whether or not messages should be displayed on the 'console'. Note that this task will rely on the default value for filtering compile messages. No
crossref Whether variable cross references are generated No
decimal Whether decimal arithmetic should be used for the NetRexx code. Setting this to off will report decimal arithmetic as an error, for performance critical applications. No
defaultexcludes Whether default excludes should be used or not (yes|no). No; defaults to yes
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; defaults to default excludes or none if defaultexcludes is no
excludesfile 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. No; defaults to all (**)
includesfile 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. Use removeKeepExtension to change that. No
logo Whether the compiler text logo is displayed when compiling No
removeKeepExtension Tells whether the trailing .keep in compile=false mode should be removed so that the resulting Java source file really ends on .java. This facilitates the use of the javadoc tool later on. No
replace Whether the generated .java files 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 Sets the directory to find the source NetRexx files in 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 No; by default the NetRexx compiler will import certain packages automatically
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 Tells 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 whether we should filter out any deprecation messages of the compiler output No


<netrexxc srcDir="/source/project"
          crossref="false" replace="true"