[hibernate-issues] [Hibernate-JIRA] Created: (METAGEN-45) Generated metamodel sources are not compiled in JDK 6

Artem Troitskiy (JIRA) noreply at atlassian.com
Mon Nov 1 14:41:48 EDT 2010


Generated metamodel sources are not compiled in JDK 6
-----------------------------------------------------

                 Key: METAGEN-45
                 URL: http://opensource.atlassian.com/projects/hibernate/browse/METAGEN-45
             Project: Hibernate Metamodel Generator
          Issue Type: Bug
          Components: processor
    Affects Versions: 1.1.0.CR1, 1.0.0.Final
         Environment: jdk 1.6.0_22, maven-compiler-plugin 2.2+, Eclipse 3.5+
            Reporter: Artem Troitskiy
            Assignee: Hardy Ferentschik


I tried to generate metamodel classes during maven build as described in the documentation (using automatic annotation processing in JDK 6) and noticed that metamodel source files are generated but not compiled. I also see the same problem when I try to configure metamodel generation in Eclipse as described in the documentation.

Googling around showed that many people face the same problem in both maven and Eclipse.

Further investigation showed that:

* Generated sources are compiled by maven when version of maven-compiler-plugin is below 2.2, and not compiled otherwise.

* This behaviour is related to {{TODO}} in {{org/hibernate/jpamodelgen/test/util/CompilationTest.java}} - if I remove the second compilation phase there, tests fail for the very same reason.

* Currently annotation processor generates metamodel sources at the final round of annotation processing. However, when I modify {{org/hibernate/jpamodelgen/JPAMetaModelEntityProcessor.java}} to generate metamodel at the first round, tests pass and everything works fine in maven and Eclipse. It looks like sources generated at the final round are not compiled.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the hibernate-issues mailing list