public class MigrateMojo extends org.liquibase.maven.plugins.AbstractLiquibaseUpdateMojo
| Modifier and Type | Field and Description |
|---|---|
protected String |
changeLogFile
Deprecated.
|
protected File |
changeLogSavePath |
protected URL |
changeLogTagUrl |
protected boolean |
clearCheckSums
Flag for forcing the checksums to be cleared from teh DatabaseChangeLog table.
|
protected String |
databaseClass
The class to use as the database object.
|
static String |
DEFAULT_CHANGELOG_PATH |
protected String |
defaultSchemaName
The default schema name to use the for database connection.
|
protected String |
driver
The fully qualified name of the driver class to use to connect to the database.
|
protected boolean |
dropFirst
Whether or not to perform a drop on the database before executing the change.
|
protected boolean |
emptyPassword
Deprecated.
Use an empty or null value for the password instead.
|
protected boolean |
includeArtifact
Allows for the maven project artifact to be included in the class loader for
obtaining the Liquibase property and DatabaseChangeLog files.
|
protected boolean |
includeTestOutputDirectory
Allows for the maven test output directory to be included in the class loader for
obtaining the Liquibase property and DatabaseChangeLog files.
|
protected String |
logging
Controls the level of logging from Liquibase when executing.
|
protected String |
password
The database password to use to connect to the specified database.
|
protected boolean |
promptOnNonLocalDatabase
Controls the prompting of users as to whether or not they really want to run the
changes on a database that is not local to the machine that the user is current
executing the plugin on.
|
protected String |
propertyFile
The Liquibase properties file used to configure the Liquibase
Liquibase. |
protected boolean |
propertyFileWillOverride
Flag allowing for the Liquibase properties file to override any settings provided in
the Maven plugin configuration.
|
protected String |
svnPassword |
protected String |
svnServer
The server id in settings.xml to use when authenticating with.
|
protected String |
svnUsername |
protected Properties |
systemProperties
List of system properties to pass to the database.
|
protected File |
updatePath
Location of an update.xml
|
protected String |
url
The Database URL to connect to for executing Liquibase.
|
protected String |
username
The database username to use to connect to the specified database.
|
protected boolean |
verbose
Controls the verbosity of the output from invoking the plugin.
|
protected org.apache.maven.artifact.manager.WagonManager |
wagonManager
The Maven Wagon manager to use when obtaining server authentication details.
|
| Constructor and Description |
|---|
MigrateMojo() |
| Modifier and Type | Method and Description |
|---|---|
protected org.tmatesoft.svn.core.wc.SVNClientManager |
clientManager() |
protected void |
doFieldHack() |
protected void |
doUpdate(liquibase.Liquibase liquibase) |
protected void |
dropAll(liquibase.Liquibase liquibase)
Drops the database.
|
void |
execute() |
protected void |
generateUpdateLog(File changeLogFile,
Collection<File> changelogs) |
protected File |
getBasedir() |
protected org.tmatesoft.svn.core.SVNURL |
getChangeLogTagUrl() |
protected Long |
getCurrentRevision() |
protected Field |
getDeclaredField(Class clazz,
String fieldName)
Recursively searches for the field specified by the fieldName in the class and all
the super classes until it either finds it, or runs out of parents.
|
protected Long |
getLocalRevision() |
protected String |
getLocalTagPath(org.tmatesoft.svn.core.SVNURL tag) |
protected org.tmatesoft.svn.core.SVNURL |
getProjectSvnUrlFrom(File path) |
protected Long |
getTagRevision(String tag) |
protected Collection<org.tmatesoft.svn.core.SVNURL> |
getTagUrls() |
protected org.tmatesoft.svn.core.wc.SVNWCClient |
getWCClient() |
protected Element |
includeNode(Document parentChangeLog,
File changelog) |
protected boolean |
isUpdateRequired() |
protected void |
parsePropertiesFile(InputStream propertiesInputStream)
Parses a properties file and sets the assocaited fields in the plugin.
|
protected void |
printSettings(String indent) |
protected Collection<File> |
scanForChangelogs(File searchPath) |
performLiquibaseTaskcheckRequiredParametersAreSpecified, createLiquibase, getFileOpenercleanup, configureFieldsAndValues, getClassLoaderIncludingProjectClasspath, getLiquibase, getMavenArtifactClassLoader, isPromptOnNonLocalDatabasepublic static final String DEFAULT_CHANGELOG_PATH
protected String driver
protected org.apache.maven.artifact.manager.WagonManager wagonManager
protected String username
protected String password
protected boolean emptyPassword
password setting.protected String defaultSchemaName
protected String databaseClass
protected boolean promptOnNonLocalDatabase
protected boolean includeArtifact
protected boolean includeTestOutputDirectory
protected boolean verbose
protected String logging
protected String propertyFile
Liquibase.protected boolean propertyFileWillOverride
protected boolean clearCheckSums
protected Properties systemProperties
protected String svnUsername
protected String svnPassword
protected String changeLogFile
protected File changeLogSavePath
protected URL changeLogTagUrl
protected File updatePath
protected boolean dropFirst
public MigrateMojo()
protected File getBasedir()
protected org.tmatesoft.svn.core.SVNURL getChangeLogTagUrl() throws org.tmatesoft.svn.core.SVNException
org.tmatesoft.svn.core.SVNExceptionprotected void doFieldHack()
public void execute() throws org.apache.maven.plugin.MojoExecutionException, org.apache.maven.plugin.MojoFailureException
execute in interface org.apache.maven.plugin.Mojoexecute in class org.liquibase.maven.plugins.AbstractLiquibaseMojoorg.apache.maven.plugin.MojoExecutionExceptionorg.apache.maven.plugin.MojoFailureExceptionprotected String getLocalTagPath(org.tmatesoft.svn.core.SVNURL tag)
protected boolean isUpdateRequired() throws org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoExecutionExceptionprotected org.tmatesoft.svn.core.SVNURL getProjectSvnUrlFrom(File path) throws org.tmatesoft.svn.core.SVNException
org.tmatesoft.svn.core.SVNExceptionprotected Long getCurrentRevision() throws org.tmatesoft.svn.core.SVNException
org.tmatesoft.svn.core.SVNExceptionprotected Long getLocalRevision() throws org.tmatesoft.svn.core.SVNException
org.tmatesoft.svn.core.SVNExceptionprotected Long getTagRevision(String tag) throws org.tmatesoft.svn.core.SVNException
org.tmatesoft.svn.core.SVNExceptionprotected Collection<org.tmatesoft.svn.core.SVNURL> getTagUrls() throws org.tmatesoft.svn.core.SVNException
org.tmatesoft.svn.core.SVNExceptionprotected org.tmatesoft.svn.core.wc.SVNWCClient getWCClient()
protected Collection<File> scanForChangelogs(File searchPath)
protected org.tmatesoft.svn.core.wc.SVNClientManager clientManager()
protected void generateUpdateLog(File changeLogFile, Collection<File> changelogs) throws FileNotFoundException, IOException
FileNotFoundExceptionIOExceptionprotected Element includeNode(Document parentChangeLog, File changelog) throws IOException
IOExceptionprotected void doUpdate(liquibase.Liquibase liquibase) throws liquibase.exception.LiquibaseException
doUpdate in class org.liquibase.maven.plugins.AbstractLiquibaseUpdateMojoliquibase.exception.LiquibaseExceptionprotected void dropAll(liquibase.Liquibase liquibase) throws liquibase.exception.LiquibaseException
liquibase - liquibase.exception.LiquibaseExceptionprotected void printSettings(String indent)
printSettings in class org.liquibase.maven.plugins.AbstractLiquibaseUpdateMojoprotected void parsePropertiesFile(InputStream propertiesInputStream) throws org.apache.maven.plugin.MojoExecutionException
parsePropertiesFile in class org.liquibase.maven.plugins.AbstractLiquibaseMojopropertiesInputStream - The input stream which is the Liquibase properties that
needs to be parsed.org.apache.maven.plugin.MojoExecutionException - If there is a problem parsing
the file.protected Field getDeclaredField(Class clazz, String fieldName) throws NoSuchFieldException
clazz - The Class to start searching from.fieldName - The name of the field to retrieve.Field identified by the field name.NoSuchFieldException - If the field was not found in the class or any of its
super classes.Copyright © 2004-2012 Kualigan. All Rights Reserved.