Use java classes that implement CustomTaskChange in Node.js

I developed some Java classes that implement CustomTaskChange and I want to use them in a Node.js application.
First I made a jar file.
Then I add the jar to the classpath

const LiquibaseTS = require('liquibase').Liquibase;
const POSTGRESSQL_DEFAULT_CONFIG = require('liquibase').POSTGRESSQL_DEFAULT_CONFIG;

const myConfig = {
  ...POSTGRESSQL_DEFAULT_CONFIG,
  changeLogFile: 'db/master/changelog.xml',
  url: 'jdbc:postgresql://localhost:5432/saft-demo-dump?allowMultiQueries=TRUE',
  username: 'postgres',
  password: '*****',
  classpath:"jar/postgresql-42.2.20.jar;jar/migrations-0.0.1-SNAPSHOT.jar"
}
const instTs = new LiquibaseTS(myConfig);

and now I want to use it in a XML file to run the migration, but I always get a ClassNotFoundException

<?xml version="1.0" encoding="UTF-8"?>
<databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.8.xsd">
    <changeSet author="fabio" id="bd69067q-qr00-4400-902b-0091c5d29681">
        <customChange class="liquibase.change.custom.MultipleAdd"
                      suffix="transactions" columnName="NODE_COLUMN" columnType="varchar(250)">

        </customChange>
    </changeSet>
</databaseChangeLog>

How can I use my classes from the jar file?

Hi @fabiopires10 ,

Can you confirm if you have added the classpath in the liquibase.properties file as well?

Where is that filé? i can’t find it

Sure. You can find more details about liquibase properties file here

You can also find free Liquibase University Foundation Certificate Course that will help you to all about Liquibase basic concepts and liquibase commands. You can also find intermediate courses on Liquibase University to further widen your Liquibase knowledge.

Best,
@aditi