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

com.github.bingoohuang.blackcat.maven.InstrumentCompilerMojo Maven / Gradle / Ivy

package com.github.bingoohuang.blackcat.maven;

import com.github.bingoohuang.blackcat.maven.instrument.BlackcatTransformer;
import lombok.val;
import org.apache.maven.plugin.AbstractMojo;
import org.apache.maven.plugin.MojoExecutionException;

import java.io.File;
import java.util.HashSet;
import java.util.Set;

/**
 * Instrument Compiles application sources
 *
 * @goal instrument
 */
public class InstrumentCompilerMojo extends AbstractMojo {

    /**
     * The directory for compiled classes.
     *
     * @parameter default-value="${project.build.outputDirectory}"
     * @required
     * @readonly
     */
    private File outputDirectory;

    /**
     * A list of instrument inclusion filters for the compiler.
     *
     * @parameter
     */
    private Set instrumentIncludes = new HashSet();

    /**
     * A list of instrument exclusion filters for the compiler.
     *
     * @parameter
     */
    private Set instrumentExcludes = new HashSet();

    public void execute() throws MojoExecutionException {
        val transformer = new BlackcatTransformer();
        transformer.instrument(outputDirectory, instrumentIncludes, instrumentExcludes);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy