How to specify the searchPath when using liquibase commandline liquibase.integration.commandline.Main

385 views Asked by At

(Using liquibase 4.18.0 and also tried 4.19.0)

I want to add two additional parameters to my (working) liquibase call

--hub-mode=off
--searchPath="some/resources"

Working:

java liquibase.integration.commandline.Main --logLevel=info --defaultsFile=project.properties update

Not working:

java liquibase.integration.commandline.Main --logLevel=info --searchPath="some/resources"  --defaultsFile=project.properties update

java liquibase.integration.commandline.Main --logLevel=info --search-path="some/resources"  --defaultsFile=project.properties update

I always get:

Unknown option 'searchPath'

If I remove this option I get the same for hub-mode. If I remove both the resource could not be found and liquibase tells me

"More locations can be added with the 'searchPath' parameter."

I checked the declaredFields variable and there are the following options defined and the two are missing:

runningFromNewCli
newCliChangelogParameters
outputStream
LOG
coreBundle
classLoader
driver
username
password
url
hubConnectionId
hubProjectId
hubProjectName
databaseClass
defaultSchemaName
outputDefaultSchema
outputDefaultCatalog
liquibaseCatalogName
liquibaseSchemaName
databaseChangeLogTableName
databaseChangeLogLockTableName
databaseChangeLogTablespaceName
defaultCatalogName
changeLogFile
overwriteOutputFile
classpath
contexts
labels
labelFilter
driverPropertiesFile
propertyProviderClass
changeExecListenerClass
changeExecListenerPropertiesFile
promptForNonLocalDatabase
includeSystemClasspath
defaultsFile
diffTypes
changeSetAuthor
changeSetContext
dataOutputDirectory
referenceDriver
referenceUrl
referenceUsername
referencePassword
referenceDefaultCatalogName
referenceDefaultSchemaName
currentDateTimeFunction
command
commandParams
logLevel
logFile
changeLogParameters
outputFile
excludeObjects
includeCatalog
includeObjects
includeSchema
includeTablespace
deactivate
outputSchemasAs
referenceSchemas
schemas
snapshotFormat
liquibaseProLicenseKey
liquibaseProLicenseValid
liquibaseHubApiKey
liquibaseHubUrl
managingLogConfig
outputsLogMessages
sqlFile
delimiter
rollbackScript
rollbackOnError
suspiciousCodePoints

Any idea how to specify the searchpath for the commandline executable? I did read this post but the solution did not help.

Update: I also read the liquibase article on searchPath. Suddently searchPath becomes search-path...?!

Global CLI parameter

liquibase --search-path=<string> update

But anyhow it still doesn't work.

0

There are 0 answers