aboutsummaryrefslogtreecommitdiff
path: root/jacoco-maven-plugin
diff options
context:
space:
mode:
authorMarc R. Hoffmann <hoffmann@mountainminds.com>2014-05-16 20:30:20 +0200
committerMarc R. Hoffmann <hoffmann@mountainminds.com>2014-05-19 20:38:00 +0200
commit310b7d14546c8f5e49f5e99475fb6001331ac4ca (patch)
tree8a75fe716d904754678f6a7ee7e0fe6a7df6eb1c /jacoco-maven-plugin
parent1fadbfb9384433f00e409ab27328d147445c8d9f (diff)
downloadjacoco-310b7d14546c8f5e49f5e99475fb6001331ac4ca.tar.gz
GitHub #49: New agent option includebootstrapclasses
New configuration option for the JaCoCo agent includebootstrapclasses to also instrument classes from the bootstrap class loader.
Diffstat (limited to 'jacoco-maven-plugin')
-rw-r--r--jacoco-maven-plugin/src/org/jacoco/maven/AbstractAgentMojo.java12
1 files changed, 12 insertions, 0 deletions
diff --git a/jacoco-maven-plugin/src/org/jacoco/maven/AbstractAgentMojo.java b/jacoco-maven-plugin/src/org/jacoco/maven/AbstractAgentMojo.java
index 4ed00c54..ee38381f 100644
--- a/jacoco-maven-plugin/src/org/jacoco/maven/AbstractAgentMojo.java
+++ b/jacoco-maven-plugin/src/org/jacoco/maven/AbstractAgentMojo.java
@@ -73,6 +73,14 @@ public abstract class AbstractAgentMojo extends AbstractJacocoMojo {
*/
String exclClassLoaders;
/**
+ * Specifies whether also classes from the bootstrap classloader should be
+ * instrumented. Use this feature with caution, it needs heavy
+ * includes/excludes tuning.
+ *
+ * @parameter property="jacoco.includebootstrapclasses"
+ */
+ Boolean includebootstrapclasses;
+ /**
* A session identifier that is written with the execution data. Without
* this parameter a random identifier is created by the agent.
*
@@ -178,6 +186,10 @@ public abstract class AbstractAgentMojo extends AbstractJacocoMojo {
if (exclClassLoaders != null) {
agentOptions.setExclClassloader(exclClassLoaders);
}
+ if (includebootstrapclasses != null) {
+ agentOptions.setIncludeBootstrapClasses(includebootstrapclasses
+ .booleanValue());
+ }
if (sessionId != null) {
agentOptions.setSessionId(sessionId);
}