ant_ccase

Using DevOps Code ClearCase® to audit Jakarta Ant build processes

Applicability

Product

Command type

ClearCase

Data structure

Platform

UNIX

Linux

Windows

Synopsis

ant -listener CCAudits

Description

Jakarta Ant is an open-source build tool for Java. DevOps Code ClearCase includes an optional plug-in for Ant, called CCAudits, that enables DevOps Code ClearCase auditing of Ant builds. The auditing process is started by adding the name of a special Java class, CCAudits, as an argument to the Ant command that starts Ant and a listener process. Note that there is no cleartool command associated with auditing Ant build processes.

Prerequisites

To audit Ant builds, DevOps Code ClearCase must be installed on the client host that is running Jakarta Ant and DevOps Code ClearCase services must be started on that client host.

Note: The Java Development Kit must match the bitness of your ClearCase offering for CCAudits to audit Ant build processes successfully.

To enable audits, you must include the file CCAudits.jar in your CLASSPATH either by updating the CLASSPATH environment variable or by copying CCAudits.jar to the lib directory under the ant directory. The default installation directory for CCAudits.jar is /opt/devops/code/clearcase/java/lib on the UNIX system and Linux, and \Program Files\DevOps\Code\ClearCase\bin on Windows.

To enable audits on the UNIX system and Linux, set the appropriate environment variable for your platform, as listed in the following table, to include the DevOps Code ClearCase shlib directory.

Platform Environment variable
Linux LD_LIBRARY_PATH
AIX® LIBPATH
HP-UX SHLIB_PATH or LD_LIBRARY_PATH

The SHLIB_PATH must also include the usr/lib directory.

By default, the shlib directory is /opt/devops/code/clearcase/shlib.

The build.xml file

Ant uses the file build.xml to specify the parameters of the build. CCAudits does not require any changes to this file, but it does search the file for optional properties. These optional properties are listed in the following table:

Property Action
CCAudits.debug Prints debugging information to the display device.
CCAudits.ccaudits_dir Specifies a directory under the project directory, which contains the project, subproject, and target derived objects.
CCAudits.auditable_task_list Specifies the list of Ant tasks to be audited. For example:

property CCAudits.auditable_task_list ="javac:jar:javah:war:tar" /

You can either add these optional properties to the file build.xml by using the Ant Property task or you can add them to the file CCAudits.properties and include this properties file by using the Ant Property task. For more information, see the Jakarta Ant documentation.

Limitations

CCAudits has the following limitations:

  • The DevOps Code ClearCase configuration records produced when auditing Ant builds are not used to perform build avoidance. For example, the javac task must determine whether a .class output file is up to date with respect to a corresponding .java source file. In this release, file time stamps are used to make that determination.
  • Parallel tasks in Ant run as sequential tasks.
  • Build times may be longer because of the performance overhead associated with auditing and creating configuration records.
  • The Java Development Kit must match the bitness of your ClearCase offering for CCAudits to audit Ant build processes successfully.