I could not find a way to check in a precondition element if a custom property is set.
What I found out about this issue so far is here.
As the ticket comment indicates, extending CustomPrecondition will not help without modifying the API. Is there another way?
The documentation describes a changeLogPropertyDefined precondition.
The following example worked fine for me:
I run liquibase from Maven. The testing property can be set from the command line as follows: