org.liquibase.maven.plugins.LiquibaseHistoryMojo Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of liquibase-maven-plugin Show documentation
Show all versions of liquibase-maven-plugin Show documentation
A Maven plugin wraps up some of the functionality of Liquibase
package org.liquibase.maven.plugins;
import liquibase.Liquibase;
import liquibase.command.CommandScope;
import liquibase.command.core.InternalHistoryCommandStep;
import liquibase.exception.LiquibaseException;
/**
* Outputs history of deployments against the configured database.
*
* @goal history
*/
public class LiquibaseHistoryMojo extends AbstractLiquibaseMojo {
@Override
protected void performLiquibaseTask(Liquibase liquibase) throws LiquibaseException {
CommandScope historyCommand = new CommandScope(InternalHistoryCommandStep.COMMAND_NAME);
historyCommand.addArgumentValue(InternalHistoryCommandStep.DATABASE_ARG, getLiquibase().getDatabase());
historyCommand.execute();
}
}