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.HistoryCommandStep;
import liquibase.command.core.helpers.DbUrlConnectionArgumentsCommandStep;
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(HistoryCommandStep.COMMAND_NAME);
historyCommand.addArgumentValue(DbUrlConnectionArgumentsCommandStep.DATABASE_ARG, getLiquibase().getDatabase());
historyCommand.execute();
}
}