This section walks you through an example installation of a single sensor: the Hackystat Ant build sensor. We will go through this process in detail so that you understand the steps.
To get started installing the build sensor, the first thing we need to do is select it. Figure 2.4, “ The HackyInstaller main page with the "Build" sensor selected ” illustrates what the HackyInstaller main screen looks like after we have selected the Build sensor.
We now press the "Configure Selected Sensor" button, which brings up the Build sensor configuration window, as illustrated in Figure 2.5, “ The HackyInstaller "Build" sensor configuration window ”.
Each sensor's configuration window can have different contents, but they generally contain a short description of what the sensor does, an comparison of the local version of the sensor executable with the version of the executable at the Hackystat server, one or more properties specific to that sensor, and one or more directories or files that must be specified in order to install this sensor. In the case of our Build sensor, we can see that an update is recommended (of course), that the property to enable this sensor is checked by default, and that we need to specify the home directory of our Apache Ant installation. Note that the "Install" and "Update" buttons are currently inactive, which indicates that we have not yet supplied enough information to support installation or updating. In this case, we need to supply the Ant home directory.
To install the Ant build sensor, we need to tell HackyInstaller where the Ant system is installed. This is because the Ant Build sensor needs to place a file into the Ant installation directory. Figure 2.6, “ The HackyInstaller "Build" sensor configuration window with Ant directory supplied but not applied ” shows the results after we press the "Browse" button and supply the directory associated with the Ant installation on this computer.
As you can see, the "Apply" button is now active, but the "Install" and "Update" buttons are not. This is because we need to "apply" the new setting for the Ant home directory. In general, you must always press "Apply" to make any changes to a sensor configuration window active.
Figure 2.7, “ The HackyInstaller "Build" sensor configuration window with Ant directory setting saved. ” shows the results after we press the "Apply" button to save the setting for Ant home.
HackyInstaller indicates that the settings have been saved, and now the "Install" button is finally available, so let's press it.
Figure 2.8, “ The HackyInstaller "Build" sensor configuration window after installation ” shows the results after we press the "Install" button.
HackyInstaller indicates that the Build sensor has been installed, and that thus the local version number associated with the sensor matches the version number associated with the sensor on the server. The "Update" and "Apply" buttons are now inactive because there is no need to update the sensor, nor have any settings changed since the last save. Finally, the "Uninstall" button is now active, which enables you to delete this sensor installation. Instead, however we will press the "Return to main" button to return to the Hackystat main screen.
Figure 2.9, “ The HackyInstaller main window after build sensor installation ” shows the results after we return to the HackyInstaller main window.
Upon successful installation of the Build sensor, we can see that the row in the "Sensor Settings" pane containing the Build sensor now has information associated with it. We also see a line in the "Status Log" pane indicating completion of this installation.
HackyInstaller simplifies the process of downloading sensor executables from the Hackystat server to an appropriate location on your local computer, and setting various parameters regarding their execution. For some sensors, use of HackyInstaller suffices to make the sensor operational. In other cases, one must perform some amount of additional integration with your development environment.
To find out what, if any, additional integration activities must be performed, consult Chapter 26, Sensors. This tool-specific sensor installation documentation also provides instructions on how to verify correct functioning of the sensor.
In the case of our example installation of the Build sensor, consulting the appropriate section of Chapter 26, Sensors reveals that we must insert an Ant task into the build.xml file associated with a project to invoke the build sensor for that project. It also documents how to verify that our Build sensor is functioning correctly.