Package net.thucydides.maven.plugins

Source Code of net.thucydides.maven.plugins.ThucydidesCheckMojo

package net.thucydides.maven.plugins;

import net.thucydides.core.reports.ResultChecker;
import org.apache.maven.plugin.AbstractMojo;
import org.apache.maven.plugin.MojoExecutionException;
import org.apache.maven.plugin.MojoFailureException;
import org.apache.maven.plugins.annotations.Mojo;
import org.apache.maven.plugins.annotations.Parameter;
import org.apache.maven.project.MavenProject;

import java.io.File;

/**
* This plugin deletes existing history files for Thucydides for this project.
*/
@Mojo(name = "check")
public class ThucydidesCheckMojo extends AbstractMojo {
    @Parameter(readonly = true,required=true)
    protected MavenProject project;

    /**
     * Aggregate reports are generated here
     */
    @Parameter(property = "outputDirectory", defaultValue = "${project.build.directory}/site/thucydides", required=true)
    public File outputDirectory;

    protected ResultChecker getResultChecker() {
        return new ResultChecker(outputDirectory);
    }

    public void execute() throws MojoExecutionException, MojoFailureException {
        getLog().info("Checking Thucydides test results");
        getResultChecker().checkTestResults();
    }
}
TOP

Related Classes of net.thucydides.maven.plugins.ThucydidesCheckMojo

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.