I have built this schema transform into my liquibase maven projects.
I was already extracting the XSD schema currently used because at one point in time the server serving the schemas from their canonical URL went down and loading my apps failed. I then discovered that the XSD parsing had a fallback in loading the XSD schema from a classpath resource. However I am running in OSGi and in OSGi classpath resources are bundle local (a “bundle” in OSGi is a jar file with some special stuff in MANIFEST.MF). Some might see this as a limitation, but most of the time I see this as a feature.
Anyway: this meant to be proof against this server going down I had to extract the liquibase schema of the version I am currently using and add it as a classpath resource of the jar file the changelog is loaded from. This is done by: