Skip to content

Conversation

@Asger-KB
Copy link

I wanted to use Lombok for the generated classes (via Annox)

bindings.xjb

<jaxb:bindings
    xmlns:jaxb="https://jakarta.ee/xml/ns/jaxb" xmlns:xs="http://www.w3.org/2001/XMLSchema"
    xmlns:xjc="http://java.sun.com/xml/ns/jaxb/xjc"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns:annox="urn:jaxb.jvnet.org:annox"
    xsi:schemaLocation="https://jakarta.ee/xml/ns/jaxb https://jakarta.ee/xml/ns/jaxb/bindingschema_3_0.xsd"
    jaxb:extensionBindingPrefixes="xjc annox"
    version="3.0">
  <jaxb:bindings schemaLocation="scheam.xsd">
    <jaxb:bindings node="//xs:complexType" multiple="yes">
        <annox:annotateClass>@lombok.Data</annox:annotateClass>
        <annox:annotateClass>@lombok.With</annox:annotateClass>
        <annox:annotateClass>@lombok.AllArgsConstructor</annox:annotateClass>
        <annox:annotateClass>@lombok.NoArgsConstructor</annox:annotateClass>
    </jaxb:bindings>
  </jaxb:bindings>
</jaxb:bindings>

This worked, but the generated classes still contained jaxb-produced getter/setters methods. I wanted to be able to generate classes without these methods, so I made these two plugins noGetters and noSetters

… similar

Signed-off-by: Asger Askov Blekinge <asga@kb.dk>
@Asger-KB
Copy link
Author

Asger-KB commented Oct 31, 2025

The "@Asger-KB Asger-KB force-pushed the master branch from 6b5120d to 2974f09" was just me signing the commit...

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

Successfully merging this pull request may close these issues.

1 participant