Ant target fails then imported into gradle

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: XJC task is closing wrong ClassLoader - ClassNotFoundException · Issue #51 · eclipse-ee4j/jaxb-istack-commons · GitHub

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 GitHub - aspevec/xjc_ant_gradle: Repository for simulating bug in XJC implementation for example and more explanations.

1 Like