jacoco/jacoco — pull request #195 by andre1987 (2014-02-24 12:30:37+00:00)
Title: Added support for instrument dependency classes by extracting them from dependency jars provided on pom file

This is a small change on the Jacoco maven plugin that allows collecting code coverage not only for the module being tested but also for its dependencies. It accomplishes this by extracting compiled classes from the JAR files.

The functionality is enabled by flag `isMultiModule`. The flag `packagePattern` indicates which packages will be instrumented. One example of this configuration follows:
```
org.jacoco
jacoco-maven-plugin
0.6.5-SNAPSHOT

true
com.mycompany

```
For example, the module **B** has a dependency on module **A** declared on its POM file. What will happen in this case? On the instrumentation goal Jacoco will try to parse dependent JAR files and check if the groupId matches the provided `packagePattern`. When that happens the JAR will be extracted into the `/target/classes` folder and the coverage will be generated. On the restore-instrumented-classes goal the copied classes will be deleted.