Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Question: How to use JAXB Hyperjaxb #578

Open
mooujarrar opened this issue Nov 25, 2024 · 1 comment
Open

Question: How to use JAXB Hyperjaxb #578

mooujarrar opened this issue Nov 25, 2024 · 1 comment
Labels

Comments

@mooujarrar
Copy link

Hi I am new to the whole JAXB world, I want to transform my XSD to POJOs with JPA annotations, it seems that Hyperjax is doing this, I am failing to find documentation to integrate it into my project. I have been using jaxb-plugin-annotate to add custom annotation such as Entity/OneToOne... but it is a lot of work customizing all XSD files and express relations between elements.

Thanks in advance.

@laurentschoelens
Copy link
Collaborator

Hi @mooujarrar,

Hyperjaxb3 is supported in best-effort mode.
You could use the following plugin for your need :

<plugin>
    <groupId>org.jvnet.hyperjaxb3</groupId>
    <artifactId>hyperjaxb3-maven-plugin</artifactId>
</plugin>

It should generate all classes with expected annotations in it, if schemas and bindings is in src/main/resources folder.

You can then customize the plugin configuration like you would do for the "normal" jaxb-maven-plugin

Depending jaxb / jpa versions, you should choose the corresponding version of the maven-plugin (see README on main github page)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants