CyVis Software Metrics Collection, Analysis and Visualisation Tool Logo

CyVis Ant Task

After downloading the file, extract it to a desired location (it would be better to extract it into your lib directory).

The steps involved to integrate CyVis into your build script are as follows:

Step 1: Create a property to the extracted directory

  <property name="cyvis-home" value="${basedir}/lib/cyvis-0.8"/>

Note: Change the value field according to your directory structure, and the version of cyvis.

Step 2: Create a path to hold the jar files required to run CyVis.

   <path id="cyvis.path">
       <fileset dir="${cyvis-home}">
           <include name="**/*.jar"/>

Step 3: Define the CyVis task.

    <taskdef name="cyvis" classname="cyvis.ant.CyvisTask" 

Step 4: Write the CyVis task

Now you are ready to use the CyVis task in Ant. The table below shows all the parameters & nested elements for CyVis Task.

Parameters for <cyvis>:

Attribute Description Required
CyVis prints all its operations, if set to true
No, Default is false

Represents CyVis’s Home Directory (i.e. the directory that was created when it was extracted)


Nested elements for <cyvis>:

Element Description Required
Denotes the set of files for which you want to generate reports. Multiple file sets may also be given. It supports all the attributes of <fileset> as in Ant.
Helps specify the report details. Multiple <report> could be used to generate as many reports.

Parameters of <report> :

Attribute Description Required
Specifies the type of the report to be generated. It can either be ‘text’ or ‘html’.
This specifies the name of the report file.

Example: A Target with CyVis Task:

   <target name="cyvis">
     <cyvis verbose="false" home="${cyvis-home}">
       <fileset dir="${bin}">
           <exclude name="*.class"/>
        <report type="html"  outFile="${docs}/test.html"/>
        <report type="text"  outFile="${docs}/test.txt"/>