Class CloverSetupTask

java.lang.Object
org.apache.tools.ant.ProjectComponent
org.apache.tools.ant.Task
All Implemented Interfaces:
Cloneable

public class CloverSetupTask extends AbstractInstrTask
Clover Task which sets up clover and encapsulates all the complexity of the clover compiler adapter setup (namely the properties required to be setup.
Since:
1.1
  • Field Details

  • Constructor Details

    • CloverSetupTask

      public CloverSetupTask()
  • Method Details

    • setEnabled

      public void setEnabled(boolean enabled)
      Set the flag which controls whether clover is enabled or not.
      Parameters:
      enabled - if true clover will instrument files as they are compiled.
    • setCloverCompiler

      public void setCloverCompiler(String cloverCompiler)
      Set the underlying compiler that clover will use to compile the code.
      Parameters:
      cloverCompiler - the compiler spec - this is the same as the standard Ant build.compiler value.
    • setPreserve

      public void setPreserve(boolean preserve)
      Flag to indicate whether the instrumented source should be saved.
      Parameters:
      preserve - if true the instrumented code is kept.
    • setGroverJar

      public void setGroverJar(File groverJar)
      Sets a fixed name and location for the temporary grover.jar artifact which is being used for compilation of Groovy code. By default grover*.jar has unique, generated file name and is located in ${java.io.tmpdir} directory. Note that file will be deleted on JVM termination unless "clover.no.postbuild.cleanup" property is defined.
      Parameters:
      groverJar - path where grover.jar will be written
      Since:
      3.1.8
    • setSkipGroverJar

      public void setSkipGroverJar(boolean skip)
      If set to true, then skips generation of grover.jar artifact during setup. Can be set to true only if there is no Groovy code in the project.
      Parameters:
      skip - if true then grover.jar will not be created and Groovy code not instrumented
      Since:
      3.1.8
    • addFiles

      public void addFiles(org.apache.tools.ant.types.PatternSet filesPattern)
      Set the pattern set for the files to be included or excluded from clovering
      Parameters:
      filesPattern - the patternset to use
    • cloverExecute

      public void cloverExecute()
      Setup Clover to run. Note that this task just enables the clover compiler adapter - it does not do much more than setup some properties and structures.
      Specified by:
      cloverExecute in class AbstractCloverTask