I can't reproduce your problem. I copied and pasted your configuration snippet into a random pom.xml
and running any phase posterior to process-classes
triggers emma:emma
and the coverage report is generated as expected:
$ mvn clean process-classes
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] Building Test Project
[INFO] task-segment: [clean, process-classes]
[INFO] ------------------------------------------------------------------------
[INFO] [clean:clean {execution: default-clean}]
[INFO] Deleting directory /home/pascal/tmp/test-project/target
[INFO] [resources:resources {execution: default-resources}]
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 1 resource
[INFO] [compiler:compile {execution: default-compile}]
[INFO] Compiling 1 source file to /home/pascal/tmp/test-project/target/classes
[INFO] Preparing emma:emma
...
EMMA: runtime coverage data merged into [/home/pascal/tmp/test-project/coverage.ec] {in 93 ms}
[INFO] [emma:emma {execution: default}]
processing input files ...
2 file(s) read and merged in 3 ms
writing [xml] report to [/home/pascal/tmp/test-project/target/site/emma/coverage.xml] ...
writing [html] report to [/home/pascal/tmp/test-project/target/site/emma/index.html] ...
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESSFUL
[INFO] ------------------------------------------------------------------------
Do you have unit tests in your project? Is the coverage.em
file non empty? What happens if you run emma:emma
on the command line? Does running mvn with the -X
option give you any hint? Can you post some traces that would be helpful?
As a side note, I wouldn't run emma:emma
as part of the regular build personally. I would either run the emma:emma
goal from the command line or configure the plugin and the reporting section as suggested in the Usage page. But that's another story and doesn't answer the question.