public class Main extends Object
Modifier and Type | Class and Description |
---|---|
protected static class |
Main.CodePointCheck |
Constructor and Description |
---|
Main() |
Modifier and Type | Method and Description |
---|---|
protected void |
applyDefaults() |
protected static Main.CodePointCheck |
checkArg(String arg)
Check the string for known characters which cannot be handled
|
protected List<String> |
checkSetup()
After parsing, checks if the given combination of main command and can be executed.
|
protected void |
configureClassLoader() |
protected void |
doMigration()
Do the actual database migration, i.e.
|
protected String[] |
fixupArgs(String[] args)
On windows machines, it splits args on '=' signs.
|
boolean |
isWindows()
Determines if this program is executed on a Microsoft Windows-type of operating system.
|
static void |
main(String[] args)
Entry point.
|
protected void |
parseDefaultPropertyFiles()
Search for both liquibase.properties (or whatever the name of the current
defaultsFile is) and the "local" variant liquibase.local.properties.
|
protected void |
parseOptions(String[] paramArgs)
Parses the command line options.
|
protected void |
parsePropertiesFile(InputStream propertiesInputStream)
Reads various execution parameters from an InputStream and sets our internal state according to the values
found.
|
protected void |
printHelp(List<String> errorMessages,
PrintStream stream)
If any errors have been found, print the list of errors first, then print the command line help text.
|
protected void |
printHelp(PrintStream stream)
Print instructions on how to use this program from the command line.
|
protected void |
reconfigureLogging()
Set up the logging to the STDOUT/STDERR console streams.
|
static int |
run(String[] args)
Process the command line arguments and perform the appropriate main action (update, rollback etc.)
|
protected ClassLoader classLoader
protected String driver
protected String username
protected String password
protected String url
protected String databaseClass
protected String defaultSchemaName
protected String outputDefaultSchema
protected String outputDefaultCatalog
protected String liquibaseCatalogName
protected String liquibaseSchemaName
protected String databaseChangeLogTableName
protected String databaseChangeLogLockTableName
protected String databaseChangeLogTablespaceName
protected String defaultCatalogName
protected String changeLogFile
protected String overwriteOutputFile
protected String classpath
protected String contexts
protected String labels
protected String driverPropertiesFile
protected String propertyProviderClass
protected String changeExecListenerClass
protected String changeExecListenerPropertiesFile
protected Boolean promptForNonLocalDatabase
protected Boolean includeSystemClasspath
protected Boolean strict
protected String defaultsFile
protected String diffTypes
protected String changeSetAuthor
protected String changeSetContext
protected String dataOutputDirectory
protected String referenceDriver
protected String referenceUrl
protected String referenceUsername
protected String referencePassword
protected String referenceDefaultCatalogName
protected String referenceDefaultSchemaName
protected String currentDateTimeFunction
protected String command
protected String logLevel
protected String logFile
protected String outputFile
protected String excludeObjects
protected Boolean includeCatalog
protected String includeObjects
protected Boolean includeSchema
protected Boolean includeTablespace
protected String outputSchemasAs
protected String referenceSchemas
protected String schemas
protected String snapshotFormat
protected String liquibaseProLicenseKey
protected String sqlFile
protected String delimiter
protected String rollbackScript
public static void main(String[] args)
args
- the command line argumentspublic static int run(String[] args) throws LiquibaseException
args
- the command line argumentsLiquibaseException
- a runtime exceptionprotected void reconfigureLogging()
protected void parseDefaultPropertyFiles() throws CommandLineParsingException
CommandLineParsingException
- if an error occurs during parsingprotected String[] fixupArgs(String[] args)
protected List<String> checkSetup()
protected void parsePropertiesFile(InputStream propertiesInputStream) throws IOException, CommandLineParsingException
propertiesInputStream
- an InputStream from a Java properties fileIOException
- if there is a problem reading the InputStreamCommandLineParsingException
- if an invalid property is encounteredprotected void printHelp(List<String> errorMessages, PrintStream stream)
errorMessages
- List of error messagesstream
- the output stream to write the text toprotected void printHelp(PrintStream stream)
stream
- the output stream to write the help text toprotected static Main.CodePointCheck checkArg(String arg)
arg
- Input parameter to checkprotected void parseOptions(String[] paramArgs) throws CommandLineParsingException
paramArgs
- the arguments to parseCommandLineParsingException
- thrown if an invalid argument is passedprotected void applyDefaults()
protected void configureClassLoader() throws CommandLineParsingException
CommandLineParsingException
protected void doMigration() throws Exception
Exception
public boolean isWindows()
Copyright © 2020 Liquibase.org. All rights reserved.