Build


Overview

Build consists of two different Niagara Tools, Build Full and Build Incremental.

The build tool compiles Java source code into Niagara AX modules (jar files).

Usage

To build a Niagara AX module, run build to compile the Java source code and create a jar file. The first argument is the path of the module or group of modules to build. The second argument is the build command to execute. If no second argument is provided, then the build tool will assume the default of jar as the build command. The default jar command will perform an incremental compilation of the Java source code for the module. If the compilation yields no compiler errors, the build tool will then place the resulting compiled Java software into a jar file in the modules directory of the Niagara AX installation.

The following command compiles and jars the module "foo" located in the "c:\foo" directory on the hard drive:

build c:\foo

The following example deletes the compiled version of the Java source code for the module whose root source code begins in the directory "goop" relative to the current working directory:

build goop clean

The following example deletes the compiled version of the Java source code for the module whose root source code begins in the directory "goop" relative to the current working directory. After deleting the compiled version of the Java source code, the build tool recompiles all of the Java source for the module "goop". If the compilation yields no compiler errors, the build tool will then place the resulting compiled Java software into a jar file.

build goop cleanjar

The following example does everything from the previous cleanjar example. In addition, the build tool will load the resulting Niagara AX module (jar file) and report any Niagara AX type errors that might be present. Niagara AX type errors indicate violations in Niagara AX types.

Niagara AX types are the java classes that extend from most of the classes in the Niagara AX framework. These classes begin with a capital B. Niagara AX type checking can only be performed after the jar file is created. Even though the Java source code for Niagara AX types maybe syntactically correct from a Java language perspective, it still could violate some additional requirements of the Niagara AX framework. For example, all Niagara AX types must be declared in the module's module-include file.

build goop full

The following command displays the full listing of commands and options that the build tool supports:

build -help

usage: build [dir] [cmd] [options]
  dir  Relative or absolute (from home) module directory
  cmd  Name of command to execute; default is "jar"
commands:
  [dir] jar          Recompile Java code and rebuild jar file
  [dir] clean        Clean all intermediate files
  [dir] cleannative  Clean all intermediate files
  [dir] javah        Generate header files for javah elements
  [dir] bajadoc      Compile bajadoc reference documentation
    -all               Compile all packages regardless of doc attribute
    -html              Compile into html files in {home}/api directory
  [dir] cleanjar     Build clean, jar
  [dir] htmldoc      Format html documentation
  [dir] index        Compile search index
  [dir] doc          Build bajadoc, htmldoc, index
  [dir] full         Build clean, jar, doc
  [dir] win32        Build win32 natives
  [dir] linux_ppc64  Build linux natives
  [dir] linux_x86    Build linux natives
  [dir] qnx_x86      Build QNX x86 natives
  [dir] qnx_ppc      Build QNX ppc natives
options:
  -v         Verbose output
  -q         Quiet output
  -d:  alternate devkit.properties file
  -patch: Add the patch number to the vendor version
  -p         Given a pathname within a module directory tree,
             build the module.
             For example, the following are equivalent:
             build -p d:\niagara\r3dev\fw\alarm\src\javax\Baja\alarm
             build -p d:\niagara\r3dev\fw\alarm
             Useful for invoking builds from within an editor

  -env       Dump the build environmental variables

Note: See the ord: module://docDeveloper/doc/build.html for more information. (See Loading Help Contents to view Baja help).