|
Vincent Massol made changes - 22/Apr/05 12:59 PM
As long as the ${maven.clover.database.dir}/clover_coverage.db exists, the report should be generated with the alwaysReport="true" flag even if the files${maven.clover.database.dir}/clover_coverage.dbxxxx_xxxxxxxxx are not there. It works for me with clover 1.3.4. If the ${maven.clover.database.dir}/clover_coverage.db does not exist, the report should not be generated. This is already the behavior of the plugin. Let me say it differently: the clover_coverage.db file usually exists only when the tests are executed. So if there are no tests no clover db file will be generated and thus no report will get generated either... The only situation where it would work is in the case of a multi-project where you would share the clover db. The first project would create it. Of course if this first project does not have any test, it won't be created and thus it won't work. The {maven.clover.database.dir}/clover_coverage.db is created when you compile your code with clover. ok, I understand why it was not working. We only call test:test (which in turn calls java:compile) if there are tests. Thus the db file is never created... I'm working on it... I've implemented this feature. Oops I've just realized that you had provided a patch (I had missed it). I've had a quick look and it seems it was missing several things:
Thanks anyway. If I had seen, it earlier I would have asked you for some tests! -Vincent
Vincent Massol made changes - 22/Apr/05 02:20 PM
As a consequences, when we have no test case the clover report is generated and the link to it added to the site (linking to a page with no usable data at all, changing the |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Hi Eric,
Thanks for the idea. I've started implementing it but the problem is that the report will fail if there is no coverage database, even when alwaysReport is set to "true"! How do I create an empty coverage database?
Thanks