Gradle, error when creating java objects from XSD “EnumMemberSizeCap limit”, setup binding file

After upgrade to spring boot 3, its recommended to use JAKARTA instead of javax

I must find a new way to generate java objects from XSD’ es

I have been recommended this plugin: ‘org.unbroken-dome.xjc’


plugins {
    id 'org.unbroken-dome.xjc' version '2.0.0'
xjc () {
    srcDirName = "$projectDir/src/main/resources/xsd"
//problem was with transitive dependencies for xjcTool
    xjcTool 'com.sun.xml.bind:jaxb-xjc:2.3.3'
    xjcTool 'com.sun.xml.bind:jaxb-impl:2.3.3'

I have created a binding file like this:

<?xml version="1.0" encoding="UTF-8"?>
<jaxb:bindings version="2.0" xmlns:jaxb="">
        <jaxb:globalBindings typesafeEnumMaxMembers="1000"/>

To setup the typesafeEnumMaxMembers, emums, there is enums that has more values then 256.

I’m getting this error when executing my gradle file:
not mapped to Enum due to EnumMemberSizeCap limit. Facets count: 325, current limit: 256. You can use customization attribute “typesafeEnumMaxMembers” to extend the limit.

I’ve tried different things, but how do I get gradle to use this binding file?

That’s not really a Gradle question, but a question for that plugin.
Gradle knows nothing about binding files or xjc.
So you should probably ask that plugin’s maintainer.
But according to Gradle XJC Plugin you should just needed to name it whatever.xjb and put it to src/main/schema.