[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [eclipselink-users] Metamodel generation with Maven
|
I managed to make it work and wrote a blog about it
Antonio
2010/5/27 Antonio Goncalves
<antonio.mailing@xxxxxxxxx>
Hi all,
I'm using EclipseLink 2.0.1 to generate entities metamodel so I can use the new Criteria API. I've setup Intellij Idea annotation processing and everything works fine. Now, I need to industrialize the metamodel generation with Maven and I can't make it work. I'm using the apt-maven-plugin as follow :
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>apt-maven-plugin</artifactId>
<version>1.0-alpha-3</version>
<executions>
<execution>
<goals>
<goal>process</goal>
</goals>
</execution>
</executions>
<configuration> <factory>org.eclipse.persistence.internal.jpa.modelgen.CanonicalModelProcessor</factory>
</configuration>
<dependencies>
<dependency>
<groupId>org.eclipse.persistence</groupId>
<artifactId>javax.persistence</artifactId>
<version>2.0.0</version>
</dependency>
<dependency>
<groupId>org.eclipse.persistence</groupId>
<artifactId>eclipselink</artifactId>
<version>2.0.1</version>
</dependency>
</dependencies>
</plugin>
</plugins>
</build>
The problem is that the APT plugin needs an implementation of AnnotationProcessorFactory, so when I run Maven I have the following :
[WARNING] warning: Specified factory, 'org.eclipse.persistence.internal.jpa.modelgen.CanonicalModelProcessor', is not an AnnotationProcessorFactory.
[WARNING] warning: No annotation processors found but annotations present.
Does anybody know how to generate metamodel classes with Maven ? Am I using the right plugin (APT) ?
Thanks,
Antonio
--
--
Antonio Goncalves (
antonio.goncalves@xxxxxxxxx)
Software architect
Web site :
www.antoniogoncalves.org
Blog:
agoncal.wordpress.comFeed:
feeds2.feedburner.com/AntonioGoncalvesParis JUG leader :
www.parisjug.org
LinkedIn:
www.linkedin.com/in/agoncal