Hi all,
First of all I couldn't find any documentation inside EclipseLink explaining how to configure and use metamodel generation. Is there any?
So, I'm trying to generate metamodel with EclipseLink so that I can use Criteria API. However, even after configuring my maven project with CanonicalAnotationProcessor I ca't get it to work,
Can anyone help me?
This is my maven setup
<plugin>
<groupId>org.bsc.maven</groupId>
<artifactId>maven-processor-plugin</artifactId>
<version>2.2.4</version>
<executions>
<execution>
<id>eclipselink-jpa-metamodel</id>
<goals>
<goal>process</goal>
</goals>
<phase>generate-sources</phase>
<configuration>
<processors>
<processor>org.eclipse.persistence.internal.jpa.modelgen.CanonicalModelProcessor</processor>
</processors>
</configuration>
</execution>
</executions>
<dependencies>
<dependency>
<groupId>org.eclipse.persistence</groupId>
<artifactId>org.eclipse.persistence.jpa.modelgen.processor</artifactId>
<version>2.6.1</version>
</dependency>
</dependencies>
</plugin>
Maven runs fine but it doesn't generate any metadata classes....
I have also tried to use the option
<compilerArguments>-Aeclipselink.persistencexml=src/main/resources/META-INF/persistence.xml</compilerArguments>
but it fails with:
[INFO] --- maven-processor-plugin:2.2.4:process (eclipselink-jpa-metamodel) @ eclipse-foundation-data ---
[WARNING] diagnostic: warning: The following options were not recognized by any processor: '[eclipselink.persistencexml]'
[Updated on: Fri, 16 October 2015 15:40]
Report message to a moderator