liquibase extensions not being recognised

I’m trying to write a small extension, the ultimate intention being to override some behaviour when using MySQL to better suit my application’s use case. This is what I’ve tried so far:

I’ve written a noddy “hello world” level database extension, at present all this does is extend the standard MySQL database implimentation with priority of Default + 1 and some extra logging to prove that I’ve successfully overridden the default implimentation. To guard against the possibilty that the extension is working and the logging isn’t, it also overrides executeStatements with a no-op, so I should see no changes in my MySQL database if my implimentation is being used.

Unfortunately, it’s not working. Liquibase returns happily and all changes are executed as normal, so it must still be using the standard Database implimentation.

I wrote the extension in groovy and packaged it up in a jar using gradle. I’ve placed the jar in the liquibase_home/lib folder (which is deffinitely on the classpath because thats where the MySQL connector jar is).

The code is currently in package liquibase.ext.database, although I’ve also tried liquibase.ext and liquibase.database.ext, both with and without a sub package wrapping my code, all with the same result.

I’ve tried this with both the current binary distribution v3.55, and a home compiled version from the master branch v3.60.

I tried running the source code in debug mode from intellij and the classloader lists my extension jar under classFilesByLocation but does not recognise my class in classesByPackage.

I’m running MacOS Siera if that makes any difference.

I’ve also tried downloading an extension from the Liquibase Extensions page, and I can’t get that to load either.

Any suggestions anyone may have as to what I’m doing wrong would be gratefully received, I’m about ready to throw in the towel.

It all seems like it should be working for you. The fact that it is MacOS shouldn’t matter

Liquibase looks for extensions by the packages listed in Liquibase-Package fields of MANIFEST.MF files. The standard liquibase jar ships with “liquibase.ext” as a package as well as “liquibase.database” and so either of your packages should have worked.

The current DefaultPackageScanClassResolver looks for files ending with .class to find classes. Is your extension packaged with  “.groovy” extensions?