This is an example of how to use JAXB with modern Java (11 and above) with JPMS. It'll build and run with Java 11, 17, or 21 using jaxb-maven-plugin for code generation with an example xsd found on https://www.w3schools.com/xml/schema_example.asp
mvn package