Generate JPA Entity Script

I am using IntelliJ IDEA to write Java code.

It has built in script to generate POJOs class, but I want to generate JPA Entity classes. So today, I wrote a Groovy script to do it.

It saved my time and I hope it helpful to you!