Class Main
- java.lang.Object
-
- liquibase.integration.commandline.Main
-
public class Main extends Object
Deprecated.use liquibase.integration.commandline.LiquibaseCommandLine.Class for executing Liquibase via the command line.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected static class
Main.CodePointCheck
Deprecated.
-
Field Summary
Fields Modifier and Type Field Description protected String
changeExecListenerClass
Deprecated.protected String
changeExecListenerPropertiesFile
Deprecated.protected String
changeLogFile
Deprecated.protected Map<String,Object>
changeLogParameters
Deprecated.protected String
changeSetAuthor
Deprecated.protected String
changeSetContext
Deprecated.protected ClassLoader
classLoader
Deprecated.protected String
classpath
Deprecated.protected String
command
Deprecated.protected Set<String>
commandParams
Deprecated.protected String
contexts
Deprecated.protected String
currentDateTimeFunction
Deprecated.protected String
databaseChangeLogLockTableName
Deprecated.protected String
databaseChangeLogTableName
Deprecated.protected String
databaseChangeLogTablespaceName
Deprecated.protected String
databaseClass
Deprecated.protected String
dataOutputDirectory
Deprecated.protected Boolean
deactivate
Deprecated.protected String
defaultCatalogName
Deprecated.protected String
defaultSchemaName
Deprecated.protected String
defaultsFile
Deprecated.protected String
delimiter
Deprecated.protected String
diffTypes
Deprecated.protected String
driver
Deprecated.protected String
driverPropertiesFile
Deprecated.protected String
excludeObjects
Deprecated.protected String
format
Deprecated.protected Boolean
includeCatalog
Deprecated.protected String
includeObjects
Deprecated.protected Boolean
includeSchema
Deprecated.protected Boolean
includeSystemClasspath
Deprecated.protected Boolean
includeTablespace
Deprecated.protected String
labelFilter
Deprecated.protected String
labels
Deprecated.protected String
liquibaseCatalogName
Deprecated.protected String
liquibaseProLicenseKey
Deprecated.protected String
liquibaseSchemaName
Deprecated.protected String
logFile
Deprecated.protected String
logLevel
Deprecated.static Map<String,String>
newCliChangelogParameters
Deprecated.protected String
outputDefaultCatalog
Deprecated.protected String
outputDefaultSchema
Deprecated.protected String
outputFile
Deprecated.protected String
outputSchemasAs
Deprecated.protected String
overwriteOutputFile
Deprecated.protected String
password
Deprecated.protected Boolean
promptForNonLocalDatabase
Deprecated.protected String
propertyProviderClass
Deprecated.protected String
referenceDefaultCatalogName
Deprecated.protected String
referenceDefaultSchemaName
Deprecated.protected String
referenceDriver
Deprecated.protected String
referencePassword
Deprecated.protected String
referenceSchemas
Deprecated.protected String
referenceUrl
Deprecated.protected String
referenceUsername
Deprecated.protected Boolean
rollbackOnError
Deprecated.protected String
rollbackScript
Deprecated.static boolean
runningFromNewCli
Deprecated.protected List<CatalogAndSchema>
schemaList
Deprecated.protected String
schemas
Deprecated.protected String
showSummary
Deprecated.protected String
snapshotFormat
Deprecated.protected String
sqlFile
Deprecated.protected String
url
Deprecated.protected String
username
Deprecated.
-
Constructor Summary
Constructors Constructor Description Main()
Deprecated.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description protected void
applyDefaults()
Deprecated.protected static Main.CodePointCheck
checkArg(String arg)
Deprecated.Check the string for known characters which cannot be handledprotected List<String>
checkSetup()
Deprecated.After parsing, checks if the given combination of main command and can be executed.protected ClassLoader
configureClassLoader()
Deprecated.protected void
doMigration()
Deprecated.Do the actual database migration, i.e.protected String[]
fixupArgs(String[] args)
Deprecated.On windows machines, it splits args on '=' signs.boolean
isWindows()
Deprecated.Determines if this program is executed on a Microsoft Windows-type of operating system.static void
main(String[] args)
Deprecated.Entry point.protected void
parseDefaultPropertyFiles()
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
run(String[] args)
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 Detail
-
runningFromNewCli
public static boolean runningFromNewCli
Deprecated.
-
classLoader
protected ClassLoader classLoader
Deprecated.
-
driver
protected String driver
Deprecated.
-
username
protected String username
Deprecated.
-
password
protected String password
Deprecated.
-
url
protected String url
Deprecated.
-
databaseClass
protected String databaseClass
Deprecated.
-
defaultSchemaName
protected String defaultSchemaName
Deprecated.
-
outputDefaultSchema
protected String outputDefaultSchema
Deprecated.
-
outputDefaultCatalog
protected String outputDefaultCatalog
Deprecated.
-
liquibaseCatalogName
protected String liquibaseCatalogName
Deprecated.
-
liquibaseSchemaName
protected String liquibaseSchemaName
Deprecated.
-
databaseChangeLogTableName
protected String databaseChangeLogTableName
Deprecated.
-
databaseChangeLogLockTableName
protected String databaseChangeLogLockTableName
Deprecated.
-
databaseChangeLogTablespaceName
protected String databaseChangeLogTablespaceName
Deprecated.
-
defaultCatalogName
protected String defaultCatalogName
Deprecated.
-
changeLogFile
protected String changeLogFile
Deprecated.
-
overwriteOutputFile
protected String overwriteOutputFile
Deprecated.
-
classpath
protected String classpath
Deprecated.
-
contexts
protected String contexts
Deprecated.
-
labels
protected String labels
Deprecated.
-
labelFilter
protected String labelFilter
Deprecated.
-
driverPropertiesFile
protected String driverPropertiesFile
Deprecated.
-
propertyProviderClass
protected String propertyProviderClass
Deprecated.
-
changeExecListenerClass
protected String changeExecListenerClass
Deprecated.
-
changeExecListenerPropertiesFile
protected String changeExecListenerPropertiesFile
Deprecated.
-
promptForNonLocalDatabase
protected Boolean promptForNonLocalDatabase
Deprecated.
-
includeSystemClasspath
protected Boolean includeSystemClasspath
Deprecated.
-
defaultsFile
protected String defaultsFile
Deprecated.
-
diffTypes
protected String diffTypes
Deprecated.
-
changeSetAuthor
protected String changeSetAuthor
Deprecated.
-
changeSetContext
protected String changeSetContext
Deprecated.
-
dataOutputDirectory
protected String dataOutputDirectory
Deprecated.
-
referenceDriver
protected String referenceDriver
Deprecated.
-
referenceUrl
protected String referenceUrl
Deprecated.
-
referenceUsername
protected String referenceUsername
Deprecated.
-
referencePassword
protected String referencePassword
Deprecated.
-
referenceDefaultCatalogName
protected String referenceDefaultCatalogName
Deprecated.
-
referenceDefaultSchemaName
protected String referenceDefaultSchemaName
Deprecated.
-
currentDateTimeFunction
protected String currentDateTimeFunction
Deprecated.
-
command
protected String command
Deprecated.
-
logLevel
protected String logLevel
Deprecated.
-
logFile
protected String logFile
Deprecated.
-
outputFile
protected String outputFile
Deprecated.
-
excludeObjects
protected String excludeObjects
Deprecated.
-
includeCatalog
protected Boolean includeCatalog
Deprecated.
-
includeObjects
protected String includeObjects
Deprecated.
-
includeSchema
protected Boolean includeSchema
Deprecated.
-
includeTablespace
protected Boolean includeTablespace
Deprecated.
-
deactivate
protected Boolean deactivate
Deprecated.
-
outputSchemasAs
protected String outputSchemasAs
Deprecated.
-
referenceSchemas
protected String referenceSchemas
Deprecated.
-
schemas
protected String schemas
Deprecated.
-
snapshotFormat
protected String snapshotFormat
Deprecated.
-
liquibaseProLicenseKey
protected String liquibaseProLicenseKey
Deprecated.
-
sqlFile
protected String sqlFile
Deprecated.
-
delimiter
protected String delimiter
Deprecated.
-
rollbackScript
protected String rollbackScript
Deprecated.
-
rollbackOnError
protected Boolean rollbackOnError
Deprecated.
-
schemaList
protected List<CatalogAndSchema> schemaList
Deprecated.
-
format
protected String format
Deprecated.
-
showSummary
protected String showSummary
Deprecated.
-
-
Method Detail
-
main
public static void main(String[] args)
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
-
run
public static int run(String[] args) throws Exception
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
protected void parseDefaultPropertyFiles() throws CommandLineParsingException
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
protected String[] fixupArgs(String[] args)
Deprecated.On windows machines, it splits args on '=' signs. Put it back like it was.
-
checkSetup
protected List<String> 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
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.- Parameters:
errorMessages
- List of error messagesstream
- the output stream to write the text to
-
printHelp
protected void printHelp(PrintStream stream)
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
protected static Main.CodePointCheck checkArg(String arg)
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
protected void parseOptions(String[] paramArgs) throws CommandLineParsingException
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
protected ClassLoader configureClassLoader() throws CommandLineParsingException
Deprecated.- Throws:
CommandLineParsingException
-
doMigration
protected void doMigration() throws Exception
Deprecated.Do the actual database migration, i.e. apply the ChangeSets.- Throws:
Exception
-
setOutputStream
public static PrintStream setOutputStream(PrintStream outputStream)
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.
-
-