We use emma as well and would be very interested in an m2 plugin for it.
I had some success by running emma through m2 as an ant-plugin, here is the
config :
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<executions>
<execution>
<id>emma-coverage-report</id>
<phase>test-compile</phase>
<configuration>
<tasks>
<taskdef resource="emma_ant.properties" classpathref="
maven.plugin.classpath" />
<emma enabled="true">
<instr instrpathref="maven.test.classpath"
mode="overwrite"
metadatafile="target/emma/metadata.emma">
<filter includes="com.*"/>
</instr>
</emma>
<junit fork="yes" forkmode="perBatch"
haltonfailure="no">
<batchtest
todir="target/emma/junit-reports-ignore">
<fileset
dir="target/emma/instrumented-classes">
<include name="**/*Test*"/>
</fileset>
</batchtest>
<classpath>
<pathelement path="maven.test.classpath"/>
<pathelement path="maven.plugin.classpath
"/>
</classpath>
</junit>
</tasks>
</configuration>
<goals>
<goal>run</goal>
</goals>
</execution>
</executions>
<dependencies>
<dependency>
<groupId>emma</groupId>
<artifactId>emma</artifactId>
<version>2.0.5312</version>
</dependency>
<dependency>
<groupId>emma</groupId>
<artifactId>emma_ant</artifactId>
<version>2.0.5312</version>
</dependency>
</dependencies>
</plugin>
IIRC the instrumentation like this works fine, but I had problems getting
surefire to actually run the instrumented classes.
HTH
Jorg