title: How to generate jaxb classes from xsd using gradle, jaxb and xjc, classes should have XmlRootElement
body: <p>We were trying to generate JAXB classes using gradle, xsd and xjc, and JAXB classes should have XmlRootElement annotations so it could be used to expose as web service reponse. We were following this link <a href="http://azagorneanu.blogspot.com/2011/09/configure-maven-to-generate-classes.html" rel="noreferrer">http://azagorneanu.blogspot.com/2011/09/configure-maven-to-generate-classes.html</a>, it helped in great deal but we were unable to find one particular example with gradle only. So we figured out few things what we will share as an answer.</p>