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

org.liquibase.maven.plugins.LiquibaseConnectMojo Maven / Gradle / Ivy

The newest version!
package org.liquibase.maven.plugins;

import liquibase.Liquibase;
import liquibase.command.CommandScope;
import liquibase.database.Database;
import liquibase.exception.LiquibaseException;

/**
 * 

Test connection to the configured database.

* * @goal connect */ public class LiquibaseConnectMojo extends AbstractLiquibaseMojo { @Override protected void performLiquibaseTask(Liquibase liquibase) throws LiquibaseException { CommandScope connectCommand = new CommandScope("connect"); connectCommand.addArgumentValue("url", url); connectCommand.addArgumentValue("username", username); connectCommand.addArgumentValue("password", password); connectCommand.addArgumentValue("catalog", defaultCatalogName); connectCommand.addArgumentValue("schema", defaultSchemaName); connectCommand.provideDependency(Database.class, getLiquibase().getDatabase()); connectCommand.execute(); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy