I am new to Liquibase
and have successfully generated the ddl scripts for the given change log.
I used the change set as an xml
and generated the ddl scripts using the maven goal liquibase:updateSQl
.I also used the liquibase.properies
for specifying the url
,driver
,dialect
etc
This worked fine for me and I used the liquibase version 3.5.5
.
I was trying to do the same using the java code with the liquibase 3.5.5 added as my maven dependency. But I can't achieve the same using java code. Can someone put light in my path ?
How can I do updateSQL
through java?
I did a little research in the
liquibase
Main
class and I came up with a solution . For the below codeinput
isdatabaseChangeLog
andoutput
isddl
script flush.