Eclipse, JPA 2.0 metamodel generator and Spring Roo working together
Is there a way to put Spring Roo and JPA 2.0 metamodel generator to work together?
I have a Spring Roo project and use Eclipse as IDE. I was able to configure the Eclipse project and maven pom.xml to use JPA 2.0 metamodel generator in the build/compile process. The problem is, the generator doesn't generate metamodel classes for Roo entities (that is, domain classes that are annotatted with @Roo*
annotations).
I created an entity "by hand" and confirmed that the generator is properly configured. I suspect that the generator fail for Roo entities because it doesn't understand AspectJ IDT classes. Is there a way to make the generator work for Roo entities?
Oh, before I forget, these are my configurations:
- STS 2.5.1
- Spring Roo 1.1.0
- Project configuration:
- Annotation processing enabled
- Fact开发者_如何学Goory path contains
hibernate-jpa-2.0-api-1.0.0.Final.jar
andhibernate-jpamodelgen-1.1.0.Final.jar
- pom.xml
- Included http://maven-annotation-plugin.googlecode.com/svn/trunk/mavenrepo as a plugin repository
- Added
org.hibernate:hibernate-jpamodelgen:1.1.0.Final
as dependency - Added and configured
org.codehaus.mojo:build-helper-maven-plugin:1.5
to includesrc/generated/java
as a maven source folder - Added and configured
org.bsc.maven:maven-processor-plugin
to runorg.hibernate.jpamodelgen.JPAMetaModelEntityProcessor
and place the generated code atsrc/generated/java
I can give further details if necessary. Thanks in advance.
You should probably take a look at model2roo project.
http://code.google.com/p/model2roo/
精彩评论