Class AgentTask
java.lang.Object
org.apache.tools.ant.ProjectComponent
org.apache.tools.ant.Task
org.jacoco.ant.AbstractCoverageTask
org.jacoco.ant.AgentTask
- All Implemented Interfaces:
Cloneable
Ant task that will unpack the coverage agent jar and generate the JVM options
required to use it
-
Field Summary
FieldsFields inherited from class org.apache.tools.ant.Task
target, taskName, taskType, wrapperFields inherited from class org.apache.tools.ant.ProjectComponent
description, location, project -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidexecute()Unpacks a private copy of the JaCoCo agent and populatespropertywith the JVM arguments required to use it.voidsetProperty(String property) Sets the name of the property to hold the agent JVM optionsMethods inherited from class AbstractCoverageTask
getLaunchingArgument, isEnabled, setAddress, setAppend, setClassdumpdir, setDestfile, setDumpOnExit, setEnabled, setExclClassLoader, setExcludes, setInclBootstrapClasses, setInclNoLocationClasses, setIncludes, setJmx, setOutput, setPort, setSessionIdMethods inherited from class org.apache.tools.ant.Task
bindToOwner, getOwningTarget, getRuntimeConfigurableWrapper, getTaskName, getTaskType, getWrapper, handleErrorFlush, handleErrorOutput, handleFlush, handleInput, handleOutput, init, isInvalid, log, log, log, log, maybeConfigure, perform, reconfigure, setOwningTarget, setRuntimeConfigurableWrapper, setTaskName, setTaskTypeMethods inherited from class org.apache.tools.ant.ProjectComponent
clone, getDescription, getLocation, getProject, setDescription, setLocation, setProject
-
Field Details
-
property
-
-
Constructor Details
-
AgentTask
public AgentTask()
-
-
Method Details
-
setProperty
Sets the name of the property to hold the agent JVM options- Parameters:
property- Name of the property to be populated
-
execute
public void execute() throws org.apache.tools.ant.BuildExceptionUnpacks a private copy of the JaCoCo agent and populatespropertywith the JVM arguments required to use it. The value set into the property is only valid for the lifetime of the current JVM. The agent jar will be removed on termination of the JVM.- Overrides:
executein classorg.apache.tools.ant.Task- Throws:
org.apache.tools.ant.BuildException
-