Finally managed to re-jar xmlbeans.
* Mixing methods and tasks is troublesome, it turns out. Also, configuration vs execution phases in Gradle.