I cannot seem to figure out how I should get EclipseLink's CanonicalModelProcessor to generate metadata classes for entities that are mapped in an orm.xml file, and which are not source files in the current compilation unit, but instead included in the compiler's classpath.
I'm trying to do this with maven, by simply calling the compiler plugin without any further options. I could verify that the EclipseLink annotation processor executes, and finds both the persistence.xml and the orm.xml, and succeeds in processing both files. It only fails when it internally walks through the "RoundElement" classes and tries to map the against what is defined in the persistence unit. Obviously, the classes from the classpath are not in the "roundElements" list, and thus no code is generated for them, even though their metadata is present and valid in the internal PersistenceUnit object.
Does anyone have an idea how I could get this to work? Thanks!
EDIT: excerpt of pom.xml:
<dependencies>
<dependency>
<groupId>com.model</groupId>
<artifactId>app-model</artifactId>
<version>1.0.0</version>
</dependency>
<dependency>
<groupId>org.eclipse.persistence</groupId>
<artifactId>eclipselink</artifactId>
<version>2.5.2</version>
</dependency>
<dependency>
<groupId>org.eclipse.persistence</groupId>
<artifactId>org.eclipse.persistence.jpa.modelgen.processor</artifactId>
<version>2.5.2</version>
</dependency>
<build>
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
</plugin>
</plugins>
</build>
Excerpt from orm.xml:
...
<entity class="com.model.app.AppClass">
.... AppClass is defined in app-model artifact
</entity>