--On Monday, January 30, 2006 10:11 PM -1000 Aaron Kagawa <[EMAIL PROTECTED]> 
wrote:

Hey Guys,

More updates about the Hackystat-Maven work.

Great progress, Aaron!

1) Code Duplication: The LOCC and JUnit maven sensors are almost exactly the 
same as
the Ant sensor, except for the execute method in LoccSensor and JUnitSensor. 
Thus, all
the other lines of code are duplicated in the Ant sensor. I've accepted that 
for now,
because I'm not sure how to get around that. If the sensors were decoupled from 
the Ant
Task class and made a little more general, then I could reuse the Jdom parsing 
methods
within the Maven sensors.  Note that LOCC almost does a good job of separating 
the Ant
specific Task implementation and the sensor.

OK, let's accept the code duplication temporarily until we figure out the right way to refactor things. For example, would it make sense to have a hackySensor_* module implement both the Ant and Maven-based interface to the sensor? Would it help if we had a new build target (install.maven) that certain modules can implement and that would default to an empty target if not supplied?

2) Dependency on sensorshell.jar: Currently, I have a dependency on the 
sensorshell.jar
file that I have in the Ant lib.  Of course, the location of the 
sensorshell.jar file
won't always be in the Ant lib directory, so I have to figure out how to get a
sensorshell.jar file in a specified location. Currently, I'm think that the Ant 
build
process can place the sensorshell.jar in a known directory.

One idea: how about an installer for sensorshell itself, and a hackySensor_SensorShell module? This module wouldn't actually build the sensorshell, but it would contain the installer code to place it somewhere. (SensorShell is a stand-alone application that can serve as a sensor, of course, so this isn't an unreasonable idea.)

3) Building these maven modules with Ant: It is possible to build these maven 
sensors
with our normal Ant build process. Because of the duplication of code, I didn't 
think
it was necessary to use the same testfiles. Should I duplicate the testfiles 
and Junit
tests?

If it won't test anything different, then don't bother.

4) These Maven sensors are like any other maven plugins; they are installed
automatically if the Maven plugin is not present.  Thus, there probably is no 
need for
the HackyInstaller. In fact, I think it would complicate things.

OK, seems reasonable.

Cheers,
Philip

Reply via email to