Class Main
java.lang.Object
liquibase.integration.commandline.Main
Deprecated.
use liquibase.integration.commandline.LiquibaseCommandLine.
Class for executing Liquibase via the command line.
-
Nested Class Summary
-
Field Summary
Modifier and TypeFieldDescriptionprotected String
Deprecated.protected String
Deprecated.protected String
Deprecated.Deprecated.protected String
Deprecated.protected String
Deprecated.protected ClassLoader
Deprecated.protected String
Deprecated.protected String
Deprecated.Deprecated.protected String
Deprecated.protected String
Deprecated.protected String
Deprecated.protected String
Deprecated.protected String
Deprecated.protected String
Deprecated.protected String
Deprecated.protected Boolean
Deprecated.protected String
Deprecated.protected String
Deprecated.protected String
Deprecated.protected String
Deprecated.protected String
Deprecated.protected String
Deprecated.protected String
Deprecated.protected String
Deprecated.protected String
Deprecated.protected Boolean
Deprecated.protected String
Deprecated.protected Boolean
Deprecated.protected Boolean
Deprecated.protected Boolean
Deprecated.protected String
Deprecated.protected String
Deprecated.protected String
Deprecated.protected String
Deprecated.protected String
Deprecated.protected String
Deprecated.protected String
Deprecated.Deprecated.protected String
Deprecated.protected String
Deprecated.protected String
Deprecated.protected String
Deprecated.protected String
Deprecated.protected String
Deprecated.protected Boolean
Deprecated.protected String
Deprecated.protected String
Deprecated.protected String
Deprecated.protected String
Deprecated.protected String
Deprecated.protected String
Deprecated.protected String
Deprecated.protected String
Deprecated.protected Boolean
Deprecated.protected String
Deprecated.static boolean
Deprecated.protected List<CatalogAndSchema>
Deprecated.protected String
Deprecated.protected String
Deprecated.protected String
Deprecated.protected String
Deprecated.protected String
Deprecated.protected String
Deprecated. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
Deprecated.protected static Main.CodePointCheck
Deprecated.Check the string for known characters which cannot be handledDeprecated.After parsing, checks if the given combination of main command and can be executed.protected ClassLoader
Deprecated.protected void
Deprecated.Do the actual database migration, i.e. apply the ChangeSets.protected String[]
Deprecated.On windows machines, it splits args on '=' signs.boolean
Deprecated.Determines if this program is executed on a Microsoft Windows-type of operating system.static void
Deprecated.Entry point.protected void
Deprecated.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) Deprecated.Parses the command line options.protected void
parsePropertiesFile
(InputStream propertiesInputStream) Deprecated.Reads various execution parameters from an InputStream and sets our internal state according to the values found.protected void
printHelp
(PrintStream stream) Deprecated.Print instructions on how to use this program from the command line.protected void
printHelp
(List<String> errorMessages, PrintStream stream) Deprecated.If any errors have been found, print the list of errors first, then print the command line help text.static int
Deprecated.Process the command line arguments and perform the appropriate main action (update, rollback etc.)protected static void
setLogLevel
(LogService logService, Logger rootLogger, Logger liquibaseLogger, Level level) Deprecated.static PrintStream
setOutputStream
(PrintStream outputStream) Deprecated.Sets the default outputstream to use.
-
Field Details
-
runningFromNewCli
public static boolean runningFromNewCliDeprecated. -
newCliChangelogParameters
Deprecated. -
classLoader
Deprecated. -
driver
Deprecated. -
username
Deprecated. -
password
Deprecated. -
url
Deprecated. -
databaseClass
Deprecated. -
defaultSchemaName
Deprecated. -
outputDefaultSchema
Deprecated. -
outputDefaultCatalog
Deprecated. -
liquibaseCatalogName
Deprecated. -
liquibaseSchemaName
Deprecated. -
databaseChangeLogTableName
Deprecated. -
databaseChangeLogLockTableName
Deprecated. -
databaseChangeLogTablespaceName
Deprecated. -
defaultCatalogName
Deprecated. -
changeLogFile
Deprecated. -
overwriteOutputFile
Deprecated. -
classpath
Deprecated. -
contexts
Deprecated. -
labels
Deprecated. -
labelFilter
Deprecated. -
driverPropertiesFile
Deprecated. -
propertyProviderClass
Deprecated. -
changeExecListenerClass
Deprecated. -
changeExecListenerPropertiesFile
Deprecated. -
promptForNonLocalDatabase
Deprecated. -
includeSystemClasspath
Deprecated. -
defaultsFile
Deprecated. -
diffTypes
Deprecated. -
changeSetAuthor
Deprecated. -
changeSetContext
Deprecated. -
dataOutputDirectory
Deprecated. -
referenceDriver
Deprecated. -
referenceUrl
Deprecated. -
referenceUsername
Deprecated. -
referencePassword
Deprecated. -
referenceDefaultCatalogName
Deprecated. -
referenceDefaultSchemaName
Deprecated. -
currentDateTimeFunction
Deprecated. -
command
Deprecated. -
commandParams
Deprecated. -
logLevel
Deprecated. -
logFile
Deprecated. -
changeLogParameters
Deprecated. -
outputFile
Deprecated. -
excludeObjects
Deprecated. -
includeCatalog
Deprecated. -
includeObjects
Deprecated. -
includeSchema
Deprecated. -
includeTablespace
Deprecated. -
deactivate
Deprecated. -
outputSchemasAs
Deprecated. -
referenceSchemas
Deprecated. -
schemas
Deprecated. -
snapshotFormat
Deprecated. -
liquibaseProLicenseKey
Deprecated. -
sqlFile
Deprecated. -
delimiter
Deprecated. -
rollbackScript
Deprecated. -
rollbackOnError
Deprecated. -
schemaList
Deprecated. -
format
Deprecated. -
showSummary
Deprecated.
-
-
Constructor Details
-
Main
public Main()Deprecated.
-
-
Method Details
-
main
Deprecated.Entry point. This is what gets executes when starting this program from the command line. This is actually a simple wrapper so that an errorLevel of != 0 is guaranteed in case of an uncaught exception.- Parameters:
args
- the command line arguments- Throws:
Exception
-
run
Deprecated.Process the command line arguments and perform the appropriate main action (update, rollback etc.)- Parameters:
args
- the command line arguments- Returns:
- the errorlevel to be returned to the operating system, e.g. for further processing by scripts
- Throws:
LiquibaseException
- a runtime exceptionException
-
setLogLevel
protected static void setLogLevel(LogService logService, Logger rootLogger, Logger liquibaseLogger, Level level) Deprecated. -
parseDefaultPropertyFiles
Deprecated.Search for both liquibase.properties (or whatever the name of the current defaultsFile is) and the "local" variant liquibase.local.properties. The contents of the local variant overwrite parameters with the same name in the regular properties file.- Throws:
CommandLineParsingException
- if an error occurs during parsing
-
fixupArgs
Deprecated.On windows machines, it splits args on '=' signs. Put it back like it was. -
checkSetup
Deprecated.After parsing, checks if the given combination of main command and can be executed.- Returns:
- an empty List if successful, or a list of error messages
-
parsePropertiesFile
protected void parsePropertiesFile(InputStream propertiesInputStream) throws IOException, CommandLineParsingException Deprecated.Reads various execution parameters from an InputStream and sets our internal state according to the values found.- Parameters:
propertiesInputStream
- an InputStream from a Java properties file- Throws:
IOException
- if there is a problem reading the InputStreamCommandLineParsingException
- if an invalid property is encountered
-
printHelp
Deprecated.If any errors have been found, print the list of errors first, then print the command line help text.- Parameters:
errorMessages
- List of error messagesstream
- the output stream to write the text to
-
printHelp
Deprecated.Print instructions on how to use this program from the command line.- Parameters:
stream
- the output stream to write the help text to
-
checkArg
Deprecated.Check the string for known characters which cannot be handled- Parameters:
arg
- Input parameter to check- Returns:
- int A CodePointCheck object, or null to indicate all good
-
parseOptions
Deprecated.Parses the command line options. If an invalid argument is given, a CommandLineParsingException is thrown.- Parameters:
paramArgs
- the arguments to parse- Throws:
CommandLineParsingException
- thrown if an invalid argument is passed
-
applyDefaults
protected void applyDefaults()Deprecated. -
configureClassLoader
Deprecated.- Throws:
CommandLineParsingException
-
doMigration
Deprecated.Do the actual database migration, i.e. apply the ChangeSets.- Throws:
Exception
-
setOutputStream
Deprecated.Sets the default outputstream to use. Mainly useful for testing and the Command wrappers. -
isWindows
public boolean isWindows()Deprecated.Determines if this program is executed on a Microsoft Windows-type of operating system.- Returns:
- true if running under some variant of MS Windows, false otherwise.
-