Search code examples
hibernategradlehibernate-mapping

Is it possible to generate hibernate mapping files from annotated classes when gradle builds


I am studying spring + hibernate for making a web services.

There are tools which generate hibernate mapping files from the existing database. But I want to make the mapping files(xxx.hbm.xml) from the annotated java files.

I know that there is a eclipse plugin which can be used. But is there a way to use gradle to make the mapping files from the annotated java files especially in cli?

It would be cool if the mapping files are automatically generated when I builds the spring project using gradle in cli.


Solution

  • I'd guess you could do this via the ant task

    See using ant from gradle