java - EclipseLink Canonical Metamodel from already compiled entity classes -


i cannot seem figure out how should eclipselink's canonicalmodelprocessor generate metadata classes entities mapped in orm.xml file, , not source files in current compilation unit, instead included in compiler's classpath.

i'm trying maven, calling compiler plugin without further options. verify eclipselink annotation processor executes, , finds both persistence.xml , orm.xml, , succeeds in processing both files. fails when internally walks through "roundelement" classes , tries map against defined in persistence unit. obviously, classes classpath not in "roundelements" list, , no code generated them, though metadata present , valid in internal persistenceunit object.

does have idea how 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 orm.xml:

... <entity class="com.model.app.appclass">     .... appclass defined in app-model artifact </entity> 

ok - looking @ source code of eclipselink annotation processor, seems "not possible". ap walks source elements encountered compiler , matches them against has been loaded jpa metamodel - not other way round. now, created myself patched version of eclipselink annotation processor additionally walks entities, embeddables , mapped superclasses defined in xml , matches them against binary elements compile-time classpath. way, full metamodel can generated.


Popular posts from this blog

c# - ODP.NET Oracle.ManagedDataAccess causes ORA-12537 network session end of file -

matlab - Compression and Decompression of ECG Signal using HUFFMAN ALGORITHM -

utf 8 - split utf-8 string into bytes in python -