parasoft:monitor

Description:

Ant task to monitor an ant build

Usage

  • This task can be used to monitor an ant build for use by Parasoft Test products later during the build.
  • monitors javac task calls to collection information about the build

Attributes (Needed for build monitor)

NameTypeDescription
concertoHostStringConcerto host name, required for build monitor
concertoPortintConcerto port number, if concerto is not on the default port (80). Note. Concerto 4.5 or greater is needed.
dcPortintData collector port number, Needed for build monitor if not on the default port (32323), required if concertoPort is not set or Concerto version is pre 4.5
multipleProjectsbooleanPuts this monitor into a multi-project mode. If used with to create projectDescriptions, one project will be created for each build.xml in a multi-project build

Example

<?xml version="1.0"?>
<project name="Parasoft Build" default="parasoft-build" xmlns:parasoft="antlib:com.parasoft.antlib">
    <import file="build.xml"/> <-- import the original build script -->

    <target name="parasoft-init">
        <parasoft:monitor id="monitor" /> <!-- install the monitor -->
    </target>

    <target name="parasoft-build" depends="parasoft-init, compile"> <!-- compile is from the original build script -->
        <parasoft:jtest config="builtin://Static Analysis">
            <projectDescription monitorref="monitor"/> <!-- the reference to the monitor for use in the jtest execution -->
        </parasoft:jtest>
    </target>
</project>

Multiple Project Example

<?xml version="1.0"?>
<project name="Parasoft Build" default="parasoft-build" xmlns:parasoft="antlib:com.parasoft.antlib">
    <import file="build.xml"/> <-- import the original build script -->

    <target name="parasoft-init">
        <parasoft:monitor id="monitor" multipleProjects="true"> <!-- install the monitor -->
            <projectMapping dir="modules/core" name="MyProject"/> <!-- Optional project name mapping, 
                                                                       default is name of directory containg the build.xml -->
        </parasoft:monitor>
    </target>

    <target name="parasoft-build" depends="parasoft-init, compile"> <!-- compile is from the original build script -->
        <parasoft:jtest config="builtin://Static Analysis" monitorref="monitor"/>
    </target>
</project>