A file named <moduleName>.<installerName>.installer.def.xml defines a sensor installer plugin for use by HackyInstaller. This extension point requires a file pattern of "*.installer.def.xml" in order to be recognized by the build system.
Example 24.7, “hackySensor_Ant.ant.installer.def.xml” illustrates an example Installer definition file for the Ant sensor.
Example 24.7. hackySensor_Ant.ant.installer.def.xml
<sensor>
<name value="Ant" />
<os windows="true" mac="true" linux-unix="true" />
<package value="org.hackystat.sensor.ant.installer" />
<class value="AntSensorInstaller" />
<description value="The Ant Build Sensor collects Build sensor data from invocations of Ant." />
<!-- Paths needed by this sensor -->
<path id="ANT_HOME" description="Ant home directory" example="C:\apache-ant (Windows), /Applications/apache-ant (Unix)" >
<!-- Checks for the files/directories specified that ensure the path specifed above is valid. -->
<check value="/lib/ant.jar" />
</path>
<!-- Sensor specfic properties for sensor.properties -->
<property name="ENABLE_ANT_SENSOR" value="false" readonly="false" validationclass="" description="Enable Ant Build sensor." />
</sensor>
The definition file specifies the name of the sensor being installer, the operating system(s) the sensor will operate under, the package and class containing the Java code to implement the installation process, and the properties and paths required to be defined by the user during the installation.