Hi,

I have a Maven 2 project that depends on a number of other Maven 2 projects that are built locally and installed into the local repository. I need to instrument some of the dependency JARs with the EMMA coverage tool and have Maven run unit tests against instrumented JARs rather than the original dependencies. The emma-maven-plugin (http://mojo.codehaus.org/emma-maven-plugin) does not seem to be of much help as it does not seem to support this scenario.

Of course, it would be ideal if the emma-maven-plugin had support for this. In fact, the plugin has an 'instrumentationPaths' parameter which can be used to instrument classes from arbitrary directories; so I think dependencies can be copied, unpacked, instrumented this way and passed to maven-surefire-plugin via the 'classesDirectory' parameter; but in this case both the instrumented classes and original dependencies both appear on the test classpath, which sounds wrong.

Actually, I can bypass emma-maven-plugin and run EMMA instrumentor via exec-maven-plugin, but again, it looks like the only way to pass the instrumented classes to surefire is via the 'classesDirectory' or 'additionalClasspathElements' parameter, which is the same problem as above, which makes me think this is not solely emma-maven-plugin's problem (hence posting to this list).

What would be the right Maven way to achieve the goal? I am new to Maven so I am sorry if I am missing something obvious. I spent several days trying to find a solution, to no success.

In fact, I have some control over the dependency projects so I think I can build them so that the resulting JARs will contain instrumented classes (or I can instrument JARs separately and 'install:install-file' them as separate components), but this is undesirable.

I hope I am making sense.

Thank you,
Vasiliy



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org

Reply via email to