From 310b7d14546c8f5e49f5e99475fb6001331ac4ca Mon Sep 17 00:00:00 2001 From: "Marc R. Hoffmann" Date: Fri, 16 May 2014 20:30:20 +0200 Subject: GitHub #49: New agent option includebootstrapclasses New configuration option for the JaCoCo agent includebootstrapclasses to also instrument classes from the bootstrap class loader. --- .../src/org/jacoco/maven/AbstractAgentMojo.java | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'jacoco-maven-plugin/src/org/jacoco/maven') 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 @@ -72,6 +72,14 @@ public abstract class AbstractAgentMojo extends AbstractJacocoMojo { * @parameter property="jacoco.exclClassLoaders" */ 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); } -- cgit v1.2.3