Issue
Generate JPA 2 Entities from existing Database
I want to do same but using maven build.
Please suggest the plugin. As i googled it, i found the metamodel generation of JPA using JPA annotation entities.Didn't find anything related to this question.
Solution
SInce you are using hibernate the default option would be hibernate3-maven-plugin, more specifically the hibernate3:hbm2java
goal configured with <ejb3>true</ejb3>
. It will generate annotated pojos (most annotations are from the standard javax.persistence
package, but it might also include custom org.hibernate.annotations
) .
Check out John Citizen's answer at JBoss Community for sample configuration.
Answered By - Anthony Accioly
Answer Checked By - Mary Flores (JavaFixing Volunteer)