org.liquibase.maven.plugins.LiquibaseDeactivateChangeLogMojo 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.DeactivateChangelogCommandStep;
import liquibase.database.Database;
import liquibase.exception.LiquibaseException;
/**
*
* Deactivates a change log from Hub.
*
* @author Wesley Willard
* @goal deactivateChangeLog
*
*/
public class LiquibaseDeactivateChangeLogMojo extends AbstractLiquibaseChangeLogMojo {
@Override
protected void performLiquibaseTask(Liquibase liquibase)
throws LiquibaseException {
super.performLiquibaseTask(liquibase);
Database database = liquibase.getDatabase();
CommandScope liquibaseCommand = new CommandScope("deactivateChangeLog");
liquibaseCommand
.addArgumentValue(DeactivateChangelogCommandStep.CHANGELOG_FILE_ARG, changeLogFile);
liquibaseCommand.execute();
}
}