Top Description Fields Constructors Methods
liquibase.integration.commandline

public Class LiquibaseLauncher

extends Object
Class Inheritance
Imports
liquibase.Scope, liquibase.util.StringUtil, java.io.File, java.net.MalformedURLException, .URL, .URLClassLoader, java.util.*, java.util.regex.Matcher, .Pattern, java.util.stream.Collectors

Launcher which builds up the classpath needed to run Liquibase, then calls LiquibaseCommandLine#main(String[]).

Supports the following configuration options that can be passed as JVM properties and/or environment variables, taking the former precedence over the latter:

Environment variable JVM property
Meaning
LIQUIBASE_HOME liquibase.home
Liquibase home. This option is mandatory.
LIQUIBASE_LAUNCHER_DEBUG liquibase.launcher.debug
Determine if it should, when true, log what it is doing to stderr. Defaults to false.
LIQUIBASE_LAUNCHER_PARENT_CLASSLOADER liquibase.launcher.parent_classloader
Classloader that will be used to run Liquibase, either system or thread. Defaults to system.

Field Summary

Modifier and TypeField and Description
private static boolean
private static final String
private static final String
private static final String
private static final String
private static final String

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
private static void
buildDupsMessage(List<String> duplicates, String title)

private static void
checkForDuplicatedJars(List<URL> urls)

Check for duplicate core and commercial JAR files

private static void
debug(String message)

private static void
debug(String message, Throwable e)

private static void
private static void
findVersionedDuplicates(List<URL> urls, Pattern versionedJarPattern, Map<String, List<String>> duplicates)

private static ClassLoader
getClassLoader(String parentLoaderSetting)

private static List<URL>
getLibUrls(File liquibaseHome)

public static void
main(final String[] args)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

debugback to summary
private static boolean debug
DEPENDENCY_JAR_VERSION_PATTERNback to summary
private static final String DEPENDENCY_JAR_VERSION_PATTERN
LIQUIBASE_COMMERCIAL_JAR_PATTERNback to summary
private static final String LIQUIBASE_COMMERCIAL_JAR_PATTERN
LIQUIBASE_COMMERCIAL_MESSAGEback to summary
private static final String LIQUIBASE_COMMERCIAL_MESSAGE
LIQUIBASE_CORE_JAR_PATTERNback to summary
private static final String LIQUIBASE_CORE_JAR_PATTERN
LIQUIBASE_CORE_MESSAGEback to summary
private static final String LIQUIBASE_CORE_MESSAGE

Constructor Detail

LiquibaseLauncherback to summary
public LiquibaseLauncher()

Method Detail

buildDupsMessageback to summary
private static void buildDupsMessage(List<String> duplicates, String title)
checkForDuplicatedJarsback to summary
private static void checkForDuplicatedJars(List<URL> urls)

Check for duplicate core and commercial JAR files

debugback to summary
private static void debug(String message)
debugback to summary
private static void debug(String message, Throwable e)
findExactDuplicatesback to summary
private static void findExactDuplicates(List<URL> urls, Map<String, List<String>> duplicates)
findVersionedDuplicatesback to summary
private static void findVersionedDuplicates(List<URL> urls, Pattern versionedJarPattern, Map<String, List<String>> duplicates)
getClassLoaderback to summary
private static ClassLoader getClassLoader(String parentLoaderSetting)
getLibUrlsback to summary
private static List<URL> getLibUrls(File liquibaseHome) throws MalformedURLException
mainback to summary
public static void main(final String[] args) throws Exception