Class AgentTask

  • All Implemented Interfaces:
    java.lang.Cloneable

    public class AgentTask
    extends AbstractCoverageTask
    Ant task that will unpack the coverage agent jar and generate the JVM options required to use it
    • Field Summary

      • Fields inherited from class org.apache.tools.ant.Task

        target, taskName, taskType, wrapper
      • Fields inherited from class org.apache.tools.ant.ProjectComponent

        description, location, project
    • Constructor Summary

      Constructors 
      Constructor Description
      AgentTask()  
    • Constructor Detail

      • AgentTask

        public AgentTask()
    • Method Detail

      • setProperty

        public void setProperty​(java.lang.String property)
        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.BuildException
        Unpacks a private copy of the JaCoCo agent and populates property with 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:
        execute in class org.apache.tools.ant.Task
        Throws:
        org.apache.tools.ant.BuildException