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

How does this work? #6

Open
bergamin opened this issue Jun 24, 2021 · 0 comments
Open

How does this work? #6

bergamin opened this issue Jun 24, 2021 · 0 comments

Comments

@bergamin
Copy link

bergamin commented Jun 24, 2021

I'm new to XML and XSD and I need to use XJC to generate ~70 JAXB classes. But all these classes later on will be a pain to maintain if I'm to use setters, so I really need to add Lombok's @Builder for my own mental sanity's sake.

I don't understand how to use this plugin with xjc command. Your README.md file makes it look like there are two options:

  • Create a project and import this plugin with maven, so you can build Java code that will generate the JAXB files with Lombok annotation
  • Nothing extra needs to be downloaded. Just add these parameters to your command line call

I'm not willing to create a tool, so I went the command line approach, but xjc seems not to understand the parameters. This is what I typed in (added a few more annotations I feel like I need):

PS C:\Java\jdk1.8.0_201\bin> .\xjc C:\xsd\xsdFile.xsd -d C:\xml -Xlombok -Xlombok:AllArgsConstructor -Xlombok:NoArgsConstructor -Xlombok:Builder -Xlombok:Data

To what it replied with:

unrecognized parameter -Xlombok

And gave me a list of parameters I could use. One of them -extension, which I tried and also didn't work.

Thanks

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

No branches or pull requests

1 participant