Liquibase maven plugin with JDK11 failing

I'm using Apache Maven 3.3.9 Java version: 11.0.5 And the latest version of liquibase-maven-plugin as follows:


org.liquibase liquibase-maven-plugin src\main\resources\changelog.yaml oracle.jdbc.OracleDriver thin_url user password

I’ve added in my poml.xml the following dependencies

 javax.xml.bind jaxb-api 2.3.1   com.sun.xml.bind jaxb-core 2.3.0.1   com.sun.xml.bind jaxb-impl 2.3.1  

but each time execute the plugin with mvn liquibase:update I’ve got an Caused by: java.lang.ClassNotFoundException: javax.xml.bind.annotation.XmlElement exception.

Any clue what I’m doing wrong?

Thanks Elena!

I answered this on StackOverflow:

https://stackoverflow.com/questions/58952978/liquibase-maven-plugin-with-jdk11-failing/58963756#58963756

Steve Donie
Principal Software Engineer
Liquibase Community Engagement
Datical, Inc. http://www.datical.com/

Thanks. I also answered and post the answer here as well, to avoid other people to make the same mistake as me .

I was adding the dependencies in the wrong place. I was adding them as 'regular' dependencies in the pom. I didn't know that I had to add them in the plugin as follows:


org.liquibase liquibase-maven-plugin ${liquibase.version} resources\changelog2.yml oracle.jdbc.OracleDriver url user password true jakarta.xml.bind jakarta.xml.bind-api 2.3.2

Excellent! Thanks for adding those details. 

Steve Donie
Principal Software Engineer
Liquibase Community Engagement
Datical, Inc. http://www.datical.com/