Issue when executing XJC Ant task through Gradle - ClassNotFoundException

Hello all,

we had an ClassNotFoundException happening after executing XJC Ant task through Gradle. And we managed to find the root cause for this and it’s in the JAXB implementation. That implementation closes ClassLoader (ant-loader) from Gradle and prevents from loading new classes.

Issue for that is opened:

I’m writing this here just in case somebody from the community has the same issue and to save them the trouble of debugging ClassLoaders.

Small repository with failing example, fix and more detailed description is created here: