Gradle XJC Ant Task
I had a problem yesterday with the gradle war task not picking up all our jaxb classes.
The build phase was correctly creating all the correct java files but wasn't including them all in the final war which was causing errors on our testing environments but not locally.
The reason they worked locally was because eclipse compiles its own classes rather than using your build tools copies.
The solution
Actually, i'll start with what the problem actually was. It turns out that gradle or one of its plugins is a bit too clever. We haven't added the generated sources to the source sets so really speaking we shouldn't have any compiled jaxb classes. However since we have a direct dependency on some of these classes it has included them for us.
The solution regardless is to add the generated-sources to the sourceSets.