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?