Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [m2e-users] JPA 2 metamodel Generation

I am not a maven expert, so could you please explain your comment a bit so I can enter an enhancement request. As far as I know, annotation processing is supported out-of-the-box by JDK 6 - maven-compiler-plugin simply has to invoke the compiler. That's how my project is working correctly from the command line - all I have done is added a dependency to hibernate-jpamodelgen (which is an annotation processor) and the compiler takes care of the rest. But may be I am confused!


On Fri, Jan 21, 2011 at 9:56 AM, Igor Fedorenko <igor@xxxxxxxxxxxxxx> wrote:
Interesting... apparently maven-compiler-plugin does support annotation
processing out of the box. Feel free to open enhancement request to add
this to m2e, but somebody will have to provide a quality patch for this
to happen before m2e 1.0. It should be possible to add this support via
external m2e extension, so the patch does not have to change the core.


On 11-01-21 04:30 AM, Naresh Bhatia wrote:

I am attaching a complete standalone example. Just run mvn test from the
command line and everything works fine - you will see generated code
in target\generated-sources. However if you bring up the project in
Eclipse, the ArtistRepository class will have two errors because the
generated code is not visible.


On Thu, Jan 20, 2011 at 10:23 PM, Igor Fedorenko <igor@xxxxxxxxxxxxxx
<mailto:igor@xxxxxxxxxxxxxx>> wrote:

   Complete standalone sample project would be useful here.

   I am guessing somebody will have to develop what we call "project
   configurator" before this will work inside m2e, but I want to make sure
   I am not missing anything.


   On 11-01-20 09:59 PM, Naresh Bhatia wrote:

       I need to generate the JPA 2 metamodel for the entities in my
       After adding the following dependency, maven stared generating the
       metamodel quite easily from the command line:


       However, the corresponding Eclipse project (generated using
       does not seem to generate sources. I tried to update the project
       configuration through Eclipse, but that did not work. What do I
       need to
       do to make this work in m2eclipse?

       Reading the instructions

       at the hibernate site, I tried to enable annotation processing
       and add
       the Hibernate Metamodel Generator to the factory path. This started
       generating the metamodel, but Eclipse started going into an infinite
       loop trying to compile the sources. So this didn't work either.

       Can someone please help me with this issue? I am using m2eclipse


       m2e-users mailing list
       m2e-users@xxxxxxxxxxx <mailto:m2e-users@xxxxxxxxxxx>

   m2e-users mailing list
   m2e-users@xxxxxxxxxxx <mailto:m2e-users@xxxxxxxxxxx>
m2e-users mailing list

Back to the top