Hey Guys,
For some strange reason, I started looking at Maven. Anyway, I eventually
started working on a Hackystat Sensor for a Maven based tool (ie, Junit and
Locc).
Here is my initial version:
<http://csdl.ics.hawaii.edu/~kagawaa/hackyMaven-0.1.1.zip>. With Philip's
permission, I will commit this module to CVS.
But, it isn't perfect yet:
1) There is something wrong with the Maven plugin for LOCC (I it from
CVS). Apparently, it creates an xml file with sizeType="javaLine". This
doesn't work well the LOCC Hackystat Sensor. The sensor wants a
sizeType="javaline". So, to get the sensor to work, I needed to manually
rename the sizeType="javaline".
2) For some reason (probably because I don't understand it fully), Maven
wants to download sensorshell.jar as sensorshell-.jar and I couldn't get
rid of the "-"-". So, I had to point maven to my local Hackystat Webapp,
created a directory download/hackystat/jars/, put files like
sensorshell-.jar, sensor.locc-.jar in it.
3) I noticed that maven v. 1.0.2 depends on ant-1.5.3. I'm not sure if
that will be a problem for the sensors and/or CSDL tools.
This was a little harder that I thought it was going to be... I think I
don't really like Maven anymore... :) but, I suppose its pretty cool that
our existing Ant Sensors can be called via Maven without very much
work. Oh, and I have no idea on how hackyMaven would integrate with
Hackystat; not sure one how to write hackyInstaller code for this because
it isn't really a sensor and doesn't have sensor code.
I plan to hack on this more later on: (1) make a maven jblanket sensor, (2)
think of some way to integrate this into hackystat, (3) more exploration of
maven, (4) take a look at the new version of maven.
thanks, aaron
C:\java\cvs\stackyHack>maven test:test
__ __
| \/ |__ _Apache__ ___
| |\/| / _` \ V / -_) ' \ ~ intelligent projects ~
|_| |_\__,_|\_/\___|_||_| v. 1.0.2
build:start:
java:prepare-filesystem:
[mkdir] Created dir: C:\java\cvs\stackyHack\target\classes
java:compile:
[echo] Compiling to C:\java\cvs\stackyHack/target/classes
[echo] No java source files to compile.
locc:count:
[mkdir] Created dir: C:\java\cvs\stackyHack\target\locc
java:jar-resources:
test:prepare-filesystem:
[mkdir] Created dir: C:\java\cvs\stackyHack\target\test-classes
[mkdir] Created dir: C:\java\cvs\stackyHack\target\test-reports
test:test-resources:
test:compile:
[javac] Compiling 5 source files to
C:\java\cvs\stackyHack\target\test-classes
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
test:test:
[junit] Running edu.hawaii.stack.TestClearStack
[junit] Tests run: 1, Failures: 0, Errors: 0, Time elapsed: 0.016 sec
[junit] Running edu.hawaii.stack.TestStack
[junit] Tests run: 2, Failures: 0, Errors: 0, Time elapsed: 0.016 sec
Sensor enabled?: true
Processing file:
C:\java\cvs\stackyHack\target\test-reports\TEST-edu.hawaii.stack.TestClearStack.xml
Processing file:
C:\java\cvs\stackyHack\target\test-reports\TEST-edu.hawaii.stack.TestStack.xml
Hackystat data on 3 JUnit tests sent to http://hackystat.ics.hawaii.edu/ (0
secs.)
BUILD SUCCESSFUL
Total time: 5 seconds
Finished at: Mon Sep 19 22:44:01 HST 2005
C:\java\cvs\stackyHack>maven locc
__ __
| \/ |__ _Apache__ ___
| |\/| / _` \ V / -_) ' \ ~ intelligent projects ~
|_| |_\__,_|\_/\___|_||_| v. 1.0.2
build:start:
locc:
maven-locc-plugin:report:
locc:xdoc-report:
[mkdir] Created dir: C:\java\cvs\stackyHack\target\generated-xdocs
Sensor enabled?: YES
Processing file: C:\java\cvs\stackyHack\target\locc\locc-all.xml
BUILD FAILED
File...... C:\Documents and
Settings\akihisa\.maven\cache\maven-locc-hackystat-sensor-plugin-0.1\plugin.jelly
Element... ant:hacky-locc
Line...... 45
Column.... 38
java.lang.Exception: LOCC size type not found or unknown in file:
C:\java\cvs\stackyHack\target\locc\locc-all.xml
Total time: 3 seconds
Finished at: Mon Sep 19 22:44:16 HST 2005
C:\java\cvs\stackyHack>
... need to rename javaLine to javaline ...
C:\java\cvs\stackyHack>maven locc
__ __
| \/ |__ _Apache__ ___
| |\/| / _` \ V / -_) ' \ ~ intelligent projects ~
|_| |_\__,_|\_/\___|_||_| v. 1.0.2
Sensor enabled?: YES
Processing file: C:\java\cvs\stackyHack\target\locc\locc-all.xml
Hackystat data on 10 LOCC files sent to http://hackystat.ics.hawaii.edu/ (0
secs.)
BUILD SUCCESSFUL
Total time: 4 seconds
Finished at: Mon Sep 19 22:44:45 HST 2005
C:\java\cvs\stackyHack>