This plugin uses the Java API for XML Binding (JAXB), version 2+, to generate Java classes from XML Schemas (and optionally binding files) and to create XML Schemas from annotated Java classes. The plugin delegates most of its work to either of the two JDK-supplied tools XJC and Schemagen, through its JAXB implementation dependencies.
The jaxb2-maven-plugin has four main goals, listed below. Detailed information about each goal can be found on their respective documentation page.
A set of usage examples are found within the following pages:
|XJC: Basic Examples||General usage and basic plugin configuration examples.|
|SchemaGen: Basic Examples||General usage and basic plugin configuration examples.|
|SchemaGen: Post-processing||Postprocessing of generated schema, such as namespace prefix changes or copying JavaDoc to annotations within generated XSDs.|
|Filters and Filtering||Defining Filters to exclude (some) files from processing. These constructs can be used by all Mojos (for all goals).|
Two sets of documentation may give you better insight in the tools used by this jaxb2-maven-plugin:
In case you still have questions regarding the plugin’s usage, please feel free to contact the user mailing list. The posts to the mailing list are archived and could already contain the answer to your question as part of an older thread. Hence, it is also worth browsing/searching the mail archive.
The jaxb2-maven-plugin is compatible with m2e and integrates with the Eclipse build, providing incremental build support in the IDE. This requires m2e v1.1 or later.
If you feel like the plugin is missing a feature or has a defect, you can fill a feature request or bug report in our issue tracker. When creating a new issue, please provide a comprehensive description of your concern, preferably along with a patch. If you do not supply a patch for the problem, it is important that the developers can reproduce your problem. For this reason, entire debug logs, POMs or most preferably little demo projects attached to the issue are very much appreciated. Contributors can check out the project from our source repository and will find supplementary information in the guide to helping with Maven.