How do I build a JAR file for my extension?

Based on the “HelloWorld” tutorial elsewhere in this forum, I’m trying to build an extension JAR. I assume I need to add something to the POM, but I’m not very familiar with Maven so I’m not sure what to do.

My code is in the “liquibase.ext.helloworld” package - see attached. (You can also see my code on GitHub: Also, do some classes/methods need additional attributes in order to integrate my extension with liquibase-core?

The easiest approach is probably to start with an existing simple extension like or

It has a good starting point pom.xml in the root and the maven directory structure so you can put your classes in /src/main/java and then just run “mvn package” to have maven package your code up into a jar.

You should only need to implement the liquibase interfaces that correspond to the type of extension you are trying to create. The docs we have are at but it definitely needs more docs. What type of extension are you looking to create?


That sounds like a perfect use for extensions. Let me know if you run into troubles.


Thanks for the info.

What I’m hoping to build is an extension to simplify the management of configuration for a software product I use. The configuration data is stored in an Oracle database, and for various reasons it’s currently easier to maintain a set of configuration scripts, rather than writing some sort of GUI or web interface. However, we’d like to keep some “incremental” scripts as well so we can track changes from one configuration release to the next: i.e. Liquibase changelogs. However, each configuration item is not just a row in a table, it’s a set of related data across multiple tables. For example, we might add a new user to the system, but then that user has roles and metadata spread across a few different tables.

So if we adopt Liquibase, it would be good if I could have changes like “AddUser”, which would have attributes “username”, “password”, etc., and then a list of roles associated with it. This should then generate the necessary SQL to insert all the related rows as appropriate.

There are other things I’d like to do also, but that’s the first one.

The answer above is me - I just forgot to login before posting.