All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.atlassian.maven.plugin.clover.CloverSetupMojo Maven / Gradle / Ivy

Go to download

Maven plugin for Clover. MIGRATION NOTICE: Since next major Clover release this plugin will be renamed to com.atlassian.maven.plugins:clover-maven-plugin. Thus, goals will also be renamed, e.g. 'clover2:setup' will become 'clover:setup'.

The newest version!
package com.atlassian.maven.plugin.clover;

import org.apache.maven.project.MavenProject;
import org.apache.maven.plugin.MojoExecutionException;

import java.util.Date;

/**
 * 

This mojo is to be used mainly for incremental instrumentation and compilation of Java source code.

* *

NB: This does not, nor should it, run in a forked lifecycle.

* *

This mojo should certainly *not* be called during a release build. This mojo instruments your source and test files * to ${build.directory}/clover/src-instrumented and test-src-instrumented respectively. These directories are then set as the * project's source and test source directories that subsequently get compiled by the compiler MOJO.

* * @goal setup * @phase process-sources */ public class CloverSetupMojo extends CloverInstrumentInternalMojo { static Date START_DATE; @Override public void execute() throws MojoExecutionException { // store the start time of the build. ie - the very first compilation with clover. final MavenProject firstProject = getReactorProjects().get(0); if (firstProject == getProject()) { START_DATE = new Date(); } super.execute(); } @Override protected boolean shouldRedirectArtifacts() { return false; } @Override protected boolean shouldRedirectOutputDirectories() { return false; } @Override protected String getSrcName() { return super.getSrcName() + "-instrumented"; } @Override protected String getSrcTestName() { return super.getSrcTestName() + "-instrumented"; } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy