1. IntroductionThis blog shows how to seperate your unit and integration tests in a multi-module maven project whilst providing seperate test coverage results for each.It builds upon my previous 2 simpler examples using Sonar and Jacoco. https://johndobie.blogspot.com/2011/06/seperating-test-code-coverage-with.htmlhttps://johndobie.blogspot.com/2011/06/seperating-maven-unit-integration-tests.htmlIt’s a full example in its own right but I won’t go into too much detail on how it works which is already done. The previous examples cover everything in sufficient detail.The full example can be checked out from google code and run as below.1.1 Example Structure We mirror the 2 structures as per the previous blogs with the unit and integration tests seperated.For this example we also create a new directory for the jacoco files. Because this is a multi-module example, we have also have the top level pom.xml and common-pom.xml.1.2 Running the Example The full code is hosted at google code. Use the following commands to check it out and run it.<pre class="prettyprint"><code>svn co <a href="https://designbycontract.googlecode.com/svn/trunk/multi-module-sonar">https://designbycontract.googlecode.com/svn/trunk/multi-module-sonar</a> cd multi-module-sonar mvn –Pit,sonar clean sonar 1.3 Results of running the exampleThe tests in the standard maven test structure are run during the unit test phase as usual.The tests in the srcintegrationtestjava directory are run during the integration test phase.The integration test classes are placed in the seperate targetintegrationtest-classes directory The aggregated jacoco coverage files are placed in the code-coverage directoryThe results are show in Sonar as an aggregation of the results for module1 and module2 2. How does it workCheck out the previous blogs to see how the unit and integration tests are run seperately and the code coverage works. This example just builds upon that by using more than one module. https://johndobie.blogspot.com/2011/06/seperating-test-code-coverage-with.htmlhttps://johndobie.blogspot.com/2011/06/seperating-maven-unit-integration-tests.html Java