Title: Enhancement with Maven ## Using the openjpa-maven-plugin The full OpenJPA Maven plugin documentation can be found [here](http://openjpa.apache.org/builds/3.1.2/openjpa-maven-plugin/index.html). For example, to enhance you source entity classes after they have been compiled (but exclude any POJO classes that rely upon orm.xml maappings), add the openjpa-maven-plugin to the section of your pom.xml, like - ... org.apache.openjpa openjpa-maven-plugin 3.1.2 **/entities/*.class **/entities/XML*.class true true enhancer process-classes enhance ... There are other goals available to create the Entity to SQL mapping and Entity to XML Schema mapping, which are documented under the [Goals section](https://openjpa.apache.org/builds/3.1.2/openjpa-maven-plugin/plugin-info.html) on the plugin website. ## Using the maven-antrun-plugin You can use the maven-antrun-plugin to launch the OpenJPA enhancer task using ANT. The steps are nearly identical to the ones for [Enhancing with ANT](enhancement-with-ant.html) (again, you may not need to move the persistence.xml file to the build directory, but I did for this write-up). src/main/java **/*.xml ..... org.apache.maven.plugins maven-antrun-plugin 1.2 process-classes run ....