Java – generate metamodel classes using Maven and eclipse (JPA, maven, eclipse)
I use M2e (1.0.100), eclipse (Indigo Sr1), and hibernate jpamodelgen (1.1.1. Final)
Thank you in advance
Solution
I asked the same question on the M2e users mailing list and got the following answers (link for those who want a full thread):
Basically, you should manually configure eclipse (for example, using the hibernate tutorial mentioned above) to use the generator and configure the same directory Maven to use (for me, it is target / generated sources / annotations) as the output directory
According to the submitter of M2e, the project will not change these eclipse files at present, so they will not be overwritten
The problem I encountered was that when using GIT and switching between branches, this information was lost (so it needed to be changed manually) because I didn't want to submit any eclipse related files to SCM At present, this is an acceptable solution, and I hope M2e can add this missing feature
Update at least in my experience, the missing information is to define the target / generated sources / annotations folder as the source folder Like a FYI