Maven can be used for the purpose, you need to add some dependencies and just clean your application. You will get all classes created automatically in your target folder.
Just copy them from target to desired place, here is pom.xml
that I have used to create classed from xsd
files:
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>jaxb2-maven-plugin</artifactId>
<executions>
<execution>
<goals>
<goal>xjc</goal>
</goals>
</execution>
</executions>
<configuration>
<schemaDirectory>src/main/webapp/schemas/</schemaDirectory>
</configuration>
</plugin>
Just place your xsd files under src/main/webapp/schemas/
and maven will find them at compile time.
Hope this will help you, more information can be found at http://www.beingjavaguys.com/2013/04/create-spring-web-services-using-maven.html