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

com.github.slavaz.maven.plugin.postgresql.embedded.goals.AbstractGoalMojo Maven / Gradle / Ivy

Go to download

This is a Maven plugin for running an embedded PostgreSQL server, mostly for integration tests.

The newest version!
package com.github.slavaz.maven.plugin.postgresql.embedded.goals;

import com.github.slavaz.maven.plugin.postgresql.embedded.proxy.ProxyUtils;

import org.apache.maven.plugin.AbstractMojo;
import org.apache.maven.plugin.MojoExecutionException;
import org.apache.maven.plugin.MojoFailureException;
import org.apache.maven.plugins.annotations.Parameter;
import org.apache.maven.settings.Settings;

public abstract class AbstractGoalMojo extends AbstractMojo {

    @Parameter(defaultValue = "false")
    private boolean skipGoal;

    @Parameter(defaultValue = "${settings}", readonly = true)
    protected Settings settings;

    @Override
	public void execute() throws MojoExecutionException, MojoFailureException {
        if (skipGoal) {
            getLog().debug("Skipped.");
        } else {
            ProxyUtils.handleProxyConfigurjation(this.settings, getLog());
            doExecute();
        }
    }

    protected abstract void doExecute() throws MojoExecutionException, MojoFailureException;

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy