Property Substitution in Changelog (still) not working in 4.23.1

tldr: Trying to upgrade to 4.23.1 and property substitution in the logicalFilePath attribute of the Changelog XML file is not working and my workaround from before no longer helps.

The full story

A couple years ago when we were upgrading to v4.6.1 I found that property substitution was no longer happening for the logicalFilePath attribute in the Changelog XML file. This was brought up in an earlier forum post here: Parameter Substitution in logicalFilePath

At that time there was no solution given or reason for the change in behavior, and I found a work around by manually modifying the values inside the Liquibase object.

Today I am trying to upgrade to v4.23.1 and find my work around no longer helps. This is not surprising given the changes that have happened and the new CommandScope approach. The problem I have today is the same as that old forum post.

The Changelog XML files are built into our application and reside on the classpath. I was hoping that by calling the new API (CommandScope.execute) maybe it would work, but none of my attempts have been able to get the Changelog files to be loaded. I suspect that even if I got the new API to work, the logicalFilePath problem would still exist.

What are my options? Can this be fixed? Is there a way to feed a String or Stream into Liquibase instead of it reading the Changelog files directly? If so I could read the files myself, do the substitution, and then provide the ready to go XML. Help me, Obi Wan…

Are there any ways to resolve the above problem with the latest version?

Seems like the two possibilities are:

  • parameter substitution is changed to also apply to the logicalFilePath
  • read in the changelog XML file myself, do the substitution, then feed the results into Liquibase