aboutsummaryrefslogtreecommitdiff
path: root/jacoco-maven-plugin
diff options
context:
space:
mode:
authorMarc R. Hoffmann <hoffmann@mountainminds.com>2016-01-12 22:33:05 +0100
committerMarc R. Hoffmann <hoffmann@mountainminds.com>2016-01-13 06:42:02 +0100
commit26daee44414eeecb0a7a63d7f6784fcf4cfe32fa (patch)
tree0f61411385d53b3c004015b09a2d1f491d6ac639 /jacoco-maven-plugin
parenta6d2b043f09984e3f2fe77e9f7502564350055f6 (diff)
downloadjacoco-26daee44414eeecb0a7a63d7f6784fcf4cfe32fa.tar.gz
GitHub #288: New agent option 'inclnolocationclasses'
With the new agent option 'inclnolocationclasses' classes without source location can be optionally included. This helps to retrieve code coverage for environments like Android where no source location is provided at runtime.
Diffstat (limited to 'jacoco-maven-plugin')
-rw-r--r--jacoco-maven-plugin/src/org/jacoco/maven/AbstractAgentMojo.java10
1 files changed, 10 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 6be31caa..51e75299 100644
--- a/jacoco-maven-plugin/src/org/jacoco/maven/AbstractAgentMojo.java
+++ b/jacoco-maven-plugin/src/org/jacoco/maven/AbstractAgentMojo.java
@@ -81,6 +81,12 @@ public abstract class AbstractAgentMojo extends AbstractJacocoMojo {
*/
Boolean inclBootstrapClasses;
/**
+ * Specifies whether classes without source location should be instrumented.
+ *
+ * @parameter property="jacoco.inclNoLocationClasses"
+ */
+ Boolean inclNoLocationClasses;
+ /**
* A session identifier that is written with the execution data. Without
* this parameter a random identifier is created by the agent.
*
@@ -190,6 +196,10 @@ public abstract class AbstractAgentMojo extends AbstractJacocoMojo {
agentOptions.setInclBootstrapClasses(inclBootstrapClasses
.booleanValue());
}
+ if (inclNoLocationClasses != null) {
+ agentOptions.setInclNoLocationClasses(inclNoLocationClasses
+ .booleanValue());
+ }
if (sessionId != null) {
agentOptions.setSessionId(sessionId);
}