[hibernate-issues] [Hibernate-JIRA] Commented: (METAGEN-45) Generated metamodel sources are not compiled in JDK 6
Hardy Ferentschik (JIRA)
noreply at atlassian.com
Tue Nov 2 07:07:50 EDT 2010
[ http://opensource.atlassian.com/projects/hibernate/browse/METAGEN-45?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=38972#action_38972 ]
Hardy Ferentschik commented on METAGEN-45:
------------------------------------------
Which operating system are you working on? Some people said that on their system compilation works. The problem also exists when using gradle.
I don't understand why the sources in the last round are not getting compiled. the javadocs of {{processingOver}} says:
{quote}
Returns true if types generated by this round will not be subject to a subsequent round of annotation processing; returns false otherwise.
{quote}
This seems to imply to me that it is legal to generate types in this last round and of course I would expect them to be compiled. For me it seems to indicate a bug in some JDK implementations.
Not relying on _processingOver_ might be an option. Thanks for pointing this out.
> 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.0.0.Final, 1.1.0.CR1
> 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