Hey,
I posted here the same problem with example, explanation and current fix.
It’s the issue with JAXB/XJB library and issue is reported: https://github.com/eclipse-ee4j/jaxb-ri/issues/1391
If you execute:
./gradlew generate_xsd --full-stacktrace --debug
You will get something like:
[DEBUG] [org.gradle.api.internal.project.ant.AntLoggingAdapter] Could not load class (org.apache.tools.ant.taskdefs.Replace) for type replace
We solved it with downgrading JAXB/XJC libraries until this is fixed. You can check https://github.com/aspevec/xjc_ant_gradle for example and more explanations.