Hi,

When you update SVN, you might find that you can no longer build Hackystat. This is because the latest change made to the build script requires you to have the ant sensor in your ant lib.

By default, the ant sensor is not enabled. If you want to enable it, please add "ENABLE_ANT_SENSOR=true" in your sensor.properties file.

The sensor works in non-verbose mode by default. To turn on verbose, please add "hackystat.sensor.verbose=true" in your hackystat.properties file. This is recommended because the ant build sensor outputs useful summary information at the end of the build in verbose mode.

Since we cannot use V7 hackyInstaller to install/configure sensors yet, I have included the sensor jar files for you to copy to your ant lib directory.

http://csdl.ics.hawaii.edu/~qzhang/temp/sensor.ant.jar
http://csdl.ics.hawaii.edu/~qzhang/temp/sensorshell.jar

Please remove all your old sensors and sensorshell.jar file.

To all current CSDL member: can I ask you guys to enable the sensor?

For V7 hackystat user and admin who maintain their own hackystat server, Mike and I will write a script to replace "antsensor.build.xml" with an empty body in cruisecontrol, so that they don't have to download the ant sensor.

Thanks.

Cedric


Philip Johnson wrote:
One possible improvement is to move this stuff into its own file: antsensor.build.xml, and import that file in build.xml.

This leads to two cases:

(1) someone checks out Hackystat from SVN (who is presumably a developer-level person). This person would have to install the ant sensor (using the normal hackyInstaller method) in order to do a build. (They could specify the sensor as "not enabled" if they don't want to collect data). No need to include <classpath> etc.

(2) someone downloads a pre-built distribution (who is presumably a user/administrator-level person). When building such a distribution, we would substitute a basically 'empty' antsensor.build.xml file for the regular one. This would result in no references to the ant sensor, and thus no need to install the sensor in order to build and run the distribution.

How does this sound?

Cheers,
Philip

--On Wednesday, November 09, 2005 1:18 AM -1000 "(Cedric) Qin ZHANG" <[EMAIL PROTECTED]> wrote:

The change as suggested by Philip is to put the following element top level (i.e.
outside any target)

  <taskdef name="hacky-build"
classname="org.hackystat.sensor.ant.BuildSensorInstallationAntTask" >
    <classpath>
      <pathelement location="${basedir}/sensor.ant.jar"/>
    </classpath>
  </taskdef>
  <hacky-build .../>


1. It means we need to put both "sensor.ant.jar" and "sensorshell.jar" in
hackyCore_Build.

2. After removing the old "installAntSensor" and made the changes above, I encountered weird ant behavior: the ant sensor is loaded twice, and two instances of the sensor
works at the same time.

If I get rid of "classpath" in "taskdef" (which implies putting "sensor.ant.jar" in
ant lib), then everything is normal.

In the ant sensor code, I have code that specifically checks whether the user is trying to install the ant sensor more than once (recall the sensor is implemented as an Ant listener), and prevents subsequent installation of the sensor. The above weird behavior seems to suggest that ANT has somehow created two contexts. I am not sure whether it's
a ANT bug, but I'll try to do some googling tomorrow.

3.  The changes to the build script are NOT committed.

Cheers,

Cedric


dency target is not right:

The build sensor is loaded when you use freshStart, quickStart,
all.junit, all.compile,
etc. But when I am developing software, most of the time, I only care
my own module and
use ant command like "ant hackyApp_BuildAnalysis.junit" or "ant
hackyApp_BuildAnalysis.checkstyle". In those cases, the build sensor
will not be
loaded, because those taskes are not dependent on "checkProperties".

I went over our entire build script, it seems there is no target
which all other
targets depend on.



Hmm.  The only solution I can see right now is to do the taskdef and
invocation of the build sensor at top-level, outside of any target.
That should solve your problem, but it introduces another: the
requirement that the build sensor be made available in all
distributions of Hackystat. I suppose that isn't the end of the
world.  Try this approach out and see if it seems reasonable.
(Probably want to use the "classpath" attribute in the taskdef so that
the user doesn't need to add the sensor to ant/lib.)



Reply via email to