I am using liquibase-maven-plugin
in a Spring Boot & maven project. I feel it will be more intuitive for developers to have functions they can run without starting an application.
The application.properties values of the project are retrieved from a config server. These values include the username, password and url for the connection to the db. I am looking to do something like:
in application.properties:
spring.datasource.url=${server.datasource.url}
spring.datasource.username=${server.datasource.username}
spring.datasource.password=${server.datasource.password}
spring.datasource.driver-class-name=${server.datasource.driver-class-name}
spring.liquibase.change-log=classpath:db/db-master-changelog.xml
and in liquibase.properties:
changeLogFile:db/db-master-changelog.xml
url:${spring.datasource.url}
username:${spring.datasource.username}
password:${spring.datasource.password}
driver:${spring.datasource.driver-class-name}
But obviously its not how it works. I was wondering if there is a way to achieve something like this?
An alternative would be to run the commands with the values as arguments (-Dliquibase.url=…) but that is kinda tedious and verbose.