Class MavenIntegrator

java.lang.Object
org.openclover.ci.MavenIntegrator
All Implemented Interfaces:
Integrator

public class MavenIntegrator extends Object implements Integrator
A utility class that contains methods to assist in integrating clover into a CI server for Maven2 builds.
  • Field Details

    • CLOVER_SETUP_NOT_BEFORE

      public static final Set<String> CLOVER_SETUP_NOT_BEFORE
      List of goals or phases before which the 'clover:setup' shall be NOT be inserted. Some plug-ins may re-create source roots (as a result of source generation, for instance) and we must ensure that Clover's source folders will be preserved.
    • CLOVER_OPTIMIZE_BEFORE

      public static final Set<String> CLOVER_OPTIMIZE_BEFORE
      List of goals or phases before which the 'clover:optimize' shall be inserted. Optimization goal must be called before a test phase.
    • ADD_VERIFY_IF_NONE_PRESENT

      public static final Set<String> ADD_VERIFY_IF_NONE_PRESENT
      List of goals or phases which lack of should trigger adding the "verify" phase. We expect that if Clover integration is enabled, then something must be compiled at least (not necessarily tested as a build may be configured in such way that files are instrumented and compiled by Clover and next used in another build). Thus, lack of the "compile" Maven phase (or any later one from Maven's build life cycle) will trigger adding the "verify" phase.
  • Constructor Details

    • MavenIntegrator

      public MavenIntegrator(CIOptions options)
  • Method Details

    • decorateArguments

      public void decorateArguments(List<String> args)
      Description copied from interface: Integrator
      Takes a modifiable List of arguments, and decorates them with arguments that will enable Clover for the build.
      Specified by:
      decorateArguments in interface Integrator
      Parameters:
      args - a modifiable List of arguments to decorate. This list must be arguments to the build tool only, and may not include the actual command that invokes the build too. e.g. {"clean", "test"} and NOT {"mvn", "clean", "test"}