h2. Using the openjpa-maven-plugin The Maven plugin, formerly provided by the Codehaus project is now part of OpenJPA 2.2.0. The plugins documentation can be found [here|http://people.apache.org/~mikedd/openjpa/openjpa-maven-plugin/] until it finds a permanent home one the openjpa site. The previous versions of the plugin can be found at the [Codehaus project|http://mojo.codehaus.org/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 - {code} ... org.apache.openjpa openjpa-maven-plugin 2.2.0-SNAPSHOT **/entities/*.class **/entities/XML*.class true true enhancer process-classes enhance org.apache.openjpa openjpa 1.2.2 ... {code} 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|http://mojo.codehaus.org/openjpa-maven-plugin/plugin-info.html] on the plugin website. h2. 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] (again, you may not need to move the persistence.xml file to the build directory, but I did for this write-up). {code} src/main/java **/*.xml ..... org.apache.maven.plugins maven-antrun-plugin 1.2 process-classes run .... {code}