An example generates JPA Metamodels with Apache Maven.
There are eight profiles prepared for four providers which each has to methods for generating JPA static metamodels.
Uses org.eclipselink.persistence:org.eclipselink.persistence.jpa.modelgen.processor
as an optional dependency.
Uses org.eclipse.persistence.internal.jpa.modelgen.CanonicalModelProcessor
from org.eclipselink.persistence:org.eclipselink.persistence.jpa.modelgen.processor
as an annotation processor.
- Note that a compiler argument(
-Aeclipselink.persistencexml
) of the location ofpersistence.xml
is required.
Uses org.hibernate:hibernate-jpamodelgen
as an optional dependency.
Uses org.hibernate.jpamodelgen.JPAMetaModelEntityProcessor
from org.hibernate:hibernate-jpamodelgen
as an annotation processor.
- Note that
javax.xml.bind.jaxb-api
is required.
Uses org.apache.openjpa:openjpa
as an optional dependency.
- Note that
javax.annotation:javax:annotation-api
is required. - And a compier argument(
-Aopenjpa.metamodel
) must be set.
Uses org.apache.openjpa.persistence.meta.AnnotationProcessor6
of org.apache.openjpa:openjpa
as an annotation processor.
Uses org.datanucleus:datanucleus-jpa-query
as an optional dependency.
Uses org.datanucleus.jpa.query.JPACriteriaProcessor
from org.datanucleus:datanucleus-jpa-query
as an annotation processor.
Try to execute build-all-profiles.sh
for convenience.