Hey Guys,
More updates about the Hackystat-Maven work.
I also got a Junit Maven sensor working. Now that the initial
problems have been figured out, for example how to write a Maven
plugin with Mojo and how to build a pom.xml file, I'm getting into
harder problems. Maybe some of you can help me figure it out. Here
are my current problems:
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.
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.
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?
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.
thanks, aaron
At 03:39 PM 1/27/2006, you wrote:
Great job! Yeah!
If we can smoothly integrate Maven and Hackystat, that will be a
significant new user community for our system!
Cheers,
Philip
--On Friday, January 27, 2006 12:57 AM -1000 Aaron Kagawa
<[EMAIL PROTECTED]> wrote:
Hey Guys,
I'm not totally done yet.. but I just wanted to show this off a
little. Check it out!
C:\java\svn\hackySensor_LoccMaven>mvn
org.hackystat.sensor.locc.maven:hackySensor_LoccMaven:1.0-SNAPSHOT:sensor
[INFO] Scanning for projects...
[INFO]
----------------------------------------------------------------------------
[INFO] Building Maven Quick Start Archetype
[INFO] task-segment:
[org.hackystat.sensor.locc.maven:hackySensor_LoccMaven:1.0-SNAPSHOT:sensor]
[INFO]
----------------------------------------------------------------------------
[INFO] [hackySensor_LoccMaven:sensor]
Sensor enabled?: YES
Processing file: C:\java\svn\hackySensor_LoccMaven\size.xml
Hackystat data on 5 LOCC files sent to
http://hackystat.ics.hawaii.edu/ (0 secs.)
[INFO]
----------------------------------------------------------------------------
[INFO] BUILD SUCCESSFUL
[INFO]
----------------------------------------------------------------------------
[INFO] Total time: 2 seconds
[INFO] Finished at: Fri Jan 27 00:34:34 HST 2006
[INFO] Final Memory: 1M/3M
[INFO]
----------------------------------------------------------------------------
C:\java\svn\hackySensor_LoccMaven>
There's a lot of stuff I have to work out. The really cool thing is that
hackySensor_LoccMaven can be built with our current Ant build
process. Although, I
think it has to be deployed with Maven.
I'll change the hackySensor_LoccMaven code after Philip changes
hackySensor_Locc with
the new FileMetric format. Basically, all I did was change a
couple of methods and
copied the other java files over to the new module. There is a lot of code
duplication, but I can live with that for now.
thanks, aaron