[ http://jira.codehaus.org/browse/MSUREFIREREP-6?page=comments#action_73016 ] Martin Brunninger commented on MSUREFIREREP-6: ----------------------------------------------
I encountered this too. I my eyes, running the test during site generation is no good idea as it modifies content outside the "/target/site" folder. If I run "mvn clean package site" there should be no problem with having no test results. If I run "mvn site" with no test results available, well for me it's ok to have no (or an empty) report in this case. If others like to have the tests done during site generation, I'd see this as an optional configuration as it modifies content outside the "/target/site" folder and is a time issue (especially for larger projects). According to Kenny's problem, I assume he is using the surefire, surefire-report and clover plugin (like me). In this case I can explain why the tests are run four times. If you enable the debug output, you will see that clover does something like running a second lifecycle with goal install. So the first time the test are executed, it is done with instrumented code. The second time (in the original) lifecycle the test are run with non-instrumented code. To be honest, from some point of view this makes sense as instrumentation does not influence your tests (especially when making performance tests), but I would like to decide this myself. The second two executions are simple to explain. This is because surefire-report reruns the test (including all prior phases) and this includes instrumentation too. Hope this helps. > surefire-report reruns tests > ---------------------------- > > Key: MSUREFIREREP-6 > URL: http://jira.codehaus.org/browse/MSUREFIREREP-6 > Project: Maven 2.x Surefire report Plugin > Issue Type: Bug > Environment: maven 2.0 > Reporter: Dirk Sturzebecher > > surefire-report reruns the tests. In my case this is not just annoying, but > leads to a failure, as the VM (probably) is reused and leftovers from the > first tests are (definitly) still present. > I run maven with: clean package site -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira
