Skip to content

Add plugin property "skip" to enable conditional skipping #172

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,14 @@ abstract class ProcessClassesMojo extends AbstractMojo {
@Parameter(defaultValue = "${project}", readonly = true)
protected MavenProject project;

/**
* Whether to skip execution of this plugin.
*
* @since 2.5.8
*/
@Parameter(defaultValue = "false", property = "skip", required = false)
public boolean skip;

/**
* Directory of the Java 8 installation for running Retrolambda.
* The JRE to be used will be determined in priority order:
Expand Down Expand Up @@ -115,6 +123,11 @@ abstract class ProcessClassesMojo extends AbstractMojo {

@Override
public void execute() throws MojoExecutionException {
if (skip) {
getLog().info("Skipping execution (skip=true)");
return;
}

validateTarget();
validateFork();

Expand Down